Codecraft-18 and Codeforces Round 458 (Div. 1 + Div. 2, combined)

Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.

ContestId
Name
Phase
Frozen
Duration (Seconds)
Relative Time
Start Time
914 Codecraft-18 and Codeforces Round 458 (Div. 1 + Div. 2, combined) FINISHED False 10800 215360699 Jan. 20, 2018, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3838 ) C Travelling Salesman and Special Numbers PROGRAMMING brute force combinatorics dp 1800

B"The Travelling Salesman spends a lot of time travelling so he tends to get bored. To pass time, he likes to perform operations on numbers. One such operation is to take a positive integer x and reduce it to the number of bits set to 1 in the binary representation of x. For example for number 13 it's true that 1310 xe2 x80 x89= xe2 x80 x8911012, so it has 3 bits set and 13 will be reduced to 3 in one operation. He calls a number special if the minimum number of operations to reduce it to 1 is k. He wants to find out how many special numbers exist which are not greater than n. Please help the Travelling Salesman, as he is about to reach his destination! Since the answer can be large, output it modulo 109 xe2 x80 x89+ xe2 x80 x897. The first line contains integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89< xe2 x80 x8921000). The second line contains integer k (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891000). Note that n is given in its binary representation without any leading zeros. Output a single integer -- the number of special numbers not greater than n, modulo 109 xe2 x80 x89+ xe2 x80 x897. In the first sample, the three special numbers are 3, 5 and 6. They get reduced to 2 in one operation (since there are two set bits in each of 3, 5 and 6) and then to 1 in one more operation (since there is only one set bit in 2). "...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
52359303 ijk13 C April 5, 2019, 6:41 p.m. OK Clang++17 Diagnostics TESTS 141 249 21094400 1800
34394480 ruban C Jan. 20, 2018, 11:03 p.m. OK Delphi TESTS 141 30 12595200 1800
34712376 rabbitcxk C Jan. 30, 2018, 2:37 p.m. OK FPC TESTS 141 15 15257600 1800
34393230 pk1210 C Jan. 20, 2018, 9:36 p.m. OK GNU C TESTS 141 30 9932800 1800
38391452 sitara_lives C May 18, 2018, 6:33 a.m. OK GNU C TESTS 141 31 307200 1800
34540681 Nodir_Bobiev C Jan. 25, 2018, 8:48 a.m. OK GNU C TESTS 141 31 5939200 1800
34406283 alexey.orlov C Jan. 21, 2018, 8:38 a.m. OK GNU C TESTS 141 31 9932800 1800
34704629 codeforced C Jan. 30, 2018, 10:01 a.m. OK GNU C TESTS 141 31 10035200 1800
34404030 coderbd C Jan. 21, 2018, 7:17 a.m. OK GNU C TESTS 141 31 18022400 1800
35876559 tpsoete C March 3, 2018, 9:17 a.m. OK GNU C++ TESTS 141 15 2048000 1800
34415252 chenquanwei C Jan. 21, 2018, 1:26 p.m. OK GNU C++ TESTS 141 15 2048000 1800
34405436 s_circle C Jan. 21, 2018, 8:09 a.m. OK GNU C++ TESTS 141 15 2048000 1800
34396087 tolight C Jan. 21, 2018, 1:03 a.m. OK GNU C++ TESTS 141 15 2048000 1800
34387791 hiThere23 C Jan. 20, 2018, 6:14 p.m. OK GNU C++ TESTS 141 15 2048000 1800
34385623 asawasa C Jan. 20, 2018, 5:52 p.m. OK GNU C++ TESTS 141 15 2150400 1800
34410006 XiaoWu C Jan. 21, 2018, 10:40 a.m. OK GNU C++ TESTS 141 15 4403200 1800
34393011 baghalipolo C Jan. 20, 2018, 9:26 p.m. OK GNU C++ TESTS 141 15 4505600 1800
34392809 badeaadi C Jan. 20, 2018, 9:18 p.m. OK GNU C++ TESTS 141 15 5939200 1800
34702650 Scut82 C Jan. 30, 2018, 8:33 a.m. OK GNU C++ TESTS 141 15 6144000 1800
34406574 Smurf1 C Jan. 21, 2018, 8:48 a.m. OK GNU C11 TESTS 141 62 9932800 1800
34415177 jhdjames37 C Jan. 21, 2018, 1:24 p.m. OK GNU C++11 TESTS 141 15 1843200 1800
35460392 oos1111 C Feb. 19, 2018, 2:13 a.m. OK GNU C++11 TESTS 141 15 2048000 1800
35462723 oos1111 C Feb. 19, 2018, 5:49 a.m. OK GNU C++11 TESTS 141 15 2048000 1800
34587341 moyung C Jan. 26, 2018, 8:07 p.m. OK GNU C++11 TESTS 141 15 2048000 1800
34558684 neeyanthkvk C Jan. 25, 2018, 9:42 p.m. OK GNU C++11 TESTS 141 15 2048000 1800
34456235 atatomir C Jan. 22, 2018, 5:20 p.m. OK GNU C++11 TESTS 141 15 2048000 1800
34443346 tuquanrong C Jan. 22, 2018, 10:42 a.m. OK GNU C++11 TESTS 141 15 2048000 1800
34443212 tuquanrong C Jan. 22, 2018, 10:38 a.m. OK GNU C++11 TESTS 141 15 2048000 1800
34442299 Jiburiru C Jan. 22, 2018, 10:06 a.m. OK GNU C++11 TESTS 141 15 2048000 1800
34419757 here C Jan. 21, 2018, 4:25 p.m. OK GNU C++11 TESTS 141 15 2048000 1800
34773636 srijan123j C Jan. 31, 2018, 4:48 p.m. OK GNU C++14 TESTS 141 15 1945600 1800
34796999 Water_Sheep C Feb. 1, 2018, 9:24 a.m. OK GNU C++14 TESTS 141 15 1945600 1800
34655287 Fairuzi10 C Jan. 29, 2018, 8:22 a.m. OK GNU C++14 TESTS 141 15 1945600 1800
34652425 sugarrr C Jan. 29, 2018, 6:37 a.m. OK GNU C++14 TESTS 141 15 1945600 1800
34641552 Prime21 C Jan. 28, 2018, 6:54 p.m. OK GNU C++14 TESTS 141 15 1945600 1800
34625403 Sorsweet C Jan. 28, 2018, 6:37 a.m. OK GNU C++14 TESTS 141 15 1945600 1800
34598061 BobHuang C Jan. 27, 2018, 7:41 a.m. OK GNU C++14 TESTS 141 15 1945600 1800
35914812 kr_abhinav C March 4, 2018, 9:25 a.m. OK GNU C++14 TESTS 141 15 1945600 1800
34571708 asusp4s333 C Jan. 26, 2018, 9:56 a.m. OK GNU C++14 TESTS 141 15 1945600 1800
34712281 abhinavchoudhary1997 C Jan. 30, 2018, 2:33 p.m. OK GNU C++14 TESTS 141 15 1945600 1800
35823100 InvUsr C March 2, 2018, 1:50 a.m. OK GNU C++17 TESTS 141 15 5939200 1800
66244682 sammithkanur C Dec. 3, 2019, 7:51 p.m. OK GNU C++17 TESTS 141 31 0 1800
69648427 Magicdog_Jo C Jan. 28, 2020, 3:29 a.m. OK GNU C++17 TESTS 141 31 0 1800
69225232 vjudge5 C Jan. 21, 2020, 6:54 a.m. OK GNU C++17 TESTS 141 31 0 1800
58170750 vjudge5 C Aug. 2, 2019, 11:12 a.m. OK GNU C++17 TESTS 141 31 0 1800
56241236 Gediminas C June 28, 2019, 6:32 p.m. OK GNU C++17 TESTS 141 31 0 1800
52906967 vjudge5 C April 17, 2019, 12:57 p.m. OK GNU C++17 TESTS 141 31 0 1800
52906918 G_bg C April 17, 2019, 12:56 p.m. OK GNU C++17 TESTS 141 31 0 1800
52897215 G_bg C April 17, 2019, 9:29 a.m. OK GNU C++17 TESTS 141 31 0 1800
69227891 vjudge2 C Jan. 21, 2020, 8:08 a.m. OK GNU C++17 TESTS 141 31 102400 1800
34800782 d.kochetov C Feb. 1, 2018, 11:44 a.m. OK GNU C++17 Diagnostics TESTS 141 998 104960000 1800
34484677 Near_mj C Jan. 23, 2018, 2:05 p.m. OK GNU C++17 Diagnostics TESTS 141 998 109875200 1800
34391505 megaspazz C Jan. 20, 2018, 8:47 p.m. OK Go TESTS 141 31 27443200 1800
61761071 Martynas C Oct. 3, 2019, 7:07 a.m. OK Go TESTS 141 46 4505600 1800
34762295 sl0th C Jan. 31, 2018, 2:17 p.m. OK Haskell TESTS 141 218 53248000 1800
68105007 chojh1222 C Jan. 3, 2020, 6:30 a.m. OK Java 8 TESTS 141 124 0 1800
51161641 hongquanntct C March 11, 2019, 12:38 p.m. OK Java 8 TESTS 141 124 0 1800
55599270 Ahmed_Diab C June 15, 2019, 5:07 p.m. OK Java 8 TESTS 141 124 4812800 1800
50509219 wadissimo C Feb. 25, 2019, 10:07 p.m. OK Java 8 TESTS 141 124 5017600 1800
34414882 botdes C Jan. 21, 2018, 1:13 p.m. OK Java 8 TESTS 141 124 20684800 1800
34388997 Jeel_Vaishnav C Jan. 20, 2018, 6:26 p.m. OK Java 8 TESTS 141 124 20889600 1800
35163740 juan.valencia C Feb. 11, 2018, 9:01 p.m. OK Java 8 TESTS 141 139 20684800 1800
34443799 coderbond007 C Jan. 22, 2018, 10:56 a.m. OK Java 8 TESTS 141 139 20684800 1800
34418949 Azat_Yusupov C Jan. 21, 2018, 3:50 p.m. OK Java 8 TESTS 141 139 20684800 1800
60812533 ISSAM_LAKOUAM C Sept. 18, 2019, 6:15 p.m. OK Java 8 TESTS 141 140 0 1800
37679616 og.kostya C April 28, 2018, 8:13 a.m. OK Mono C# TESTS 141 61 15974400 1800
34407516 kuuso C Jan. 21, 2018, 9:20 a.m. OK Mono C# TESTS 141 77 31539200 1800
34392532 awesomeday C Jan. 20, 2018, 9:09 p.m. OK MS C# TESTS 141 62 17305600 1800
34471351 fr0st C Jan. 23, 2018, 7:01 a.m. OK MS C# TESTS 141 77 19763200 1800
34415009 renadeen C Jan. 21, 2018, 1:18 p.m. OK MS C# TESTS 141 265 11776000 1800
34944732 Maffka C Feb. 5, 2018, 1:06 p.m. OK MS C++ TESTS 141 15 6041600 1800
34406681 swenyoo C Jan. 21, 2018, 8:51 a.m. OK MS C++ TESTS 141 15 6144000 1800
34412900 PanZverski C Jan. 21, 2018, 12:06 p.m. OK MS C++ TESTS 141 15 6246400 1800
34392808 Taube C Jan. 20, 2018, 9:18 p.m. OK MS C++ TESTS 141 15 10137600 1800
58165316 vjudge2 C Aug. 2, 2019, 8:50 a.m. OK MS C++ TESTS 141 31 0 1800
56144308 vjudge3 C June 27, 2019, 5:21 a.m. OK MS C++ TESTS 141 31 4096000 1800
34619922 OsamaNabih268 C Jan. 28, 2018, 12:03 a.m. OK MS C++ TESTS 141 31 10137600 1800
34428558 kingmoshe C Jan. 22, 2018, 1:30 a.m. OK MS C++ TESTS 141 31 10649600 1800
34451280 ys1468362286 C Jan. 22, 2018, 2:56 p.m. OK MS C++ TESTS 141 31 18432000 1800
34451507 vjudge5 C Jan. 22, 2018, 3:03 p.m. OK MS C++ TESTS 141 31 18432000 1800
62116360 vjudge4 C Oct. 8, 2019, 1:29 p.m. OK MS C++ 2017 TESTS 141 46 8089600 1800
49400603 pill C Feb. 3, 2019, 2:34 p.m. OK MS C++ 2017 TESTS 141 46 8499200 1800
56479025 AdamYuan C July 3, 2019, 3:05 p.m. OK MS C++ 2017 TESTS 141 77 16281600 1800
34659051 belkka C Jan. 29, 2018, 11:22 a.m. OK PyPy 2 TESTS 141 343 23244800 1800
36942180 nealzane C April 4, 2018, 7:12 a.m. OK PyPy 2 TESTS 141 358 23859200 1800
34578111 belkka C Jan. 26, 2018, 2:15 p.m. OK PyPy 2 TESTS 141 732 29081600 1800
34577975 belkka C Jan. 26, 2018, 2:11 p.m. OK PyPy 2 TESTS 141 810 30412800 1800
34577939 belkka C Jan. 26, 2018, 2:09 p.m. OK PyPy 2 TESTS 141 826 30105600 1800
34578007 belkka C Jan. 26, 2018, 2:11 p.m. OK PyPy 2 TESTS 141 826 30310400 1800
34398730 ManasG C Jan. 21, 2018, 3:20 a.m. OK PyPy 2 TESTS 141 966 31232000 1800
34418292 surokpro C Jan. 21, 2018, 3:21 p.m. OK PyPy 3 TESTS 141 139 25395200 1800
54161420 homoeconomicus C May 15, 2019, 6:44 a.m. OK PyPy 3 TESTS 141 171 6041600 1800
41433564 nadchu C Aug. 10, 2018, 1:49 p.m. OK PyPy 3 TESTS 141 265 11980800 1800
34658115 belkka C Jan. 29, 2018, 10:45 a.m. OK PyPy 3 TESTS 141 421 23756800 1800
34493312 joshi.sravan C Jan. 23, 2018, 6:51 p.m. OK Python 2 TESTS 141 452 49561600 1800
61416195 vjudge5 C Sept. 28, 2019, 10:20 a.m. OK Python 2 TESTS 141 655 102400 1800
34391942 WNG C Jan. 20, 2018, 8:57 p.m. OK Python 2 TESTS 141 748 14745600 1800
34649918 orailly C Jan. 29, 2018, 4:53 a.m. OK Python 3 TESTS 141 233 5632000 1800
41726218 rishabh7699 C Aug. 17, 2018, 7:12 p.m. OK Python 3 TESTS 141 374 102400 1800
34392334 Gerbuz C Jan. 20, 2018, 9:05 p.m. OK Python 3 TESTS 141 405 19968000 1800
34395357 Kelang C Jan. 21, 2018, 12:13 a.m. OK Python 3 TESTS 141 467 6451200 1800
34648167 orailly C Jan. 29, 2018, 2:51 a.m. OK Python 3 TESTS 141 592 31641600 1800
34648085 orailly C Jan. 29, 2018, 2:46 a.m. OK Python 3 TESTS 141 592 31641600 1800
34400552 Savit_Gupta C Jan. 21, 2018, 4:46 a.m. OK Python 3 TESTS 141 654 18329600 1800
34428114 denny_sem C Jan. 22, 2018, 1:07 a.m. OK Python 3 TESTS 141 717 20889600 1800
34423227 shogun C Jan. 21, 2018, 7:15 p.m. OK Python 3 TESTS 141 717 46182400 1800
34620233 yumtam C Jan. 28, 2018, 12:39 a.m. OK Python 3 TESTS 141 779 5632000 1800
34643675 limed C Jan. 28, 2018, 9 p.m. OK Scala TESTS 141 623 46182400 1800

remove filters

Back to search problems