Educational Codeforces Round 160 (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
1913 Educational Codeforces Round 160 (Rated for Div. 2) FINISHED False 7200 34269863 Dec. 18, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 29737 ) B Swap and Delete PROGRAMMING strings

B"You are given a binary string s (a string consisting only of 0-s and 1-s). You can perform two types of operations on s : You can perform these operations any number of times and in any order. Let's name a string you've got after performing operations above as t . The string t is good if for each i from 1 to |t| t_i neq s_i ( |t| is the length of the string t ). The empty string is always good. Note that you are comparing the resulting string t with the initial string s . What is the minimum total cost to make the string t good? The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Then t test cases follow. The only line of each test case contains a binary string s ( 1 <= |s| <= 2 cdot 10^5 ; s_i in { 0, 1 } ) -- the initial string, consisting of characters 0 and/or 1. Additional constraint on the input: the total length of all strings s doesn't exceed 2 cdot 10^5 . For each test case, print one integer -- the minimum total cost to make string t good. In the first test case, you have to delete a character from s to get the empty string t . Only then t becomes good. One deletion costs 1 coin. In the second test case, you can, for example, delete the second character from s to get the string 01, and then swap the first and second characters to get the string t = 10. String t is good, since t_1 neq s_1 and t_2 neq s_2 . The total cost is 1 coin. In the third test case, you can, for example, swap s_1 with s_2 , swap s_3 with s_4 , swap s_5 with s_7 , s_6 with s_8 and s_9 with s_{10} . You'll get t = 1010001110. All swap operations are free, so the total cost is 0 . "...

Tutorials

123493

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
237828461 asutosh1998 B Dec. 18, 2023, 6:03 p.m. OK C# 10 TESTS 4 93 1228800
237823839 SmartWIN B Dec. 18, 2023, 5:25 p.m. OK C# 10 TESTS 4 171 819200
237852879 sh_arman B Dec. 19, 2023, 2:07 a.m. OK C# 10 TESTS 4 405 6656000
237862238 Measheep B Dec. 19, 2023, 2:36 a.m. OK Clang++20 Diagnostics TESTS 4 62 13004800
237832228 suryanshiitkgp B Dec. 18, 2023, 6:42 p.m. OK Clang++20 Diagnostics TESTS 4 186 24166400
237848639 NenadDapic B Dec. 19, 2023, 12:25 a.m. OK FPC TESTS 4 46 1433600
237831741 eugalt B Dec. 18, 2023, 6:36 p.m. OK GNU C11 TESTS 4 15 204800
237868723 VedantPahariya B Dec. 19, 2023, 4:34 a.m. OK GNU C11 TESTS 4 15 204800
237819028 shah_mehul B Dec. 18, 2023, 4:52 p.m. OK GNU C11 TESTS 4 46 204800
237820338 mohamedali.benltaief B Dec. 18, 2023, 5:01 p.m. OK GNU C11 TESTS 4 46 204800
237832511 Galectic B Dec. 18, 2023, 6:46 p.m. OK GNU C11 TESTS 4 46 204800
237809468 sabhinav22 B Dec. 18, 2023, 4:24 p.m. OK GNU C11 TESTS 4 46 1740800
237828536 vanshagarwal B Dec. 18, 2023, 6:04 p.m. OK GNU C11 TESTS 4 46 1945600
237813755 M_SQRT B Dec. 18, 2023, 4:32 p.m. OK GNU C++14 TESTS 4 15 102400
237849179 qjm B Dec. 19, 2023, 12:46 a.m. OK GNU C++14 TESTS 4 15 204800
237850142 liuli B Dec. 19, 2023, 1:20 a.m. OK GNU C++14 TESTS 4 15 512000
237863143 minus_50 B Dec. 19, 2023, 2:56 a.m. OK GNU C++14 TESTS 4 15 512000
237863838 zhangmingzu B Dec. 19, 2023, 3:10 a.m. OK GNU C++14 TESTS 4 15 512000
237865721 bb_16 B Dec. 19, 2023, 3:43 a.m. OK GNU C++14 TESTS 4 15 512000
237874311 chebertentek B Dec. 19, 2023, 5:48 a.m. OK GNU C++14 TESTS 4 15 512000
237874504 chebertentek B Dec. 19, 2023, 5:50 a.m. OK GNU C++14 TESTS 4 15 512000
237874712 OUyio B Dec. 19, 2023, 5:53 a.m. OK GNU C++14 TESTS 4 15 512000
237875545 garvil28 B Dec. 19, 2023, 6:01 a.m. OK GNU C++14 TESTS 4 15 512000
237827838 zeus_pro_max B Dec. 18, 2023, 5:57 p.m. OK GNU C++17 TESTS 4 0 512000
237814758 Ankit_1703 B Dec. 18, 2023, 4:34 p.m. OK GNU C++17 TESTS 4 0 512000
237821896 Pointbreak65 B Dec. 18, 2023, 5:11 p.m. OK GNU C++17 TESTS 4 0 512000
237867568 iamfbb B Dec. 19, 2023, 4:16 a.m. OK GNU C++17 TESTS 4 0 512000
237846887 n0_or B Dec. 18, 2023, 11:15 p.m. OK GNU C++17 TESTS 4 0 512000
237832359 coldbr3w B Dec. 18, 2023, 6:44 p.m. OK GNU C++17 TESTS 4 0 512000
237828512 bedobesar19 B Dec. 18, 2023, 6:03 p.m. OK GNU C++17 TESTS 4 0 8499200
237825669 nazat_08 B Dec. 18, 2023, 5:39 p.m. OK GNU C++17 TESTS 4 15 204800
237852769 verywater B Dec. 19, 2023, 2:05 a.m. OK GNU C++17 TESTS 4 15 204800
237853166 Lskkkno3 B Dec. 19, 2023, 2:15 a.m. OK GNU C++17 TESTS 4 15 204800
237821470 duadua666 B Dec. 18, 2023, 5:08 p.m. OK GNU C++17 (64) TESTS 4 0 512000
237863763 invaded B Dec. 19, 2023, 3:08 a.m. OK GNU C++17 (64) TESTS 4 0 512000
237853912 voidXscorpion B Dec. 19, 2023, 2:32 a.m. OK GNU C++17 (64) TESTS 4 0 512000
237853898 pacificpi B Dec. 19, 2023, 2:32 a.m. OK GNU C++17 (64) TESTS 4 0 512000
237850465 fs20091003 B Dec. 19, 2023, 1:31 a.m. OK GNU C++17 (64) TESTS 4 0 512000
237844481 hilbertmf B Dec. 18, 2023, 10:01 p.m. OK GNU C++17 (64) TESTS 4 0 512000
237820750 Roaa_Abdelwhab B Dec. 18, 2023, 5:03 p.m. OK GNU C++17 (64) TESTS 4 0 512000
237817074 obito0446m B Dec. 18, 2023, 4:42 p.m. OK GNU C++17 (64) TESTS 4 0 512000
237816033 privatehsy B Dec. 18, 2023, 4:38 p.m. OK GNU C++17 (64) TESTS 4 0 512000
237811298 Darkblue_Night B Dec. 18, 2023, 4:28 p.m. OK GNU C++17 (64) TESTS 4 0 512000
237871202 Dorayakiee_Fan B Dec. 19, 2023, 5:09 a.m. OK GNU C++20 (64) TESTS 4 0 512000
237870065 BigPapa B Dec. 19, 2023, 4:54 a.m. OK GNU C++20 (64) TESTS 4 0 512000
237869591 NexTopper B Dec. 19, 2023, 4:48 a.m. OK GNU C++20 (64) TESTS 4 0 512000
237871352 code_by_ibodullo B Dec. 19, 2023, 5:11 a.m. OK GNU C++20 (64) TESTS 4 0 512000
237871503 Ke_scholar B Dec. 19, 2023, 5:13 a.m. OK GNU C++20 (64) TESTS 4 0 512000
237871900 JaafarMustafa B Dec. 19, 2023, 5:18 a.m. OK GNU C++20 (64) TESTS 4 0 512000
237873424 1905gkp B Dec. 19, 2023, 5:38 a.m. OK GNU C++20 (64) TESTS 4 0 512000
237873648 abdulla.bin.ah B Dec. 19, 2023, 5:41 a.m. OK GNU C++20 (64) TESTS 4 0 512000
237874579 Adnan_Zaman_Niloy B Dec. 19, 2023, 5:51 a.m. OK GNU C++20 (64) TESTS 4 0 512000
237875505 Verma_26 B Dec. 19, 2023, 6:01 a.m. OK GNU C++20 (64) TESTS 4 0 512000
237850114 SadFriedRice B Dec. 19, 2023, 1:19 a.m. OK Go TESTS 4 31 1331200
237845946 menezesd2 B Dec. 18, 2023, 10:44 p.m. OK Go TESTS 4 592 1331200
237826087 victorborzov B Dec. 18, 2023, 5:44 p.m. OK Haskell TESTS 4 93 17920000
237809988 rajkothari634 B Dec. 18, 2023, 4:25 p.m. OK Java 11 TESTS 4 249 0
237869693 vijayluxmimaddheshiya02 B Dec. 19, 2023, 4:49 a.m. OK Java 11 TESTS 4 264 0
237863738 anonymous_bandit B Dec. 19, 2023, 3:08 a.m. OK Java 11 TESTS 4 280 0
237809477 dandupoojitha_223 B Dec. 18, 2023, 4:24 p.m. OK Java 11 TESTS 4 296 0
237809131 pradeep_0411 B Dec. 18, 2023, 4:23 p.m. OK Java 11 TESTS 4 296 0
237820027 mohammed.rabii B Dec. 18, 2023, 4:58 p.m. OK Java 17 TESTS 4 187 512000
237809171 dracula2003 B Dec. 18, 2023, 4:23 p.m. OK Java 17 TESTS 4 202 307200
237820658 mohammed.rabii B Dec. 18, 2023, 5:02 p.m. OK Java 17 TESTS 4 217 204800
237811566 muskan_jais B Dec. 18, 2023, 4:28 p.m. OK Java 17 TESTS 4 233 0
237829681 dineshchandran311 B Dec. 18, 2023, 6:15 p.m. OK Java 17 TESTS 4 233 307200
237831531 Jagnath_Reddy B Dec. 18, 2023, 6:34 p.m. OK Java 17 TESTS 4 234 512000
237816884 navdeep__joshi B Dec. 18, 2023, 4:41 p.m. OK Java 17 TESTS 4 234 614400
237815469 Navdeep_joshi5 B Dec. 18, 2023, 4:34 p.m. OK Java 17 TESTS 4 234 614400
237832820 vibhuti_2201 B Dec. 18, 2023, 6:49 p.m. OK Java 17 TESTS 4 249 0
237833488 Abood111 B Dec. 18, 2023, 6:57 p.m. OK Java 17 TESTS 4 249 512000
237834371 yashvardhansingh112233 B Dec. 18, 2023, 7:08 p.m. OK Java 21 TESTS 4 218 0
237823814 java_noob69 B Dec. 18, 2023, 5:25 p.m. OK Java 21 TESTS 4 249 15974400
237849953 goalboy B Dec. 19, 2023, 1:13 a.m. OK Java 21 TESTS 4 342 512000
237813655 CMRIT25_21R01A0591 B Dec. 18, 2023, 4:32 p.m. OK Java 21 TESTS 4 343 102400
237811059 man_ishhh2512 B Dec. 18, 2023, 4:27 p.m. OK Java 21 TESTS 4 358 4710400
237849656 Rtitk B Dec. 19, 2023, 1:03 a.m. OK Java 8 TESTS 4 156 0
237821882 saicharanbim B Dec. 18, 2023, 5:11 p.m. OK Java 8 TESTS 4 170 0
237868304 naitikvarshney B Dec. 19, 2023, 4:28 a.m. OK Java 8 TESTS 4 171 0
237831610 Sumitsingh7 B Dec. 18, 2023, 6:35 p.m. OK Java 8 TESTS 4 171 7475200
237868246 amit_roy B Dec. 19, 2023, 4:27 a.m. OK Java 8 TESTS 4 202 0
237848644 vattamsneha B Dec. 19, 2023, 12:25 a.m. OK Java 8 TESTS 4 202 0
237830540 Nirvanaa B Dec. 18, 2023, 6:23 p.m. OK Java 8 TESTS 4 202 0
237811130 MarcAS B Dec. 18, 2023, 4:27 p.m. OK Java 8 TESTS 4 202 0
237810946 reactioner B Dec. 18, 2023, 4:27 p.m. OK Java 8 TESTS 4 202 0
237821835 __int32 B Dec. 18, 2023, 5:10 p.m. OK Java 8 TESTS 4 218 0
237820136 maxK99 B Dec. 18, 2023, 4:59 p.m. OK MS C++ 2017 TESTS 4 15 409600
237850034 FONGLI B Dec. 19, 2023, 1:16 a.m. OK MS C++ 2017 TESTS 4 46 204800
237864869 xxkaxy B Dec. 19, 2023, 3:28 a.m. OK MS C++ 2017 TESTS 4 61 614400
237813457 codewithyogesh B Dec. 18, 2023, 4:31 p.m. OK MS C++ 2017 TESTS 4 61 1843200
237826339 Ysb04 B Dec. 18, 2023, 5:46 p.m. OK PyPy 3 TESTS 4 139 5836800
237825079 seeforty4040 B Dec. 18, 2023, 5:35 p.m. OK PyPy 3 TESTS 4 249 5836800
237856353 CS_S B Dec. 19, 2023, 2:34 a.m. OK PyPy 3 TESTS 4 280 5939200
237826680 jvatsal0709 B Dec. 18, 2023, 5:47 p.m. OK PyPy 3 TESTS 4 280 6041600
237814964 AbhijeetSinghKamboj B Dec. 18, 2023, 4:34 p.m. OK PyPy 3 TESTS 4 358 10854400
237827182 mcb1303 B Dec. 18, 2023, 5:52 p.m. OK PyPy 3 TESTS 4 373 10035200
237814998 muichirotokito B Dec. 18, 2023, 4:34 p.m. OK PyPy 3 TESTS 4 374 16179200
237812466 21r01a0420 B Dec. 18, 2023, 4:30 p.m. OK PyPy 3 TESTS 4 390 10240000
237812118 prasad58 B Dec. 18, 2023, 4:29 p.m. OK PyPy 3 TESTS 4 390 10240000
237811386 prasad73 B Dec. 18, 2023, 4:28 p.m. OK PyPy 3 TESTS 4 390 10240000
237835951 SamuelTull B Dec. 18, 2023, 7:27 p.m. OK PyPy 3-64 TESTS 4 77 3584000
237816693 giriraj_parik B Dec. 18, 2023, 4:40 p.m. OK PyPy 3-64 TESTS 4 77 6860800
237836191 oneku16 B Dec. 18, 2023, 7:30 p.m. OK PyPy 3-64 TESTS 4 77 12902400
237835283 oneku16 B Dec. 18, 2023, 7:19 p.m. OK PyPy 3-64 TESTS 4 92 18022400
237867581 NABIEVMEHRUBON B Dec. 19, 2023, 4:16 a.m. OK PyPy 3-64 TESTS 4 93 7680000
237824956 AS2905 B Dec. 18, 2023, 5:34 p.m. OK PyPy 3-64 TESTS 4 93 8601600
237824209 bruher B Dec. 18, 2023, 5:28 p.m. OK PyPy 3-64 TESTS 4 109 5529600
237833671 kaashmonee B Dec. 18, 2023, 6:59 p.m. OK PyPy 3-64 TESTS 4 109 8294400
237819222 kinglykang B Dec. 18, 2023, 4:54 p.m. OK PyPy 3-64 TESTS 4 109 8908800
237827993 rmr B Dec. 18, 2023, 5:59 p.m. OK PyPy 3-64 TESTS 4 124 8704000
237842634 eugalt B Dec. 18, 2023, 9:18 p.m. OK Python 3 TESTS 4 46 1024000
237821825 chiragvarshney_9528 B Dec. 18, 2023, 5:10 p.m. OK Python 3 TESTS 4 77 512000
237815761 eugalt B Dec. 18, 2023, 4:37 p.m. OK Python 3 TESTS 4 77 1331200
237811913 eugalt B Dec. 18, 2023, 4:29 p.m. OK Python 3 TESTS 4 77 4198400
237864158 pennymagic156 B Dec. 19, 2023, 3:16 a.m. OK Python 3 TESTS 4 78 512000
237809413 Mtir B Dec. 18, 2023, 4:24 p.m. OK Python 3 TESTS 4 92 614400
237841506 vikku_7 B Dec. 18, 2023, 8:55 p.m. OK Python 3 TESTS 4 93 512000
237849994 emeraldbullet123 B Dec. 19, 2023, 1:14 a.m. OK Python 3 TESTS 4 93 1126400
237815984 eugalt B Dec. 18, 2023, 4:37 p.m. OK Python 3 TESTS 4 93 1126400
237813899 eugalt B Dec. 18, 2023, 4:32 p.m. OK Python 3 TESTS 4 93 4198400
237811041 sabbirahmeds877 B Dec. 18, 2023, 4:27 p.m. OK Ruby 3 TESTS 4 483 819200
237812588 Hell__Fire B Dec. 18, 2023, 4:30 p.m. OK Rust 2021 TESTS 4 93 716800
237830480 vstiff B Dec. 18, 2023, 6:23 p.m. OK Rust 2021 TESTS 4 93 819200
237833703 DreadedHippy B Dec. 18, 2023, 6:59 p.m. OK Rust 2021 TESTS 4 124 2355200

remove filters

Back to search problems