Codeforces Round 629 (Div. 3)

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
1328 Codeforces Round 629 (Div. 3) FINISHED False 7200 152119511 March 26, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 29559 ) B K-th Beautiful String PROGRAMMING combinatorics implementation math 1300

B"For the given integer n ( n > 2 ) let's write down all the strings of length n which contain n-2 letters 'a' and two letters 'b' in lexicographical (alphabetical) order. Recall that the string s of length n is lexicographically less than string t of length n , if there exists such i ( 1 <= i <= n ), that s_i < t_i , and for any j ( 1 <= j < i ) s_j = t_j . The lexicographic comparison of strings is implemented by the operator < in modern programming languages. For example, if n=5 the strings are (the order does matter): It is easy to show that such a list of strings will contain exactly frac{n cdot (n-1)}{2} strings. You are given n ( n > 2 ) and k ( 1 <= k <= frac{n cdot (n-1)}{2} ). Print the k -th string from the list. The input contains one or more test cases. The first line contains one integer t ( 1 <= t <= 10^4 ) -- the number of test cases in the test. Then t test cases follow. Each test case is written on the the separate line containing two integers n and k ( 3 <= n <= 10^5, 1 <= k <= min(2 cdot10^9, frac{n cdot (n-1)}{2}) . The sum of values n over all test cases in the test doesn't exceed 10^5 . For each test case print the k -th string from the list of all described above strings of length n . Strings in the list are sorted lexicographically (alphabetically). "...

Tutorials

75246

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
74586942 Madalina_Chirpicinic B March 27, 2020, 5:55 p.m. OK FPC TESTS 17 327 0 1300
74520597 sameer-shrestha B March 27, 2020, 2:59 a.m. OK GNU C11 TESTS 17 30 0 1300
74487893 Beku.sh B March 26, 2020, 5:10 p.m. OK GNU C11 TESTS 17 30 0 1300
74491627 ganpat_98 B March 26, 2020, 5:39 p.m. OK GNU C11 TESTS 17 30 0 1300
74522059 ExCord B March 27, 2020, 3:30 a.m. OK GNU C11 TESTS 17 31 0 1300
74508296 Shivankthakur B March 26, 2020, 9:10 p.m. OK GNU C11 TESTS 17 62 102400 1300
74596493 Stranger321 B March 27, 2020, 8:03 p.m. OK GNU C11 TESTS 17 62 102400 1300
74496240 NormanIPN B March 26, 2020, 6:23 p.m. OK GNU C11 TESTS 17 62 102400 1300
74546217 preetam88 B March 27, 2020, 10:15 a.m. OK GNU C11 TESTS 17 78 102400 1300
74570536 Alperen_T B March 27, 2020, 2:49 p.m. OK GNU C11 TESTS 17 327 0 1300
74535883 vjudge2 B March 27, 2020, 8:14 a.m. OK GNU C11 TESTS 17 342 102400 1300
74475828 lld2000 B March 26, 2020, 4:24 p.m. OK GNU C++11 TESTS 17 30 0 1300
74521822 HoneyLemon B March 27, 2020, 3:25 a.m. OK GNU C++11 TESTS 17 30 0 1300
74521139 HoneyLemon B March 27, 2020, 3:10 a.m. OK GNU C++11 TESTS 17 30 0 1300
74514440 TYGZ B March 27, 2020, midnight OK GNU C++11 TESTS 17 30 0 1300
74519713 xrdrsp0 B March 27, 2020, 2:38 a.m. OK GNU C++11 TESTS 17 30 0 1300
74523363 HoneyLemon B March 27, 2020, 3:59 a.m. OK GNU C++11 TESTS 17 30 0 1300
74517187 ACMonster B March 27, 2020, 1:25 a.m. OK GNU C++11 TESTS 17 30 102400 1300
74553854 20164366 B March 27, 2020, 11:45 a.m. OK GNU C++11 TESTS 17 30 409600 1300
74576429 Xuchenyang B March 27, 2020, 3:52 p.m. OK GNU C++11 TESTS 17 30 819200 1300
74566348 coolj70 B March 27, 2020, 2:07 p.m. OK GNU C++11 TESTS 17 31 0 1300
74469643 abhittal B March 26, 2020, 4:13 p.m. OK GNU C++14 TESTS 17 15 0 1300
74511708 fc5555 B March 26, 2020, 10:32 p.m. OK GNU C++14 TESTS 17 15 0 1300
74503742 AsishKM B March 26, 2020, 7:55 p.m. OK GNU C++14 TESTS 17 15 102400 1300
74502582 MEGA-MIND B March 26, 2020, 7:39 p.m. OK GNU C++14 TESTS 17 15 102400 1300
74562671 utk-dev B March 27, 2020, 1:31 p.m. OK GNU C++14 TESTS 17 15 102400 1300
74590813 naman238 B March 27, 2020, 6:41 p.m. OK GNU C++14 TESTS 17 15 102400 1300
74504647 accesss_denied B March 26, 2020, 8:08 p.m. OK GNU C++14 TESTS 17 15 307200 1300
74594030 18ucs102 B March 27, 2020, 7:25 p.m. OK GNU C++14 TESTS 17 15 307200 1300
74545094 Gor1ch B March 27, 2020, 10:03 a.m. OK GNU C++14 TESTS 17 15 307200 1300
74496379 swapnilmarkhedkar B March 26, 2020, 6:25 p.m. OK GNU C++14 TESTS 17 15 307200 1300
74566711 hppy B March 27, 2020, 2:11 p.m. OK GNU C++17 TESTS 17 15 0 1300
74552943 Omerta B March 27, 2020, 11:34 a.m. OK GNU C++17 TESTS 17 15 102400 1300
74566379 LowR B March 27, 2020, 2:08 p.m. OK GNU C++17 TESTS 17 15 102400 1300
74587866 aabdelhafeez55 B March 27, 2020, 6:05 p.m. OK GNU C++17 TESTS 17 15 102400 1300
74578947 NaMiTJ B March 27, 2020, 4:21 p.m. OK GNU C++17 TESTS 17 15 102400 1300
74511901 shikhar2817 B March 26, 2020, 10:38 p.m. OK GNU C++17 TESTS 17 15 102400 1300
74471621 Medeowex B March 26, 2020, 4:17 p.m. OK GNU C++17 TESTS 17 15 102400 1300
74540457 mechashadow B March 27, 2020, 9:11 a.m. OK GNU C++17 TESTS 17 15 307200 1300
74540070 k0ndr B March 27, 2020, 9:06 a.m. OK GNU C++17 TESTS 17 15 307200 1300
74498095 Ugnwd B March 26, 2020, 6:43 p.m. OK GNU C++17 TESTS 17 15 307200 1300
74490616 nile_101 B March 26, 2020, 5:29 p.m. OK GNU C++17 (64) TESTS 17 15 102400 1300
74502690 progra123 B March 26, 2020, 7:41 p.m. OK GNU C++17 (64) TESTS 17 15 102400 1300
74501813 nikitagolu8ev B March 26, 2020, 7:29 p.m. OK GNU C++17 (64) TESTS 17 15 102400 1300
74486207 sharmajatin741 B March 26, 2020, 5 p.m. OK GNU C++17 (64) TESTS 17 15 307200 1300
74536012 vjudge2 B March 27, 2020, 8:16 a.m. OK GNU C++17 (64) TESTS 17 30 0 1300
74518014 sugarrr B March 27, 2020, 1:50 a.m. OK GNU C++17 (64) TESTS 17 30 0 1300
74504206 MisterGu B March 26, 2020, 8:02 p.m. OK GNU C++17 (64) TESTS 17 30 0 1300
74478294 Ari B March 26, 2020, 4:28 p.m. OK GNU C++17 (64) TESTS 17 30 307200 1300
74582728 Vax B March 27, 2020, 5:07 p.m. OK GNU C++17 (64) TESTS 17 31 0 1300
74521750 krazy B March 27, 2020, 3:24 a.m. OK GNU C++17 (64) TESTS 17 31 0 1300
74518964 synapse B March 27, 2020, 2:18 a.m. OK Go TESTS 17 31 102400 1300
74564456 nsaeki B March 27, 2020, 1:48 p.m. OK Go TESTS 17 31 102400 1300
74564922 nsaeki B March 27, 2020, 1:53 p.m. OK Go TESTS 17 46 102400 1300
74506554 anastos B March 26, 2020, 8:40 p.m. OK Haskell TESTS 17 62 102400 1300
74512991 TempVariable B March 26, 2020, 11:13 p.m. OK Java 11 TESTS 17 186 0 1300
74501352 thefreakingsal B March 26, 2020, 7:23 p.m. OK Java 11 TESTS 17 187 0 1300
74469758 aswals8991 B March 26, 2020, 4:13 p.m. OK Java 11 TESTS 17 187 0 1300
74553291 Shaman_King B March 27, 2020, 11:38 a.m. OK Java 11 TESTS 17 202 0 1300
74501984 singhdhanwant B March 26, 2020, 7:31 p.m. OK Java 11 TESTS 17 202 0 1300
74498861 WaheguruAnurag B March 26, 2020, 6:52 p.m. OK Java 11 TESTS 17 202 0 1300
74471358 polyakoff B March 26, 2020, 4:16 p.m. OK Java 11 TESTS 17 202 0 1300
74487499 D2XP B March 26, 2020, 5:07 p.m. OK Java 11 TESTS 17 218 0 1300
74474784 bharath281 B March 26, 2020, 4:22 p.m. OK Java 11 TESTS 17 218 0 1300
74543227 kyaKarogeJANkar B March 27, 2020, 9:42 a.m. OK Java 11 TESTS 17 233 0 1300
74561835 amolpratap007 B March 27, 2020, 1:22 p.m. OK Java 8 TESTS 17 109 0 1300
74556184 Whiplash99 B March 27, 2020, 12:18 p.m. OK Java 8 TESTS 17 124 0 1300
74595896 marcose18 B March 27, 2020, 7:54 p.m. OK Java 8 TESTS 17 124 0 1300
74577746 up_surge B March 27, 2020, 4:07 p.m. OK Java 8 TESTS 17 124 0 1300
74562898 katieya B March 27, 2020, 1:33 p.m. OK Java 8 TESTS 17 124 0 1300
74539632 jhc B March 27, 2020, 9:01 a.m. OK Java 8 TESTS 17 124 0 1300
74531579 conquerorArpit B March 27, 2020, 6:39 a.m. OK Java 8 TESTS 17 124 0 1300
74530650 nalin_1000101 B March 27, 2020, 6:27 a.m. OK Java 8 TESTS 17 124 0 1300
74526850 horseprabhat625 B March 27, 2020, 5:16 a.m. OK Java 8 TESTS 17 124 0 1300
74525554 laxit_y B March 27, 2020, 4:44 a.m. OK Java 8 TESTS 17 124 0 1300
74472409 rndg B March 26, 2020, 4:18 p.m. OK JavaScript TESTS 17 77 4608000 1300
74521874 jhonber B March 27, 2020, 3:27 a.m. OK JavaScript TESTS 17 124 1536000 1300
74563550 sid9406 B March 27, 2020, 1:40 p.m. OK Kotlin TESTS 17 233 102400 1300
74495915 sashamc B March 26, 2020, 6:20 p.m. OK Kotlin TESTS 17 249 204800 1300
74555449 Glebik8 B March 27, 2020, 12:05 p.m. OK Kotlin TESTS 17 530 1228800 1300
74494144 de_loo B March 26, 2020, 6:02 p.m. OK Mono C# TESTS 17 92 6860800 1300
74580841 TrickyCat B March 27, 2020, 4:44 p.m. OK Mono C# TESTS 17 93 6656000 1300
74485690 Arnyev B March 26, 2020, 4:57 p.m. OK Mono C# TESTS 17 108 6758400 1300
74532161 vjudge2 B March 27, 2020, 6:47 a.m. OK MS C++ TESTS 17 31 0 1300
74534647 vjudge4 B March 27, 2020, 7:58 a.m. OK MS C++ TESTS 17 31 409600 1300
74537449 vjudge1 B March 27, 2020, 8:34 a.m. OK MS C++ TESTS 17 31 409600 1300
74517186 vjudge5 B March 27, 2020, 1:25 a.m. OK MS C++ TESTS 17 46 0 1300
74558689 krithikagoyal B March 27, 2020, 12:49 p.m. OK MS C++ TESTS 17 46 0 1300
74517689 vjudge4 B March 27, 2020, 1:41 a.m. OK MS C++ TESTS 17 46 0 1300
74539087 vjudge3 B March 27, 2020, 8:54 a.m. OK MS C++ TESTS 17 46 102400 1300
74542642 Hokage. B March 27, 2020, 9:35 a.m. OK MS C++ TESTS 17 46 409600 1300
74532311 vjudge1 B March 27, 2020, 6:48 a.m. OK MS C++ TESTS 17 61 102400 1300
74539016 vjudge1 B March 27, 2020, 8:53 a.m. OK MS C++ TESTS 17 62 0 1300
74573457 park780172 B March 27, 2020, 3:20 p.m. OK MS C++ 2017 TESTS 17 31 102400 1300
74469178 LeeJongHun B March 26, 2020, 4:12 p.m. OK MS C++ 2017 TESTS 17 31 819200 1300
74468701 WhitePianoW B March 26, 2020, 4:12 p.m. OK MS C++ 2017 TESTS 17 46 0 1300
74477910 bibibihhh B March 26, 2020, 4:28 p.m. OK MS C++ 2017 TESTS 17 46 0 1300
74560615 vjudge2 B March 27, 2020, 1:10 p.m. OK MS C++ 2017 TESTS 17 46 0 1300
74564457 spark18 B March 27, 2020, 1:48 p.m. OK MS C++ 2017 TESTS 17 46 0 1300
74489705 youngha B March 26, 2020, 5:22 p.m. OK MS C++ 2017 TESTS 17 46 102400 1300
74552317 skymin B March 27, 2020, 11:27 a.m. OK MS C++ 2017 TESTS 17 46 204800 1300
74479377 ssuno B March 26, 2020, 4:30 p.m. OK MS C++ 2017 TESTS 17 46 614400 1300
74507584 D_Jet B March 26, 2020, 8:57 p.m. OK MS C++ 2017 TESTS 17 46 819200 1300
74494022 mayakin B March 26, 2020, 6:01 p.m. OK PHP TESTS 17 77 0 1300
74471535 CrazyDr B March 26, 2020, 4:16 p.m. OK PHP TESTS 17 93 409600 1300
74489645 raj1307 B March 26, 2020, 5:22 p.m. OK PyPy 2 TESTS 17 187 2560000 1300
74472466 aniket11 B March 26, 2020, 4:18 p.m. OK PyPy 2 TESTS 17 342 5324800 1300
74515274 peijinz B March 27, 2020, 12:26 a.m. OK PyPy 2 TESTS 17 343 2150400 1300
74493165 ifrunruhin12 B March 26, 2020, 5:53 p.m. OK PyPy 2 TESTS 17 374 5324800 1300
74552566 tiwari0000 B March 27, 2020, 11:30 a.m. OK PyPy 3 TESTS 17 171 3072000 1300
74552860 maramsumanth B March 27, 2020, 11:33 a.m. OK PyPy 3 TESTS 17 186 3584000 1300
74507140 zhuodannychen B March 26, 2020, 8:50 p.m. OK PyPy 3 TESTS 17 186 5939200 1300
74498372 faking_legend B March 26, 2020, 6:46 p.m. OK PyPy 3 TESTS 17 187 3788800 1300
74469748 keep__calm B March 26, 2020, 4:13 p.m. OK PyPy 3 TESTS 17 187 3788800 1300
74484201 HeavensC B March 26, 2020, 4:48 p.m. OK PyPy 3 TESTS 17 187 4505600 1300
74481615 Whitehat010 B March 26, 2020, 4:34 p.m. OK PyPy 3 TESTS 17 187 5939200 1300
74510480 panamavan B March 26, 2020, 9:58 p.m. OK PyPy 3 TESTS 17 202 4198400 1300
74504001 m.ni B March 26, 2020, 7:58 p.m. OK PyPy 3 TESTS 17 202 4300800 1300
74578582 bit_2 B March 27, 2020, 4:17 p.m. OK PyPy 3 TESTS 17 202 4812800 1300
74587827 roma.sizov.999 B March 27, 2020, 6:05 p.m. OK Python 2 TESTS 17 202 409600 1300
74520327 saifahmadkhan4 B March 27, 2020, 2:52 a.m. OK Python 2 TESTS 17 217 614400 1300
74501749 under_score01 B March 26, 2020, 7:28 p.m. OK Python 2 TESTS 17 264 1843200 1300
74488339 bazzyadb B March 26, 2020, 5:13 p.m. OK Python 2 TESTS 17 296 3686400 1300
74471547 bertrandovide B March 26, 2020, 4:16 p.m. OK Python 2 TESTS 17 311 5324800 1300
74491736 KingVlad B March 26, 2020, 5:40 p.m. OK Python 3 TESTS 17 139 1536000 1300
74501686 BorisPro B March 26, 2020, 7:28 p.m. OK Python 3 TESTS 17 140 1126400 1300
74499495 BorisPro B March 26, 2020, 7 p.m. OK Python 3 TESTS 17 140 1126400 1300
74502062 BorisPro B March 26, 2020, 7:33 p.m. OK Python 3 TESTS 17 155 921600 1300
74473523 jha_saurav B March 26, 2020, 4:20 p.m. OK Python 3 TESTS 17 155 1024000 1300
74492518 vaibhavsarda B March 26, 2020, 5:47 p.m. OK Python 3 TESTS 17 155 1331200 1300
74590102 pratik__thakur B March 27, 2020, 6:33 p.m. OK Python 3 TESTS 17 156 921600 1300
74577037 tiwari0000 B March 27, 2020, 3:58 p.m. OK Python 3 TESTS 17 171 716800 1300
74498855 keep__calm B March 26, 2020, 6:52 p.m. OK Python 3 TESTS 17 171 716800 1300
74531492 AlphaNumero B March 27, 2020, 6:38 a.m. OK Python 3 TESTS 17 186 1331200 1300
74543435 the.shank B March 27, 2020, 9:45 a.m. OK Rust TESTS 17 31 0 1300
74499236 sansen B March 26, 2020, 6:56 p.m. OK Rust TESTS 17 31 614400 1300
74497003 mversic101 B March 26, 2020, 6:31 p.m. OK Rust TESTS 17 124 204800 1300
74542041 xyqkoala B March 27, 2020, 9:29 a.m. OK Rust TESTS 17 171 0 1300

remove filters

Back to search problems