Educational Codeforces Round 159 (Rated for 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
1902 Educational Codeforces Round 159 (Rated for Div. 2) FINISHED False 7200 35565863 Dec. 3, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 21491 ) A Binary Imbalance PROGRAMMING constructive algorithms

B'You are given a string s , consisting only of characters '0 ' and/or '1 '. In one operation, you choose a position i from 1 to |s| - 1 , where |s| is the current length of string s . Then you insert a character between the i -th and the (i+1) -st characters of s . If s_i = s_{i+1} , you insert '1 '. If s_i neq s_{i+1} , you insert '0 '. Is it possible to make the number of zeroes in the string strictly greater than the number of ones, using any number of operations (possibly, none)? The first line contains a single integer t ( 1 <= t <= 100 ) -- the number of testcases. The first line of each testcase contains an integer n ( 1 <= n <= 100 ). The second line contains a string s of length exactly n , consisting only of characters '0 ' and/or '1 '. For each testcase, print "YES" if it 's possible to make the number of zeroes in s strictly greater than the number of ones, using any number of operations (possibly, none). Otherwise, print "NO". In the first testcase, the number of zeroes is already greater than the number of ones. In the second testcase, it 's impossible to insert any zeroes in the string. In the third testcase, you can choose i = 1 to insert a zero between the 1 -st and the 2 -nd characters. Since s_1 neq s_2 , you insert a '0 '. The resulting string is "100". It has two zeroes and only a single one, so the answer is "YES". '...

Tutorials

Educational Codeforces Round 159 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
235638334 bluemegane A Dec. 3, 2023, 10:25 p.m. OK C# 8 TESTS 2 140 204800
235611090 tahmidulislam998 A Dec. 3, 2023, 5:13 p.m. OK Clang++20 Diagnostics TESTS 2 30 0
235604829 jhahidulzahid A Dec. 3, 2023, 4:42 p.m. OK GNU C11 TESTS 2 0 0
235611192 tahmidulislam998 A Dec. 3, 2023, 5:14 p.m. OK GNU C11 TESTS 2 0 0
235619595 Ronit5 A Dec. 3, 2023, 6:18 p.m. OK GNU C11 TESTS 2 0 0
235617008 jon_coder A Dec. 3, 2023, 5:57 p.m. OK GNU C11 TESTS 2 15 0
235616622 74w51f A Dec. 3, 2023, 5:54 p.m. OK GNU C11 TESTS 2 15 0
235618107 CodeChemist A Dec. 3, 2023, 6:06 p.m. OK GNU C11 TESTS 2 15 0
235622234 chicken_65 A Dec. 3, 2023, 6:42 p.m. OK GNU C11 TESTS 2 15 0
235623652 32_saha_audity A Dec. 3, 2023, 6:55 p.m. OK GNU C11 TESTS 2 15 0
235649039 Priya_Vokto A Dec. 4, 2023, 2:39 a.m. OK GNU C11 TESTS 2 15 0
235654002 reinvigorated_life A Dec. 4, 2023, 4:10 a.m. OK GNU C11 TESTS 2 15 0
235655871 Md_Rahul_Ahmed A Dec. 4, 2023, 4:42 a.m. OK GNU C++14 TESTS 2 0 0
235655138 yousefkhalaf A Dec. 4, 2023, 4:30 a.m. OK GNU C++14 TESTS 2 0 0
235654530 jiuxiangqingfeng A Dec. 4, 2023, 4:20 a.m. OK GNU C++14 TESTS 2 0 0
235660282 shivam7214376 A Dec. 4, 2023, 5:44 a.m. OK GNU C++14 TESTS 2 0 0
235660153 wdywfm A Dec. 4, 2023, 5:43 a.m. OK GNU C++14 TESTS 2 0 0
235659798 lzb123123 A Dec. 4, 2023, 5:38 a.m. OK GNU C++14 TESTS 2 0 0
235658188 not_so_real A Dec. 4, 2023, 5:16 a.m. OK GNU C++14 TESTS 2 0 0
235657970 HuHu_Fei A Dec. 4, 2023, 5:13 a.m. OK GNU C++14 TESTS 2 0 0
235657008 garvil28 A Dec. 4, 2023, 5 a.m. OK GNU C++14 TESTS 2 0 0
235656713 190123 A Dec. 4, 2023, 4:55 a.m. OK GNU C++14 TESTS 2 0 0
235661126 AayuGupt A Dec. 4, 2023, 5:55 a.m. OK GNU C++17 TESTS 2 0 0
235661325 Abdul_Mumeet A Dec. 4, 2023, 5:57 a.m. OK GNU C++17 TESTS 2 0 0
235661562 OLYA_Kuntsevich A Dec. 4, 2023, 6 a.m. OK GNU C++17 TESTS 2 0 0
235661081 alikhan_emes A Dec. 4, 2023, 5:54 a.m. OK GNU C++17 TESTS 2 0 0
235660992 AayushiM A Dec. 4, 2023, 5:53 a.m. OK GNU C++17 TESTS 2 0 0
235660959 shiv_2004 A Dec. 4, 2023, 5:53 a.m. OK GNU C++17 TESTS 2 0 0
235660798 awasthi25 A Dec. 4, 2023, 5:51 a.m. OK GNU C++17 TESTS 2 0 0
235660698 parth_17 A Dec. 4, 2023, 5:50 a.m. OK GNU C++17 TESTS 2 0 0
235660670 shreyasen27 A Dec. 4, 2023, 5:49 a.m. OK GNU C++17 TESTS 2 0 0
235660364 ANONYMOUS_3105 A Dec. 4, 2023, 5:45 a.m. OK GNU C++17 TESTS 2 0 0
235660830 karen114514 A Dec. 4, 2023, 5:51 a.m. OK GNU C++17 (64) TESTS 2 0 0
235661162 kuchibi A Dec. 4, 2023, 5:55 a.m. OK GNU C++17 (64) TESTS 2 0 0
235659509 Followall A Dec. 4, 2023, 5:35 a.m. OK GNU C++17 (64) TESTS 2 0 0
235659479 zime_www A Dec. 4, 2023, 5:34 a.m. OK GNU C++17 (64) TESTS 2 0 0
235658894 Dynamic_Pigeon A Dec. 4, 2023, 5:26 a.m. OK GNU C++17 (64) TESTS 2 0 0
235657804 qhnana7mi A Dec. 4, 2023, 5:11 a.m. OK GNU C++17 (64) TESTS 2 0 0
235657160 fs20091003 A Dec. 4, 2023, 5:02 a.m. OK GNU C++17 (64) TESTS 2 0 0
235656817 Firestarleader A Dec. 4, 2023, 4:57 a.m. OK GNU C++17 (64) TESTS 2 0 0
235656163 JustA7 A Dec. 4, 2023, 4:47 a.m. OK GNU C++17 (64) TESTS 2 0 0
235655850 TalkingBen A Dec. 4, 2023, 4:42 a.m. OK GNU C++17 (64) TESTS 2 0 0
235659779 freakinrkb A Dec. 4, 2023, 5:38 a.m. OK GNU C++20 (64) TESTS 2 0 0
235659821 unclezhou A Dec. 4, 2023, 5:39 a.m. OK GNU C++20 (64) TESTS 2 0 0
235660035 sabry44377 A Dec. 4, 2023, 5:41 a.m. OK GNU C++20 (64) TESTS 2 0 0
235660075 AbracaSora A Dec. 4, 2023, 5:42 a.m. OK GNU C++20 (64) TESTS 2 0 0
235660176 huangpj A Dec. 4, 2023, 5:43 a.m. OK GNU C++20 (64) TESTS 2 0 0
235660299 Kalpit_K A Dec. 4, 2023, 5:44 a.m. OK GNU C++20 (64) TESTS 2 0 0
235660488 pheOnix_04 A Dec. 4, 2023, 5:47 a.m. OK GNU C++20 (64) TESTS 2 0 0
235660847 pekolim A Dec. 4, 2023, 5:51 a.m. OK GNU C++20 (64) TESTS 2 0 0
235661175 SyedSohaib_SundarSTEM A Dec. 4, 2023, 5:55 a.m. OK GNU C++20 (64) TESTS 2 0 0
235661323 Mardonbekhazratov A Dec. 4, 2023, 5:57 a.m. OK GNU C++20 (64) TESTS 2 0 0
235659817 astitva27_ A Dec. 4, 2023, 5:39 a.m. OK Java 11 TESTS 2 171 0
235654721 rajneesh.osho A Dec. 4, 2023, 4:23 a.m. OK Java 11 TESTS 2 171 0
235620971 venkatesh23 A Dec. 3, 2023, 6:31 p.m. OK Java 11 TESTS 2 171 0
235611412 MariamWaelHegazy A Dec. 3, 2023, 5:15 p.m. OK Java 11 TESTS 2 171 0
235618155 sayaknandy A Dec. 3, 2023, 6:06 p.m. OK Java 11 TESTS 2 186 0
235660095 Rpranshu A Dec. 4, 2023, 5:42 a.m. OK Java 11 TESTS 2 202 0
235600161 shirisha_1866 A Dec. 3, 2023, 4:28 p.m. OK Java 11 TESTS 2 202 0
235600001 Kantipudisupriya A Dec. 3, 2023, 4:27 p.m. OK Java 11 TESTS 2 233 0
235636683 sm.20u10694 A Dec. 3, 2023, 9:51 p.m. OK Java 17 TESTS 2 109 0
235605489 hlcyon A Dec. 3, 2023, 4:44 p.m. OK Java 17 TESTS 2 155 0
235605703 Anush_Revankar A Dec. 3, 2023, 4:44 p.m. OK Java 17 TESTS 2 156 0
235636941 sm.20u10694 A Dec. 3, 2023, 9:58 p.m. OK Java 17 TESTS 2 171 0
235616065 dawn_raja A Dec. 3, 2023, 5:49 p.m. OK Java 17 TESTS 2 171 0
235614693 TCchen A Dec. 3, 2023, 5:38 p.m. OK Java 17 TESTS 2 171 0
235621162 Nagendravarma A Dec. 3, 2023, 6:32 p.m. OK Java 17 TESTS 2 171 307200
235614395 Extradict A Dec. 3, 2023, 5:36 p.m. OK Java 17 TESTS 2 171 8499200
235607269 rajashish914 A Dec. 3, 2023, 4:52 p.m. OK Java 17 TESTS 2 187 102400
235601454 Het_Savani A Dec. 3, 2023, 4:30 p.m. OK Java 17 TESTS 2 187 307200
235612866 yashvardhansingh112233 A Dec. 3, 2023, 5:25 p.m. OK Java 21 TESTS 2 186 0
235644592 goalboy A Dec. 4, 2023, 1:13 a.m. OK Java 21 TESTS 2 217 0
235621287 chess_nf3 A Dec. 3, 2023, 6:33 p.m. OK Java 21 TESTS 2 217 0
235659704 iamzmeirambek A Dec. 4, 2023, 5:37 a.m. OK Java 21 TESTS 2 218 0
235624764 abhishekkumarsingh9585 A Dec. 3, 2023, 7:05 p.m. OK Java 21 TESTS 2 233 0
235633073 siamsplash5 A Dec. 3, 2023, 8:33 p.m. OK Java 21 TESTS 2 234 409600
235659478 naseer_ A Dec. 4, 2023, 5:34 a.m. OK Java 21 TESTS 2 264 0
235643648 gdax A Dec. 4, 2023, 12:52 a.m. OK Java 8 TESTS 2 77 0
235630220 YashNahata A Dec. 3, 2023, 7:57 p.m. OK Java 8 TESTS 2 78 0
235660011 Koka A Dec. 4, 2023, 5:41 a.m. OK Java 8 TESTS 2 108 0
235624394 deepthecoder A Dec. 3, 2023, 7:02 p.m. OK Java 8 TESTS 2 108 0
235616883 DiptiP A Dec. 3, 2023, 5:56 p.m. OK Java 8 TESTS 2 108 0
235652963 achyut88 A Dec. 4, 2023, 3:54 a.m. OK Java 8 TESTS 2 109 0
235614249 manpreet3007 A Dec. 3, 2023, 5:35 p.m. OK Java 8 TESTS 2 109 0
235600734 shalinivaka30 A Dec. 3, 2023, 4:29 p.m. OK Java 8 TESTS 2 124 0
235608988 brownfox2k6 A Dec. 3, 2023, 5:01 p.m. OK Kotlin 1.7 TESTS 2 186 0
235651519 luvcoder_117 A Dec. 4, 2023, 3:26 a.m. OK MS C++ 2017 TESTS 2 0 0
235617475 mohitagarwal_24 A Dec. 3, 2023, 6:01 p.m. OK MS C++ 2017 TESTS 2 0 0
235600688 siddharthdwivedi285 A Dec. 3, 2023, 4:29 p.m. OK MS C++ 2017 TESTS 2 0 0
235657960 Ravitosh A Dec. 4, 2023, 5:13 a.m. OK MS C++ 2017 TESTS 2 30 1638400
235617119 ipip A Dec. 3, 2023, 5:58 p.m. OK PyPy 3 TESTS 2 61 1331200
235611736 noob_username A Dec. 3, 2023, 5:17 p.m. OK PyPy 3 TESTS 2 62 0
235607708 mkawa2 A Dec. 3, 2023, 4:54 p.m. OK PyPy 3 TESTS 2 62 0
235599783 Hima_Gaya3 A Dec. 3, 2023, 4:27 p.m. OK PyPy 3 TESTS 2 62 0
235658965 0xROoT A Dec. 4, 2023, 5:27 a.m. OK PyPy 3 TESTS 2 77 0
235652116 bunny_senpai A Dec. 4, 2023, 3:38 a.m. OK PyPy 3 TESTS 2 77 0
235623894 yhn112 A Dec. 3, 2023, 6:57 p.m. OK PyPy 3 TESTS 2 77 1331200
235609207 msachinjames A Dec. 3, 2023, 5:02 p.m. OK PyPy 3 TESTS 2 92 0
235659473 0xROoT A Dec. 4, 2023, 5:34 a.m. OK PyPy 3 TESTS 2 92 409600
235623846 xfp_17 A Dec. 3, 2023, 6:57 p.m. OK PyPy 3 TESTS 2 93 0
235660281 jahid1213cvgc A Dec. 4, 2023, 5:44 a.m. OK PyPy 3-64 TESTS 2 46 0
235658883 harshk_52 A Dec. 4, 2023, 5:26 a.m. OK PyPy 3-64 TESTS 2 46 0
235656497 Quick-One A Dec. 4, 2023, 4:52 a.m. OK PyPy 3-64 TESTS 2 46 0
235652575 dilshod9890 A Dec. 4, 2023, 3:47 a.m. OK PyPy 3-64 TESTS 2 46 0
235647365 itokhtarov A Dec. 4, 2023, 2:07 a.m. OK PyPy 3-64 TESTS 2 46 0
235643277 odinluca A Dec. 4, 2023, 12:43 a.m. OK PyPy 3-64 TESTS 2 46 0
235641021 DoubleDragon1054 A Dec. 3, 2023, 11:45 p.m. OK PyPy 3-64 TESTS 2 46 0
235638262 debashish_1 A Dec. 3, 2023, 10:24 p.m. OK PyPy 3-64 TESTS 2 46 0
235637123 batbout A Dec. 3, 2023, 10:03 p.m. OK PyPy 3-64 TESTS 2 46 0
235625667 Leul_io A Dec. 3, 2023, 7:13 p.m. OK PyPy 3-64 TESTS 2 46 0
235599815 Akylz A Dec. 3, 2023, 4:27 p.m. OK Python 3 TESTS 2 15 0
235628925 Beunknown A Dec. 3, 2023, 7:45 p.m. OK Python 3 TESTS 2 30 0
235618055 bahailu A Dec. 3, 2023, 6:05 p.m. OK Python 3 TESTS 2 30 0
235603031 CMRIT25_21R01A67J7 A Dec. 3, 2023, 4:33 p.m. OK Python 3 TESTS 2 30 0
235659603 aibek02 A Dec. 4, 2023, 5:36 a.m. OK Python 3 TESTS 2 31 0
235624798 hermonita A Dec. 3, 2023, 7:05 p.m. OK Python 3 TESTS 2 31 0
235618858 abdurakhmonnn A Dec. 3, 2023, 6:12 p.m. OK Python 3 TESTS 2 31 0
235617253 hamzarekaya11 A Dec. 3, 2023, 5:59 p.m. OK Python 3 TESTS 2 31 0
235613722 devjain1028 A Dec. 3, 2023, 5:31 p.m. OK Python 3 TESTS 2 31 0
235610492 vatsalraj A Dec. 3, 2023, 5:10 p.m. OK Python 3 TESTS 2 31 0
235622870 0x81 A Dec. 3, 2023, 6:48 p.m. OK Ruby 3 TESTS 2 421 409600

remove filters

Back to search problems