Codeforces Round 849 (Div. 4)

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
1791 Codeforces Round 849 (Div. 4) FINISHED False 8700 61831463 Feb. 3, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 49002 ) C Prepend and Append PROGRAMMING implementation two pointers

B"Timur initially had a binary string ^{ dagger} s (possibly of length 0 ). He performed the following operation several (possibly zero) times: ^{ dagger} A binary string is a string (possibly the empty string) whose characters are either texttt{0} or texttt{1} . The first line of the input contains an integer t ( 1 <= q t <= q 100 ) -- the number of testcases. The first line of each test case contains an integer n ( 1 <= q n <= q 2000 ) -- the length of Timur's final string. The second line of each test case contains a string s of length n consisting of characters texttt{0} or texttt{1} , denoting the final string. For each test case, output a single nonnegative integer -- the shortest possible length of Timur's original string. Note that Timur's original string could have been empty, in which case you should output 0 . In the first test case, the shortest possible string Timur started with is texttt{0} , and he performed the following operation: texttt{0} to color{red}{ texttt{1}} texttt{0} color{red}{ texttt{0}} . In the second test case, the shortest possible string Timur started with is texttt{11} , and he performed the following operation: texttt{11} to color{red}{ texttt{0}} texttt{11} color{red}{ texttt{1}} . In the third test case, the shortest possible string Timur started with is texttt{10101} , and he didn't perform any operations. In the fourth test case, the shortest possible string Timur started with is the empty string (which we denote by varepsilon ), and he performed the following operations: varepsilon to color{red}{ texttt{1}} texttt{} color{red}{ texttt{0}} to color{red}{ texttt{0}} texttt{10} color{red}{ texttt{1}} to color{red}{ texttt{1}} texttt{0101} color{red}{ texttt{0}} . In the fifth test case, the shortest possible string Timur started with is texttt{101} , and he performed the fol"...

Tutorials

112282

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
192053867 joaoandreotti C Feb. 3, 2023, 6:17 p.m. OK C# 10 TESTS 4 202 12390400
192075968 WhiteDevil4648 C Feb. 3, 2023, 9:59 p.m. OK GNU C11 TESTS 4 15 0
192060022 rimon50 C Feb. 3, 2023, 7:02 p.m. OK GNU C11 TESTS 4 15 0
192102071 vjudge3 C Feb. 4, 2023, 5:37 a.m. OK GNU C11 TESTS 4 15 3686400
192081572 shark1992 C Feb. 4, 2023, 12:01 a.m. OK GNU C11 TESTS 4 15 3686400
192069240 Arihant.001 C Feb. 3, 2023, 8:30 p.m. OK GNU C11 TESTS 4 15 3686400
192065781 harshit16 C Feb. 3, 2023, 7:54 p.m. OK GNU C11 TESTS 4 15 3686400
192064140 TingYun C Feb. 3, 2023, 7:38 p.m. OK GNU C11 TESTS 4 15 3686400
192057657 Shyan C Feb. 3, 2023, 6:43 p.m. OK GNU C11 TESTS 4 15 3686400
192055069 Hasan1326 C Feb. 3, 2023, 6:25 p.m. OK GNU C11 TESTS 4 15 3686400
192088481 wjx12 C Feb. 4, 2023, 2:31 a.m. OK GNU C11 TESTS 4 15 3686400
192063563 Menna-Allah05 C Feb. 3, 2023, 7:33 p.m. OK GNU C++14 TESTS 4 0 0
192096816 _SLHT C Feb. 4, 2023, 4:42 a.m. OK GNU C++14 TESTS 4 0 1024000
192077402 mc_rodrix99 C Feb. 3, 2023, 10:25 p.m. OK GNU C++14 TESTS 4 0 1024000
192101511 dianhsu_scarlet C Feb. 4, 2023, 5:32 a.m. OK GNU C++14 TESTS 4 0 1024000
192101191 atharvaayir C Feb. 4, 2023, 5:29 a.m. OK GNU C++14 TESTS 4 0 1024000
192096901 ash_code98 C Feb. 4, 2023, 4:43 a.m. OK GNU C++14 TESTS 4 0 1024000
192095379 HuyTagama C Feb. 4, 2023, 4:22 a.m. OK GNU C++14 TESTS 4 0 1024000
192088064 taqiismail10 C Feb. 4, 2023, 2:24 a.m. OK GNU C++14 TESTS 4 0 1024000
192083494 ChoCoFly C Feb. 4, 2023, 12:51 a.m. OK GNU C++14 TESTS 4 0 1024000
192079712 omeganot C Feb. 3, 2023, 11:11 p.m. OK GNU C++14 TESTS 4 0 1024000
192049272 Lama_Dayoub C Feb. 3, 2023, 5:48 p.m. OK GNU C++17 TESTS 4 0 0
192066649 amoghpatel1 C Feb. 3, 2023, 8:02 p.m. OK GNU C++17 TESTS 4 0 0
192075202 Sara_Ashraf C Feb. 3, 2023, 9:48 p.m. OK GNU C++17 TESTS 4 0 0
192070174 parzival_o C Feb. 3, 2023, 8:41 p.m. OK GNU C++17 TESTS 4 0 0
192063043 4ugajan C Feb. 3, 2023, 7:29 p.m. OK GNU C++17 TESTS 4 0 0
192061792 eshtiakhasan C Feb. 3, 2023, 7:17 p.m. OK GNU C++17 TESTS 4 0 0
192060174 MayarEmad C Feb. 3, 2023, 7:03 p.m. OK GNU C++17 TESTS 4 0 0
192055343 rohitsatpute480 C Feb. 3, 2023, 6:27 p.m. OK GNU C++17 TESTS 4 0 0
192052107 kanishka_1006 C Feb. 3, 2023, 6:05 p.m. OK GNU C++17 TESTS 4 0 0
192051754 bhagya_rana C Feb. 3, 2023, 6:03 p.m. OK GNU C++17 TESTS 4 0 0
192102229 OTTFF C Feb. 4, 2023, 5:39 a.m. OK GNU C++17 (64) TESTS 4 0 1228800
192102190 vasubeladiya C Feb. 4, 2023, 5:38 a.m. OK GNU C++17 (64) TESTS 4 0 1228800
192092934 yl_neo C Feb. 4, 2023, 3:43 a.m. OK GNU C++17 (64) TESTS 4 0 1228800
192085026 EduardoBrito C Feb. 4, 2023, 1:27 a.m. OK GNU C++17 (64) TESTS 4 0 1228800
192084749 wcwu C Feb. 4, 2023, 1:21 a.m. OK GNU C++17 (64) TESTS 4 0 1228800
192084649 xiaoYun_succ C Feb. 4, 2023, 1:19 a.m. OK GNU C++17 (64) TESTS 4 0 1228800
192084029 _Nayru C Feb. 4, 2023, 1:03 a.m. OK GNU C++17 (64) TESTS 4 0 1228800
192083385 juancarlostapiab.1 C Feb. 4, 2023, 12:48 a.m. OK GNU C++17 (64) TESTS 4 0 1228800
192079962 chenu C Feb. 3, 2023, 11:17 p.m. OK GNU C++17 (64) TESTS 4 0 1228800
192079806 jdurie C Feb. 3, 2023, 11:14 p.m. OK GNU C++17 (64) TESTS 4 0 1228800
192057271 __HiM_001 C Feb. 3, 2023, 6:40 p.m. OK GNU C++20 (64) TESTS 4 0 0
192077497 Kakashi_ C Feb. 3, 2023, 10:26 p.m. OK GNU C++20 (64) TESTS 4 0 0
192077244 fares_atef C Feb. 3, 2023, 10:22 p.m. OK GNU C++20 (64) TESTS 4 0 0
192072561 PraKash5 C Feb. 3, 2023, 9:10 p.m. OK GNU C++20 (64) TESTS 4 0 0
192069838 ssshanto C Feb. 3, 2023, 8:37 p.m. OK GNU C++20 (64) TESTS 4 0 0
192068077 HazemRawi C Feb. 3, 2023, 8:17 p.m. OK GNU C++20 (64) TESTS 4 0 0
192065183 Zena_Hossam C Feb. 3, 2023, 7:48 p.m. OK GNU C++20 (64) TESTS 4 0 0
192062509 Dhruv_Singh_Negi C Feb. 3, 2023, 7:24 p.m. OK GNU C++20 (64) TESTS 4 0 0
192060588 Aditya_gupta98 C Feb. 3, 2023, 7:07 p.m. OK GNU C++20 (64) TESTS 4 0 0
192059986 joyonta98 C Feb. 3, 2023, 7:02 p.m. OK GNU C++20 (64) TESTS 4 0 0
192052516 dimaglushkov C Feb. 3, 2023, 6:08 p.m. OK Go TESTS 4 15 18227200
192088062 july_tang C Feb. 4, 2023, 2:24 a.m. OK Go TESTS 4 15 18432000
192079170 meinego C Feb. 3, 2023, 11 p.m. OK Go TESTS 4 15 18841600
192097423 Anmol081202 C Feb. 4, 2023, 4:49 a.m. OK Java 11 TESTS 4 155 24473600
192066297 EdwardoSunny C Feb. 3, 2023, 7:59 p.m. OK Java 11 TESTS 4 156 24473600
192101007 Edge_Tree C Feb. 4, 2023, 5:27 a.m. OK Java 11 TESTS 4 171 24473600
192094375 CharmikaInupagolla C Feb. 4, 2023, 4:06 a.m. OK Java 11 TESTS 4 171 24678400
192093880 yudi23 C Feb. 4, 2023, 3:59 a.m. OK Java 11 TESTS 4 171 24678400
192068558 sam02202001 C Feb. 3, 2023, 8:22 p.m. OK Java 11 TESTS 4 171 25292800
192068853 phoenix_46 C Feb. 3, 2023, 8:26 p.m. OK Java 11 TESTS 4 186 0
192092150 vijay21 C Feb. 4, 2023, 3:30 a.m. OK Java 11 TESTS 4 186 25190400
192104577 gopichandreddy_29 C Feb. 4, 2023, 6 a.m. OK Java 11 TESTS 4 186 25292800
192085773 hieucode1102 C Feb. 4, 2023, 1:43 a.m. OK Java 11 TESTS 4 186 25292800
192072718 bruce_x001 C Feb. 3, 2023, 9:12 p.m. OK Java 17 TESTS 4 186 307200
192062955 rated21 C Feb. 3, 2023, 7:28 p.m. OK Java 17 TESTS 4 186 39731200
192099641 Mustela_Erminea C Feb. 4, 2023, 5:14 a.m. OK Java 17 TESTS 4 186 40345600
192099422 GooseGoop C Feb. 4, 2023, 5:12 a.m. OK Java 17 TESTS 4 187 40140800
192089896 izano C Feb. 4, 2023, 2:52 a.m. OK Java 17 TESTS 4 187 40243200
192091659 sauravmandal C Feb. 4, 2023, 3:21 a.m. OK Java 17 TESTS 4 187 40345600
192085503 burning_summer C Feb. 4, 2023, 1:37 a.m. OK Java 17 TESTS 4 202 40243200
192054144 Priyanshu8797 C Feb. 3, 2023, 6:19 p.m. OK Java 17 TESTS 4 202 40345600
192071490 Yousef_Badr C Feb. 3, 2023, 8:57 p.m. OK Java 17 TESTS 4 202 40448000
192061583 teraBhaiThugesh C Feb. 3, 2023, 7:16 p.m. OK Java 17 TESTS 4 218 204800
192051026 omarosama2114 C Feb. 3, 2023, 5:59 p.m. OK Java 8 TESTS 4 78 18739200
192097416 bleach__ C Feb. 4, 2023, 4:49 a.m. OK Java 8 TESTS 4 93 18739200
192059435 Aika426 C Feb. 3, 2023, 6:57 p.m. OK Java 8 TESTS 4 93 18739200
192051946 Zicode C Feb. 3, 2023, 6:04 p.m. OK Java 8 TESTS 4 93 18739200
192050384 Heisenberg_1 C Feb. 3, 2023, 5:55 p.m. OK Java 8 TESTS 4 93 18739200
192094495 chenyi040901 C Feb. 4, 2023, 4:08 a.m. OK Java 8 TESTS 4 108 19558400
192085129 toddliu26 C Feb. 4, 2023, 1:29 a.m. OK Java 8 TESTS 4 124 19558400
192084716 Prasad.Naidu_9 C Feb. 4, 2023, 1:20 a.m. OK Java 8 TESTS 4 124 19558400
192052771 cfsxm C Feb. 3, 2023, 6:09 p.m. OK Java 8 TESTS 4 124 19558400
192051040 Juhaied_nabid C Feb. 3, 2023, 5:59 p.m. OK Java 8 TESTS 4 124 19558400
192067357 Kay0 C Feb. 3, 2023, 8:09 p.m. OK Kotlin 1.6 TESTS 4 171 24678400
192086992 linxiaotian C Feb. 4, 2023, 2:06 a.m. OK Kotlin 1.6 TESTS 4 187 26521600
192100213 SoleilW C Feb. 4, 2023, 5:20 a.m. OK MS C++ 2017 TESTS 4 15 1126400
192073234 Zhora_.004 C Feb. 3, 2023, 9:19 p.m. OK MS C++ 2017 TESTS 4 15 1126400
192065556 aidnitra C Feb. 3, 2023, 7:51 p.m. OK MS C++ 2017 TESTS 4 15 1126400
192064560 iit2022042 C Feb. 3, 2023, 7:42 p.m. OK MS C++ 2017 TESTS 4 15 1126400
192062317 Peter_SafwatHBK C Feb. 3, 2023, 7:22 p.m. OK MS C++ 2017 TESTS 4 15 1126400
192058160 toglobal1st1 C Feb. 3, 2023, 6:47 p.m. OK MS C++ 2017 TESTS 4 15 1126400
192055916 1_shivam C Feb. 3, 2023, 6:31 p.m. OK MS C++ 2017 TESTS 4 15 1126400
192087794 GANDOR C Feb. 4, 2023, 2:20 a.m. OK MS C++ 2017 TESTS 4 31 1126400
192087320 Prycom C Feb. 4, 2023, 2:12 a.m. OK MS C++ 2017 TESTS 4 140 3379200
192059535 Mohamed_Hamed C Feb. 3, 2023, 6:58 p.m. OK PyPy 3 TESTS 4 77 19353600
192095343 Yash_Nandwana C Feb. 4, 2023, 4:21 a.m. OK PyPy 3 TESTS 4 92 20684800
192073534 WalrusRamen21 C Feb. 3, 2023, 9:23 p.m. OK PyPy 3 TESTS 4 93 17715200
192069903 Mansurbek C Feb. 3, 2023, 8:38 p.m. OK PyPy 3 TESTS 4 108 19558400
192062445 zx4r C Feb. 3, 2023, 7:24 p.m. OK PyPy 3 TESTS 4 108 19660800
192098191 JUBHAI C Feb. 4, 2023, 4:58 a.m. OK PyPy 3 TESTS 4 124 19558400
192054379 darknight_21 C Feb. 3, 2023, 6:20 p.m. OK PyPy 3 TESTS 4 171 44236800
192061086 shinu8 C Feb. 3, 2023, 7:11 p.m. OK PyPy 3-64 TESTS 4 46 28774400
192103111 anshumannandan C Feb. 4, 2023, 5:47 a.m. OK PyPy 3-64 TESTS 4 46 30208000
192092614 NABIEVMEHRUBON C Feb. 4, 2023, 3:38 a.m. OK PyPy 3-64 TESTS 4 46 30310400
192068271 rudrashah C Feb. 3, 2023, 8:19 p.m. OK PyPy 3-64 TESTS 4 46 30310400
192073260 slickk C Feb. 3, 2023, 9:19 p.m. OK PyPy 3-64 TESTS 4 46 30412800
192081995 crapcode C Feb. 4, 2023, 12:12 a.m. OK PyPy 3-64 TESTS 4 61 28774400
192102353 meat124 C Feb. 4, 2023, 5:40 a.m. OK PyPy 3-64 TESTS 4 61 30310400
192058173 sarthak2308 C Feb. 3, 2023, 6:47 p.m. OK PyPy 3-64 TESTS 4 61 30412800
192099732 Yarn C Feb. 4, 2023, 5:15 a.m. OK PyPy 3-64 TESTS 4 61 30720000
192079248 bluestareesh C Feb. 3, 2023, 11:02 p.m. OK PyPy 3-64 TESTS 4 61 30822400
192104304 dragonball_2002 C Feb. 4, 2023, 5:58 a.m. OK Python 3 TESTS 4 31 4505600
192067385 omark1212 C Feb. 3, 2023, 8:10 p.m. OK Python 3 TESTS 4 46 204800
192099235 srikrishnasaikota C Feb. 4, 2023, 5:10 a.m. OK Python 3 TESTS 4 46 4300800
192102399 maksimzarubin20002000 C Feb. 4, 2023, 5:40 a.m. OK Python 3 TESTS 4 46 4505600
192075789 doublelei C Feb. 3, 2023, 9:56 p.m. OK Python 3 TESTS 4 46 4505600
192073981 Abraham_Shimekt C Feb. 3, 2023, 9:29 p.m. OK Python 3 TESTS 4 46 4505600
192070457 Typhoons C Feb. 3, 2023, 8:44 p.m. OK Python 3 TESTS 4 46 4505600
192068867 DonC C Feb. 3, 2023, 8:26 p.m. OK Python 3 TESTS 4 46 4505600
192064644 nik_enjoy C Feb. 3, 2023, 7:43 p.m. OK Python 3 TESTS 4 46 4505600
192055963 omarkurde C Feb. 3, 2023, 6:31 p.m. OK Python 3 TESTS 4 46 4505600
192071584 Hyrulia C Feb. 3, 2023, 8:58 p.m. OK Rust 2021 TESTS 4 0 1228800
192060532 franv C Feb. 3, 2023, 7:06 p.m. OK Rust 2021 TESTS 4 0 1228800
192057065 Bore_lis C Feb. 3, 2023, 6:39 p.m. OK Rust 2021 TESTS 4 0 1228800
192055437 sp4c3_c0wb0y C Feb. 3, 2023, 6:27 p.m. OK Rust 2021 TESTS 4 0 1433600
192081121 vjudge4 C Feb. 3, 2023, 11:48 p.m. OK Rust 2021 TESTS 4 0 1740800
192059606 a1000 C Feb. 3, 2023, 6:58 p.m. OK Rust 2021 TESTS 4 15 1433600

remove filters

Back to search problems