Codeforces Round 652 (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
1369 Codeforces Round 652 (Div. 2) FINISHED False 7200 144431711 June 23, 2020, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 24655 ) B AccurateLee PROGRAMMING greedy implementation strings 1200

B"Lee was cleaning his house for the party when he found a messy string under the carpets. Now he'd like to make it clean accurately and in a stylish way... The string s he found is a binary string of length n (i. e. string consists only of 0-s and 1-s). In one move he can choose two consecutive characters s_i and s_{i+1} , and if s_i is 1 and s_{i + 1} is 0, he can erase exactly one of them (he can choose which one to erase but he can't erase both characters simultaneously). The string shrinks after erasing. Lee can make an arbitrary number of moves (possibly zero) and he'd like to make the string s as clean as possible. He thinks for two different strings x and y , the shorter string is cleaner, and if they are the same length, then the lexicographically smaller string is cleaner. Now you should answer t test cases: for the i -th test case, print the cleanest possible string that Lee can get by doing some number of moves. Small reminder: if we have two strings x and y of the same length then x is lexicographically smaller than y if there is a position i such that x_1 = y_1 , x_2 = y_2 ,..., x_{i - 1} = y_{i - 1} and x_i < y_i . The first line contains the integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Next 2t lines contain test cases -- one per two lines. The first line of each test case contains the integer n ( 1 <= n <= 10^5 ) -- the length of the string s . The second line contains the binary string s . The string s is a string of length n which consists only of zeroes and ones. It's guaranteed that sum of n over test cases doesn't exceed 10^5 . Print t answers -- one per test case. The answer to the i -th test case is the cleanest string Lee can get after doing some number of moves (possibly zero). In the first test case, Lee can't perform any move"...

Tutorials

Codeforces Round #652 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
84779921 Gassa B June 23, 2020, 2:40 p.m. OK D TESTS 10 46 8908800 1200
84814498 PAG B June 23, 2020, 3:59 p.m. OK FPC TESTS 10 46 5120000 1200
84796621 madv809 B June 23, 2020, 3:12 p.m. OK FPC TESTS 10 109 4812800 1200
84789393 Duy_e B June 23, 2020, 2:57 p.m. OK FPC TESTS 10 109 4812800 1200
84824152 ruban B June 23, 2020, 5:29 p.m. OK FPC TESTS 11 155 4710400 1200
84835403 kitty317ch B June 23, 2020, 8:09 p.m. OK GNU C11 TESTS 11 15 3788800 1200
84798291 orbion B June 23, 2020, 3:16 p.m. OK GNU C11 TESTS 10 30 3788800 1200
84813260 rainboy B June 23, 2020, 3:56 p.m. OK GNU C11 TESTS 10 46 3891200 1200
84805803 kubik127 B June 23, 2020, 3:35 p.m. OK GNU C11 TESTS 10 93 4198400 1200
84832677 dhairyas2412 B June 23, 2020, 7:22 p.m. OK GNU C11 TESTS 11 124 3788800 1200
84806788 ja1467 B June 23, 2020, 3:37 p.m. OK GNU C11 TESTS 10 124 3993600 1200
84779861 akash456 B June 23, 2020, 2:40 p.m. OK GNU C11 TESTS 10 139 3788800 1200
84813787 parthdhorajiya365 B June 23, 2020, 3:57 p.m. OK GNU C11 TESTS 10 140 3788800 1200
84786900 Israt_Jahan_Nahin B June 23, 2020, 2:52 p.m. OK GNU C11 TESTS 10 156 3993600 1200
84810162 Mithu.ict B June 23, 2020, 3:47 p.m. OK GNU C11 TESTS 10 171 3788800 1200
84778878 iuiou B June 23, 2020, 2:38 p.m. OK GNU C++11 TESTS 10 15 3993600 1200
84843362 Bill_Benation B June 24, 2020, 12:15 a.m. OK GNU C++11 TESTS 11 15 3993600 1200
84780423 __xzh B June 23, 2020, 2:41 p.m. OK GNU C++11 TESTS 10 15 4096000 1200
84787779 akjdps B June 23, 2020, 2:54 p.m. OK GNU C++11 TESTS 10 15 4198400 1200
84783408 AFRG B June 23, 2020, 2:46 p.m. OK GNU C++11 TESTS 10 15 4198400 1200
84785618 absinthe B June 23, 2020, 2:50 p.m. OK GNU C++11 TESTS 10 15 4198400 1200
84821989 cmlivb B June 23, 2020, 5:05 p.m. OK GNU C++11 TESTS 11 15 4198400 1200
84803439 Tarsal B June 23, 2020, 3:29 p.m. OK GNU C++11 TESTS 10 15 4198400 1200
84793213 zbrgalaxy1st B June 23, 2020, 3:05 p.m. OK GNU C++11 TESTS 10 15 4198400 1200
84824270 code_in_blood B June 23, 2020, 5:30 p.m. OK GNU C++11 TESTS 11 15 4300800 1200
84818064 ronbil B June 23, 2020, 4:38 p.m. OK GNU C++14 TESTS 10 15 3993600 1200
84794942 aayu_1234 B June 23, 2020, 3:08 p.m. OK GNU C++14 TESTS 10 15 3993600 1200
84797612 real.emerald B June 23, 2020, 3:14 p.m. OK GNU C++14 TESTS 10 15 3993600 1200
84778515 bhasky_06 B June 23, 2020, 2:37 p.m. OK GNU C++14 TESTS 10 15 3993600 1200
84778598 p3rfect B June 23, 2020, 2:38 p.m. OK GNU C++14 TESTS 10 15 3993600 1200
84779712 aadarsh026 B June 23, 2020, 2:39 p.m. OK GNU C++14 TESTS 10 15 3993600 1200
84779819 Noobakshat B June 23, 2020, 2:40 p.m. OK GNU C++14 TESTS 10 15 3993600 1200
84781043 Moamen. B June 23, 2020, 2:42 p.m. OK GNU C++14 TESTS 10 15 3993600 1200
84789668 darkworld1 B June 23, 2020, 2:57 p.m. OK GNU C++14 TESTS 10 15 3993600 1200
84793773 a_code_runner B June 23, 2020, 3:06 p.m. OK GNU C++14 TESTS 10 15 3993600 1200
84801009 vermaprakash473 B June 23, 2020, 3:22 p.m. OK GNU C++17 TESTS 10 15 3788800 1200
84810280 tasja B June 23, 2020, 3:47 p.m. OK GNU C++17 TESTS 10 15 3788800 1200
84799847 _phodu_ B June 23, 2020, 3:19 p.m. OK GNU C++17 TESTS 10 15 3993600 1200
84827522 jdvoid_44 B June 23, 2020, 6:08 p.m. OK GNU C++17 TESTS 11 15 3993600 1200
84809477 saurxbh B June 23, 2020, 3:45 p.m. OK GNU C++17 TESTS 10 15 3993600 1200
84798303 Ztin B June 23, 2020, 3:16 p.m. OK GNU C++17 TESTS 10 15 3993600 1200
84797990 _tommy_ B June 23, 2020, 3:15 p.m. OK GNU C++17 TESTS 10 15 3993600 1200
84796850 prachij B June 23, 2020, 3:12 p.m. OK GNU C++17 TESTS 10 15 3993600 1200
84793746 BaluconisTima B June 23, 2020, 3:06 p.m. OK GNU C++17 TESTS 10 15 3993600 1200
84792550 apoorva222g B June 23, 2020, 3:03 p.m. OK GNU C++17 TESTS 10 15 3993600 1200
84805068 AnDrewHAliEm B June 23, 2020, 3:33 p.m. OK GNU C++17 (64) TESTS 10 15 4608000 1200
84839988 CodingKnight B June 23, 2020, 9:57 p.m. OK GNU C++17 (64) TESTS 11 15 4608000 1200
84850146 zxcv_1 B June 24, 2020, 3:47 a.m. OK GNU C++17 (64) TESTS 11 15 4608000 1200
84855677 dhiraj-01 B June 24, 2020, 5:34 a.m. OK GNU C++17 (64) TESTS 11 15 4608000 1200
84802496 Arif19 B June 23, 2020, 3:26 p.m. OK GNU C++17 (64) TESTS 10 15 4608000 1200
84787163 01vatri B June 23, 2020, 2:53 p.m. OK GNU C++17 (64) TESTS 10 15 4710400 1200
84821282 dpw4112001 B June 23, 2020, 4:58 p.m. OK GNU C++17 (64) TESTS 11 15 4812800 1200
84818876 kb_1024bytes B June 23, 2020, 4:41 p.m. OK GNU C++17 (64) TESTS 10 15 4812800 1200
84835202 BeAsTmAsTeR B June 23, 2020, 8:05 p.m. OK GNU C++17 (64) TESTS 11 15 4812800 1200
84847420 zwliew B June 24, 2020, 2:37 a.m. OK GNU C++17 (64) TESTS 11 15 4812800 1200
84800883 snow_bear_328 B June 23, 2020, 3:22 p.m. OK Go TESTS 10 61 10752000 1200
84795458 maguroguma B June 23, 2020, 3:09 p.m. OK Go TESTS 10 61 11059200 1200
84795692 kube8 B June 23, 2020, 3:10 p.m. OK Go TESTS 10 592 10752000 1200
84838151 Black_Fregat B June 23, 2020, 9:05 p.m. OK Haskell TESTS 11 31 12697600 1200
84840935 jaynils B June 23, 2020, 10:30 p.m. OK Java 11 TESTS 11 171 23756800 1200
84853814 litesam B June 24, 2020, 5:04 a.m. OK Java 11 TESTS 11 171 23756800 1200
84837434 nick_301 B June 23, 2020, 8:49 p.m. OK Java 11 TESTS 11 171 23756800 1200
84800225 TempVariable B June 23, 2020, 3:20 p.m. OK Java 11 TESTS 10 171 23756800 1200
84794882 MAVabjb B June 23, 2020, 3:08 p.m. OK Java 11 TESTS 10 171 23756800 1200
84790676 BNL B June 23, 2020, 2:59 p.m. OK Java 11 TESTS 10 171 23756800 1200
84832823 egaeus.code B June 23, 2020, 7:24 p.m. OK Java 11 TESTS 11 171 23859200 1200
84819255 vivek21 B June 23, 2020, 4:43 p.m. OK Java 11 TESTS 10 171 23859200 1200
84789426 devesh08 B June 23, 2020, 2:57 p.m. OK Java 11 TESTS 10 171 23961600 1200
84784070 kelvinc1024 B June 23, 2020, 2:47 p.m. OK Java 11 TESTS 10 186 23756800 1200
84785022 Sadakant B June 23, 2020, 2:49 p.m. OK Java 8 TESTS 10 108 20480000 1200
84834600 Debojit219 B June 23, 2020, 7:54 p.m. OK Java 8 TESTS 11 108 20582400 1200
84818380 kostasanemozalis B June 23, 2020, 4:39 p.m. OK Java 8 TESTS 10 108 20582400 1200
84807676 iceburst B June 23, 2020, 3:40 p.m. OK Java 8 TESTS 10 108 21094400 1200
84795971 bodmas B June 23, 2020, 3:10 p.m. OK Java 8 TESTS 10 109 20377600 1200
84793052 a_2410 B June 23, 2020, 3:04 p.m. OK Java 8 TESTS 10 109 20377600 1200
84786199 kingash101 B June 23, 2020, 2:51 p.m. OK Java 8 TESTS 10 109 20377600 1200
84846358 4qqqqzzz B June 24, 2020, 2:09 a.m. OK Java 8 TESTS 11 109 20480000 1200
84844888 MagentaCobra B June 24, 2020, 1:14 a.m. OK Java 8 TESTS 11 109 20480000 1200
84843762 flyman3046 B June 24, 2020, 12:29 a.m. OK Java 8 TESTS 11 109 20480000 1200
84826356 Loremon B June 23, 2020, 5:54 p.m. OK JavaScript TESTS 11 46 6451200 1200
84853700 Spheniscine B June 24, 2020, 5:02 a.m. OK Kotlin TESTS 11 124 20992000 1200
84842855 a11eca B June 23, 2020, 11:58 p.m. OK Kotlin TESTS 11 171 21708800 1200
84846411 HaKuLess B June 24, 2020, 2:10 a.m. OK Kotlin TESTS 11 202 21196800 1200
84846945 HaKuLess B June 24, 2020, 2:24 a.m. OK Kotlin TESTS 11 217 21401600 1200
84792646 Glamdring B June 23, 2020, 3:03 p.m. OK Kotlin TESTS 10 218 20684800 1200
84788575 xxxcul B June 23, 2020, 2:55 p.m. OK Kotlin TESTS 10 249 21708800 1200
84780388 wuchaojie925 B June 23, 2020, 2:41 p.m. OK Kotlin TESTS 10 265 22835200 1200
84786973 speshuric B June 23, 2020, 2:52 p.m. OK Kotlin TESTS 10 296 22528000 1200
84801095 iShivansh B June 23, 2020, 3:22 p.m. OK Kotlin TESTS 10 420 20992000 1200
84779453 PussyKiller B June 23, 2020, 2:39 p.m. OK Kotlin TESTS 10 420 21299200 1200
84792549 hedgedog B June 23, 2020, 3:03 p.m. OK Mono C# TESTS 10 62 9830400 1200
84808561 ansergeyg B June 23, 2020, 3:42 p.m. OK Mono C# TESTS 10 62 9830400 1200
84778874 fancy_lettuce B June 23, 2020, 2:38 p.m. OK Mono C# TESTS 10 62 15257600 1200
84797806 osthir B June 23, 2020, 3:14 p.m. OK Mono C# TESTS 10 77 10137600 1200
84849323 Backs B June 24, 2020, 3:27 a.m. OK Mono C# TESTS 11 77 10547200 1200
84814656 braher B June 23, 2020, 3:59 p.m. OK Mono C# TESTS 10 93 9830400 1200
84820824 avtoruxadze B June 23, 2020, 4:55 p.m. OK Mono C# TESTS 11 93 9830400 1200
84796839 Kolyanich B June 23, 2020, 3:12 p.m. OK Mono C# TESTS 10 93 10547200 1200
84798308 DaniilPanasenko B June 23, 2020, 3:16 p.m. OK Mono C# TESTS 10 1075 15564800 1200
84799838 tnhien B June 23, 2020, 3:19 p.m. OK MS C++ TESTS 10 46 4198400 1200
84850043 ashis041 B June 24, 2020, 3:44 a.m. OK MS C++ TESTS 11 46 4198400 1200
84797518 Clocklight B June 23, 2020, 3:14 p.m. OK MS C++ TESTS 10 46 4300800 1200
84802979 Shantanu_Deore1 B June 23, 2020, 3:27 p.m. OK MS C++ TESTS 10 46 4608000 1200
84798465 Goldexperienrce B June 23, 2020, 3:16 p.m. OK MS C++ TESTS 10 61 4096000 1200
84782466 otarra B June 23, 2020, 2:44 p.m. OK MS C++ 2017 TESTS 10 31 3686400 1200
84850072 GeraldG B June 24, 2020, 3:45 a.m. OK MS C++ 2017 TESTS 11 31 3788800 1200
84784355 Zhora_.004 B June 23, 2020, 2:47 p.m. OK MS C++ 2017 TESTS 10 31 3891200 1200
84788346 asomeJay B June 23, 2020, 2:55 p.m. OK MS C++ 2017 TESTS 10 31 3993600 1200
84851769 deuslovelt B June 24, 2020, 4:25 a.m. OK MS C++ 2017 TESTS 11 31 3993600 1200
84843058 pjh6792 B June 24, 2020, 12:05 a.m. OK MS C++ 2017 TESTS 11 31 3993600 1200
84843497 pjh6792 B June 24, 2020, 12:19 a.m. OK MS C++ 2017 TESTS 11 31 3993600 1200
84778685 ValiantMC B June 23, 2020, 2:38 p.m. OK MS C++ 2017 TESTS 10 31 3993600 1200
84793280 _-qwerty-_ B June 23, 2020, 3:05 p.m. OK MS C++ 2017 TESTS 10 31 4096000 1200
84783293 cwdck B June 23, 2020, 2:46 p.m. OK MS C++ 2017 TESTS 10 31 4505600 1200
84798987 klond90 B June 23, 2020, 3:17 p.m. OK Node.js TESTS 10 202 17817600 1200
84853899 explorer_sifat B June 24, 2020, 5:05 a.m. OK Node.js TESTS 11 202 17817600 1200
84780856 Loremon B June 23, 2020, 2:41 p.m. OK Node.js TESTS 10 233 17203200 1200
84784767 ycui11 B June 23, 2020, 2:48 p.m. OK PyPy 2 TESTS 10 155 28057600 1200
84820951 crapplet B June 23, 2020, 4:56 p.m. OK PyPy 2 TESTS 11 170 26521600 1200
84803487 soyluy B June 23, 2020, 3:29 p.m. OK PyPy 2 TESTS 10 358 25907200 1200
84806574 bl4ckc4t B June 23, 2020, 3:37 p.m. OK PyPy 2 TESTS 10 373 29184000 1200
84833603 lebron87 B June 23, 2020, 7:37 p.m. OK PyPy 2 TESTS 11 483 29798400 1200
84799322 nikkitikki B June 23, 2020, 3:18 p.m. OK PyPy 3 TESTS 10 171 23449600 1200
84827921 Aestroix B June 23, 2020, 6:13 p.m. OK PyPy 3 TESTS 11 171 23859200 1200
84840501 jscn B June 23, 2020, 10:14 p.m. OK PyPy 3 TESTS 11 171 24576000 1200
84782885 gintoki_s B June 23, 2020, 2:45 p.m. OK PyPy 3 TESTS 10 171 24576000 1200
84804454 x3mka B June 23, 2020, 3:31 p.m. OK PyPy 3 TESTS 10 171 24883200 1200
84778681 rl96 B June 23, 2020, 2:38 p.m. OK PyPy 3 TESTS 10 171 25190400 1200
84783656 westwakki B June 23, 2020, 2:46 p.m. OK PyPy 3 TESTS 10 186 25497600 1200
84786297 DanSales B June 23, 2020, 2:51 p.m. OK PyPy 3 TESTS 10 186 26214400 1200
84790684 sushantp B June 23, 2020, 2:59 p.m. OK PyPy 3 TESTS 10 187 24371200 1200
84786844 manish.17 B June 23, 2020, 2:52 p.m. OK PyPy 3 TESTS 10 187 24473600 1200
84794872 kmd99 B June 23, 2020, 3:08 p.m. OK Python 2 TESTS 10 187 6553600 1200
84784179 Mike10 B June 23, 2020, 2:47 p.m. OK Python 2 TESTS 10 202 6656000 1200
84838307 elistark B June 23, 2020, 9:10 p.m. OK Python 2 TESTS 11 233 6656000 1200
84830022 eugalt B June 23, 2020, 6:41 p.m. OK Python 3 TESTS 11 108 7577600 1200
84820742 eugalt B June 23, 2020, 4:54 p.m. OK Python 3 TESTS 11 109 7577600 1200
84854864 sadikulsadi1500 B June 24, 2020, 5:21 a.m. OK Python 3 TESTS 11 124 7270400 1200
84823105 mahtab_zihan B June 23, 2020, 5:17 p.m. OK Python 3 TESTS 11 124 7475200 1200
84807236 eugalt B June 23, 2020, 3:38 p.m. OK Python 3 TESTS 10 124 7577600 1200
84829798 eugalt B June 23, 2020, 6:38 p.m. OK Python 3 TESTS 11 124 7680000 1200
84821198 eugalt B June 23, 2020, 4:58 p.m. OK Python 3 TESTS 11 124 7680000 1200
84780587 Hiroshi.K B June 23, 2020, 2:41 p.m. OK Python 3 TESTS 10 139 7372800 1200
84789731 chandureddyn5 B June 23, 2020, 2:58 p.m. OK Python 3 TESTS 10 139 9625600 1200
84797668 Moody_in_a_hoodie B June 23, 2020, 3:14 p.m. OK Python 3 TESTS 10 140 7475200 1200
84790227 yoshig0731 B June 23, 2020, 2:59 p.m. OK Rust TESTS 10 93 4608000 1200
84779758 pandrei B June 23, 2020, 2:40 p.m. OK Rust TESTS 10 93 5632000 1200
84791646 t_uchida B June 23, 2020, 3:01 p.m. OK Rust TESTS 10 109 4710400 1200
84793540 rinz13r B June 23, 2020, 3:05 p.m. OK Rust TESTS 10 124 4915200 1200
84806150 ktn_yuta B June 23, 2020, 3:35 p.m. OK Rust TESTS 10 140 4096000 1200
84795975 bqn B June 23, 2020, 3:10 p.m. OK Rust TESTS 10 155 5836800 1200
84781474 LLIAMA3OB B June 23, 2020, 2:42 p.m. OK Scala TESTS 10 529 31129600 1200

remove filters

Back to search problems