Codeforces Round 660 (Div. 2)

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
1388 Codeforces Round 660 (Div. 2) FINISHED False 7200 141060263 July 30, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 22384 ) B Captain Flint and a Long Voyage PROGRAMMING greedy math 1000

B"Captain Flint and his crew keep heading to a savage shore of Byteland for several months already, drinking rum and telling stories. In such moments uncle Bogdan often remembers his nephew Denis. Today, he has told a story about how Denis helped him to come up with an interesting problem and asked the crew to solve it. In the beginning, uncle Bogdan wrote on a board a positive integer x consisting of n digits. After that, he wiped out x and wrote integer k instead, which was the concatenation of binary representations of digits x consists of (without leading zeroes). For example, let x = 729 , then k = 111101001 (since 7 = 111 , 2 = 10 , 9 = 1001 ). After some time, uncle Bogdan understood that he doesn't know what to do with k and asked Denis to help. Denis decided to wipe last n digits of k and named the new number as r . As a result, Denis proposed to find such integer x of length n that r (as number) is maximum possible. If there are multiple valid x then Denis is interested in the minimum one. All crew members, including captain Flint himself, easily solved the task. All, except cabin boy Kostya, who was too drunk to think straight. But what about you? Note: in this task, we compare integers ( x or k ) as numbers (despite what representations they are written in), so 729 < 1999 or 111 < 1000 . The first line contains a single integer t ( 1 <= t <= 1000 ) -- the number of test cases. Next t lines contain test cases -- one per test case. The one and only line of each test case contains the single integer n ( 1 <= n <= 10^5 ) -- the length of the integer x you need to find. It's guaranteed that the sum of n from all test cases doesn't exceed 2 cdot 10^5 . For each test case, print the minimum integer x of length n such that obtained by Denis number r is maximum p"...

Tutorials

Codeforces Round #660 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
89300929 MemoryDump B Aug. 8, 2020, 3:11 a.m. OK FPC TESTS 8 31 4403200 1000
88926024 iam43 B Aug. 5, 2020, 7:45 a.m. OK FPC TESTS 8 545 3379200 1000
89648171 HQT2003 B Aug. 12, 2020, 11:58 a.m. OK FPC TESTS 8 546 3379200 1000
88794438 luogu_bot1 B Aug. 3, 2020, 11:40 a.m. OK FPC TESTS 8 561 3481600 1000
88914189 KCSB B Aug. 5, 2020, 4:12 a.m. OK GNU C11 TESTS 8 31 3788800 1000
88746888 _noob_coder B Aug. 2, 2020, 4:21 p.m. OK GNU C11 TESTS 8 31 3788800 1000
89654601 mishrapraveen763 B Aug. 12, 2020, 1:29 p.m. OK GNU C11 TESTS 8 31 3891200 1000
89118080 nitinkumar1729 B Aug. 6, 2020, 12:04 p.m. OK GNU C11 TESTS 8 46 81920000 1000
89517218 Mahdee987 B Aug. 10, 2020, 2:19 p.m. OK GNU C11 TESTS 8 624 3686400 1000
88746360 8918093137abc B Aug. 2, 2020, 4:13 p.m. OK GNU C11 TESTS 8 624 3686400 1000
88792303 AzmayenSabil B Aug. 3, 2020, 11:06 a.m. OK GNU C11 TESTS 8 624 3686400 1000
89305559 Ver0n1ca B Aug. 8, 2020, 4:57 a.m. OK GNU C11 TESTS 8 639 3686400 1000
89351995 _shiv_ B Aug. 8, 2020, 4:54 p.m. OK GNU C11 TESTS 8 639 3686400 1000
89287673 Xxamxam B Aug. 7, 2020, 7:24 p.m. OK GNU C11 TESTS 8 639 3686400 1000
91174871 HLJD_HappyGuy1290 B Aug. 28, 2020, 2:30 a.m. OK GNU C++11 TESTS 8 15 0 1000
89776483 S-X-Y B Aug. 13, 2020, 8:39 a.m. OK GNU C++11 TESTS 8 15 0 1000
91635129 hjh B Sept. 2, 2020, 11:20 a.m. OK GNU C++11 TESTS 8 15 0 1000
89853779 chenjianian2007 B Aug. 14, 2020, 8:22 a.m. OK GNU C++11 TESTS 8 15 0 1000
91030036 SharpEdged B Aug. 26, 2020, 7:48 a.m. OK GNU C++11 TESTS 8 15 102400 1000
89870390 Adelard B Aug. 14, 2020, 12:32 p.m. OK GNU C++11 TESTS 8 15 204800 1000
89737644 Rejoan B Aug. 12, 2020, 6:51 p.m. OK GNU C++11 TESTS 8 15 307200 1000
89495394 bagpipe B Aug. 10, 2020, 8:57 a.m. OK GNU C++11 TESTS 8 15 3686400 1000
89348061 mwlc B Aug. 8, 2020, 3:46 p.m. OK GNU C++11 TESTS 8 15 3686400 1000
89090152 ciao_sora B Aug. 6, 2020, 5:51 a.m. OK GNU C++11 TESTS 8 15 3686400 1000
91261290 Harshit21 B Aug. 29, 2020, 6:32 a.m. OK GNU C++14 TESTS 8 15 307200 1000
89519871 prakhar801 B Aug. 10, 2020, 2:53 p.m. OK GNU C++14 TESTS 8 15 3993600 1000
88744077 eZZZio B Aug. 2, 2020, 3:42 p.m. OK GNU C++14 TESTS 8 15 3993600 1000
89088314 harshverma63 B Aug. 6, 2020, 5:16 a.m. OK GNU C++14 TESTS 8 15 3993600 1000
88870964 S_V_Akash3337 B Aug. 4, 2020, 12:44 p.m. OK GNU C++14 TESTS 8 15 3993600 1000
88859308 Ans_31 B Aug. 4, 2020, 9:43 a.m. OK GNU C++14 TESTS 8 15 3993600 1000
90403284 Mr_Bin B Aug. 19, 2020, 3:44 p.m. OK GNU C++14 TESTS 8 30 0 1000
90325541 thisIsJustaSmurf B Aug. 18, 2020, 4 p.m. OK GNU C++14 TESTS 8 30 0 1000
90387386 ajinkya1p3 B Aug. 19, 2020, 12:23 p.m. OK GNU C++14 TESTS 8 30 0 1000
90423965 always_a_newbie B Aug. 19, 2020, 11:34 p.m. OK GNU C++14 TESTS 8 30 0 1000
88775085 M_Erfan_S B Aug. 3, 2020, 6:04 a.m. OK GNU C++17 TESTS 8 15 3788800 1000
88910095 richenyunqi B Aug. 5, 2020, 2:17 a.m. OK GNU C++17 TESTS 8 15 3891200 1000
89135134 nvatuan B Aug. 6, 2020, 3:08 p.m. OK GNU C++17 TESTS 8 15 3891200 1000
88795766 I_I_I B Aug. 3, 2020, 11:59 a.m. OK GNU C++17 TESTS 8 15 3993600 1000
89337812 firelordZuko B Aug. 8, 2020, 1:26 p.m. OK GNU C++17 TESTS 8 15 3993600 1000
91442514 solve123 B Aug. 30, 2020, 10:26 p.m. OK GNU C++17 TESTS 8 15 3993600 1000
91227709 jabir_joyed9494 B Aug. 28, 2020, 4:25 p.m. OK GNU C++17 TESTS 8 30 0 1000
91670003 vjudge2 B Sept. 2, 2020, 7:13 p.m. OK GNU C++17 TESTS 8 30 0 1000
91605142 DYf3244 B Sept. 2, 2020, 1:33 a.m. OK GNU C++17 TESTS 8 30 0 1000
91267658 bhatiakartik10 B Aug. 29, 2020, 8:15 a.m. OK GNU C++17 TESTS 8 30 0 1000
91525831 uruuru8888 B Aug. 31, 2020, 10:02 p.m. OK GNU C++17 (64) TESTS 8 15 307200 1000
91172812 Skoz B Aug. 28, 2020, 1:06 a.m. OK GNU C++17 (64) TESTS 8 15 307200 1000
89566737 S_A_P B Aug. 11, 2020, 9:54 a.m. OK GNU C++17 (64) TESTS 8 15 4198400 1000
89488273 sharrad99 B Aug. 10, 2020, 7:10 a.m. OK GNU C++17 (64) TESTS 8 15 4505600 1000
89575117 motoras B Aug. 11, 2020, 12:08 p.m. OK GNU C++17 (64) TESTS 8 15 4608000 1000
89293371 yamate11 B Aug. 7, 2020, 10:16 p.m. OK GNU C++17 (64) TESTS 8 15 4608000 1000
89165097 clearlove20 B Aug. 7, 2020, 1:40 a.m. OK GNU C++17 (64) TESTS 8 15 4608000 1000
90531771 m.basic B Aug. 21, 2020, 12:37 p.m. OK GNU C++17 (64) TESTS 8 15 4608000 1000
89339442 conan1024hao B Aug. 8, 2020, 1:47 p.m. OK GNU C++17 (64) TESTS 8 15 4608000 1000
89398949 MotoForces B Aug. 9, 2020, 12:27 p.m. OK GNU C++17 (64) TESTS 8 15 4710400 1000
88830297 proba B Aug. 3, 2020, 9:54 p.m. OK Go TESTS 8 46 10649600 1000
89326692 swelf B Aug. 8, 2020, 10:30 a.m. OK Go TESTS 8 1169 16281600 1000
89158851 thetazero B Aug. 6, 2020, 9:06 p.m. OK Go TESTS 8 1606 15974400 1000
89115545 Andrey_R B Aug. 6, 2020, 11:35 a.m. OK Haskell TESTS 8 15 11571200 1000
88730500 Weeeee B Aug. 2, 2020, 12:25 p.m. OK Haskell TESTS 8 15 11571200 1000
88905311 codingIsFun1234 B Aug. 4, 2020, 10:30 p.m. OK Java 11 TESTS 8 170 23756800 1000
89069411 shivam_bang B Aug. 5, 2020, 8:03 p.m. OK Java 11 TESTS 8 171 23756800 1000
88879088 dkcs B Aug. 4, 2020, 2:24 p.m. OK Java 11 TESTS 8 171 23756800 1000
88877928 lav_7 B Aug. 4, 2020, 2:10 p.m. OK Java 11 TESTS 8 171 23756800 1000
88791651 jayesh_patil B Aug. 3, 2020, 10:55 a.m. OK Java 11 TESTS 8 171 23756800 1000
89315264 In_The_Name_Of_Love B Aug. 8, 2020, 7:33 a.m. OK Java 11 TESTS 8 171 23859200 1000
88869777 anshum_it_is B Aug. 4, 2020, 12:30 p.m. OK Java 11 TESTS 8 171 24064000 1000
88879630 gladwin_rojer B Aug. 4, 2020, 2:30 p.m. OK Java 11 TESTS 8 186 23756800 1000
88730375 JatinYadav B Aug. 2, 2020, 12:23 p.m. OK Java 11 TESTS 8 186 23859200 1000
90799453 kartikeysemwal B Aug. 24, 2020, 6:09 a.m. OK Java 11 TESTS 8 186 24371200 1000
91649082 jon_snow_1999 B Sept. 2, 2020, 2:24 p.m. OK Java 8 TESTS 8 108 0 1000
88840272 himmi_221 B Aug. 4, 2020, 4:35 a.m. OK Java 8 TESTS 8 108 20377600 1000
88814253 revanthreddy85 B Aug. 3, 2020, 4:02 p.m. OK Java 8 TESTS 8 108 20480000 1000
90820198 vjudge1 B Aug. 24, 2020, 11:22 a.m. OK Java 8 TESTS 8 108 20480000 1000
91596228 partizan22 B Sept. 1, 2020, 7:37 p.m. OK Java 8 TESTS 8 109 0 1000
91055188 antonskubiiev B Aug. 26, 2020, 1:16 p.m. OK Java 8 TESTS 8 109 0 1000
90177046 M1lena B Aug. 16, 2020, 8:52 p.m. OK Java 8 TESTS 8 109 0 1000
89286592 rpn2142 B Aug. 7, 2020, 7:04 p.m. OK Java 8 TESTS 8 109 20377600 1000
89362942 Samez B Aug. 8, 2020, 8:56 p.m. OK Java 8 TESTS 8 109 20377600 1000
89099575 alpha__18 B Aug. 6, 2020, 7:59 a.m. OK Java 8 TESTS 8 109 20377600 1000
88853878 timurtibeyev B Aug. 4, 2020, 8:22 a.m. OK Kotlin TESTS 8 124 20480000 1000
89532821 wbars B Aug. 10, 2020, 7:39 p.m. OK Kotlin TESTS 8 779 21299200 1000
88738387 Mosyagin B Aug. 2, 2020, 2:27 p.m. OK Mono C# TESTS 8 61 9830400 1000
89608884 Qapples B Aug. 11, 2020, 8:59 p.m. OK Mono C# TESTS 8 62 13721600 1000
89841034 azukun B Aug. 14, 2020, 4:42 a.m. OK Mono C# TESTS 8 77 3584000 1000
89151343 Xtreemist B Aug. 6, 2020, 6:29 p.m. OK Mono C# TESTS 8 1419 15769600 1000
91360075 aueoi B Aug. 30, 2020, 2:45 p.m. OK Mono C# TESTS 8 1450 15769600 1000
89356909 Lordan B Aug. 8, 2020, 6:29 p.m. OK Mono C# TESTS 8 1746 10240000 1000
88807750 emhraca B Aug. 3, 2020, 2:34 p.m. OK Mono C# TESTS 8 1871 15974400 1000
89398411 vjudge4 B Aug. 9, 2020, 12:18 p.m. OK MS C++ TESTS 8 46 4096000 1000
89397782 vjudge2 B Aug. 9, 2020, 12:07 p.m. OK MS C++ TESTS 8 46 4096000 1000
88730191 Tayga B Aug. 2, 2020, 12:20 p.m. OK MS C++ TESTS 8 93 4096000 1000
88775619 uc125 B Aug. 3, 2020, 6:14 a.m. OK MS C++ 2017 TESTS 8 30 3891200 1000
89160732 raya_yesayan B Aug. 6, 2020, 10:18 p.m. OK MS C++ 2017 TESTS 8 30 3993600 1000
90042188 elimak B Aug. 15, 2020, 7:04 p.m. OK MS C++ 2017 TESTS 8 31 0 1000
89781843 Mad112233 B Aug. 13, 2020, 9:51 a.m. OK MS C++ 2017 TESTS 8 31 102400 1000
89824802 HADUKIN B Aug. 13, 2020, 7:48 p.m. OK MS C++ 2017 TESTS 8 31 307200 1000
88736810 Alzamer B Aug. 2, 2020, 2:04 p.m. OK MS C++ 2017 TESTS 8 31 3686400 1000
88747422 sahajagrawal43 B Aug. 2, 2020, 4:28 p.m. OK MS C++ 2017 TESTS 8 31 3686400 1000
88775922 uc125 B Aug. 3, 2020, 6:20 a.m. OK MS C++ 2017 TESTS 8 31 3891200 1000
89406664 ducluongtran9121 B Aug. 9, 2020, 2:31 p.m. OK MS C++ 2017 TESTS 8 31 3993600 1000
89359846 rikein12 B Aug. 8, 2020, 7:31 p.m. OK MS C++ 2017 TESTS 8 31 3993600 1000
90220910 tutai B Aug. 17, 2020, 11:08 a.m. OK Node.js TESTS 8 124 10956800 1000
89311118 Andrey_R B Aug. 8, 2020, 6:29 a.m. OK Perl TESTS 8 109 6144000 1000
89376775 pablood B Aug. 9, 2020, 6:08 a.m. OK PHP TESTS 8 31 6041600 1000
89631437 yumtam B Aug. 12, 2020, 7:41 a.m. OK PyPy 2 TESTS 8 109 23961600 1000
88880548 thuutin B Aug. 4, 2020, 2:42 p.m. OK PyPy 2 TESTS 8 124 25804800 1000
89394280 Gauranshu B Aug. 9, 2020, 11:07 a.m. OK PyPy 3 TESTS 8 124 20992000 1000
90072749 Tiwariaadarsh B Aug. 16, 2020, 9:52 a.m. OK PyPy 3 TESTS 8 139 819200 1000
91198064 silversilva B Aug. 28, 2020, 10:08 a.m. OK PyPy 3 TESTS 8 139 921600 1000
88841030 Ankit-Ch B Aug. 4, 2020, 4:52 a.m. OK PyPy 3 TESTS 8 139 21094400 1000
90899272 KuzlyaevNikita B Aug. 25, 2020, 12:34 p.m. OK PyPy 3 TESTS 8 140 921600 1000
90256747 Steve-B B Aug. 17, 2020, 6:38 p.m. OK PyPy 3 TESTS 8 140 921600 1000
88921546 Akash_kunwar B Aug. 5, 2020, 6:34 a.m. OK PyPy 3 TESTS 8 140 20992000 1000
88845912 UnGemm B Aug. 4, 2020, 6:26 a.m. OK PyPy 3 TESTS 8 140 20992000 1000
90716219 svobodiannikov B Aug. 22, 2020, 8:37 p.m. OK PyPy 3 TESTS 8 140 21094400 1000
90533802 adityasharma B Aug. 21, 2020, 1:06 p.m. OK PyPy 3 TESTS 8 140 21094400 1000
89311533 ShadhinAshraf B Aug. 8, 2020, 6:36 a.m. OK Python 2 TESTS 8 155 6758400 1000
89829098 Bluefish2 B Aug. 13, 2020, 9:59 p.m. OK Python 2 TESTS 8 170 204800 1000
90030027 tkhabia2303 B Aug. 15, 2020, 3:24 p.m. OK Python 3 TESTS 8 93 204800 1000
91166927 a.nurhonov B Aug. 27, 2020, 8:40 p.m. OK Python 3 TESTS 8 93 307200 1000
90414223 prmangal B Aug. 19, 2020, 6:31 p.m. OK Python 3 TESTS 8 93 307200 1000
88932511 sam.garg2206.sg B Aug. 5, 2020, 9:27 a.m. OK Python 3 TESTS 8 93 6860800 1000
88916227 suchir B Aug. 5, 2020, 5 a.m. OK Python 3 TESTS 8 93 6860800 1000
88882281 ankitsharmamrj B Aug. 4, 2020, 3:02 p.m. OK Python 3 TESTS 8 93 6860800 1000
91416443 sayuyere B Aug. 30, 2020, 4:28 p.m. OK Python 3 TESTS 8 93 6963200 1000
89185438 Tanvir752 B Aug. 7, 2020, 7:54 a.m. OK Python 3 TESTS 8 93 6963200 1000
88889532 devanshmishra111 B Aug. 4, 2020, 4:39 p.m. OK Python 3 TESTS 8 93 6963200 1000
88862441 afran.mridha B Aug. 4, 2020, 10:31 a.m. OK Python 3 TESTS 8 93 6963200 1000
88906594 Stevie_G B Aug. 4, 2020, 11:44 p.m. OK Ruby TESTS 8 545 48844800 1000
89057126 Andrey_R B Aug. 5, 2020, 5:20 p.m. OK Ruby TESTS 8 561 49664000 1000
89393792 dataisland B Aug. 9, 2020, 10:58 a.m. OK Rust TESTS 8 46 3788800 1000
88865833 Strorkis B Aug. 4, 2020, 11:20 a.m. OK Rust TESTS 8 46 3788800 1000
89628574 terraformer B Aug. 12, 2020, 6:58 a.m. OK Rust TESTS 8 61 8089600 1000

remove filters

Back to search problems