Codeforces Round 913 (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
1907 Codeforces Round 913 (Div. 3) FINISHED False 8100 35392463 Dec. 5, 2023, 2:45 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 20797 ) C Removal of Unattractive Pairs PROGRAMMING constructive algorithms greedy math strings

B'Vlad found a string s consisting of n lowercase Latin letters, and he wants to make it as short as possible. To do this, he can remove any pair of adjacent characters from s any number of times, provided they are different. For example, if s =racoon, then by removing one pair of characters he can obtain the strings coon, roon, raon, and raco, but he cannot obtain racn (because the removed letters were the same) or rcon (because the removed letters were not adjacent). What is the minimum length Vlad can achieve by applying any number of deletions? The first line of the input contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Descriptions of the test cases follow. The first line of each test case contains a single integer n ( 1 <= n <= 2 cdot 10^5 ) -- the length of the string s . The second line of each test case contains the string s consisting of n lowercase Latin letters. It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, output a single number --the minimum length of the string s , after removing pairs of adjacent characters with different values. In the first test case of the example, you need to act as follows: "aabc" rightarrow "ac" rightarrow "". Note that with a different order of deletions, the string will not become empty. '...

Tutorials

Codeforces Round 913 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
235986044 chrisTris C Dec. 6, 2023, 2 a.m. OK C# 10 TESTS 14 108 3276800
235945141 Likopin C Dec. 5, 2023, 4:49 p.m. OK C# 10 TESTS 10 109 3072000
235987762 sh_arman C Dec. 6, 2023, 2:35 a.m. OK C# 10 TESTS 14 124 2457600
235988533 Tech44 C Dec. 6, 2023, 2:46 a.m. OK Clang++20 Diagnostics TESTS 14 139 13004800
235998902 vjudge2 C Dec. 6, 2023, 5:28 a.m. OK Clang++20 Diagnostics TESTS 14 202 13004800
235954943 arafat-maruf C Dec. 5, 2023, 5:24 p.m. OK GNU C11 TESTS 10 61 204800
235997577 Devesh121 C Dec. 6, 2023, 5:11 a.m. OK GNU C++14 TESTS 14 15 512000
235997050 rahilshah17 C Dec. 6, 2023, 5:04 a.m. OK GNU C++14 TESTS 14 15 512000
235990163 ahsanhabibsadik123 C Dec. 6, 2023, 3:10 a.m. OK GNU C++14 TESTS 14 15 512000
235989350 874641984 C Dec. 6, 2023, 2:58 a.m. OK GNU C++14 TESTS 14 15 512000
235957140 shan_aruj C Dec. 5, 2023, 5:40 p.m. OK GNU C++14 TESTS 10 15 512000
235955765 Ricexies_the_noobie C Dec. 5, 2023, 5:29 p.m. OK GNU C++14 TESTS 10 15 512000
235955695 l_returns C Dec. 5, 2023, 5:28 p.m. OK GNU C++14 TESTS 10 15 512000
235954465 Trainer_Marvin C Dec. 5, 2023, 5:21 p.m. OK GNU C++14 TESTS 10 15 512000
235948344 tthanhloi2007 C Dec. 5, 2023, 4:56 p.m. OK GNU C++14 TESTS 10 15 512000
236000421 Anderw_ C Dec. 6, 2023, 5:48 a.m. OK GNU C++14 TESTS 14 15 512000
235956081 jmmochko C Dec. 5, 2023, 5:31 p.m. OK GNU C++17 TESTS 10 15 0
235945695 razv C Dec. 5, 2023, 4:50 p.m. OK GNU C++17 TESTS 10 15 0
235958457 zeus_pro_max C Dec. 5, 2023, 5:50 p.m. OK GNU C++17 TESTS 10 15 0
235996665 RyotoBUAA C Dec. 6, 2023, 4:59 a.m. OK GNU C++17 TESTS 14 15 204800
235950978 wikolego C Dec. 5, 2023, 5:02 p.m. OK GNU C++17 TESTS 10 15 204800
235949323 Ease C Dec. 5, 2023, 4:58 p.m. OK GNU C++17 TESTS 10 15 204800
235947048 dhruv35 C Dec. 5, 2023, 4:53 p.m. OK GNU C++17 TESTS 10 15 204800
235944948 rahatraihan C Dec. 5, 2023, 4:48 p.m. OK GNU C++17 TESTS 10 15 204800
235944728 r_arnob C Dec. 5, 2023, 4:48 p.m. OK GNU C++17 TESTS 10 15 204800
235997489 guptadeepanshu713 C Dec. 6, 2023, 5:10 a.m. OK GNU C++17 TESTS 14 15 204800
235946300 Jason__i C Dec. 5, 2023, 4:52 p.m. OK GNU C++17 (64) TESTS 10 15 0
235986936 wxiaobaivv C Dec. 6, 2023, 2:19 a.m. OK GNU C++17 (64) TESTS 14 15 0
235988846 bo_bo_ C Dec. 6, 2023, 2:51 a.m. OK GNU C++17 (64) TESTS 14 15 102400
235986597 LXH-cat C Dec. 6, 2023, 2:12 a.m. OK GNU C++17 (64) TESTS 14 15 204800
235986360 Darkblue_Night C Dec. 6, 2023, 2:07 a.m. OK GNU C++17 (64) TESTS 14 15 204800
235988838 Einstein1234 C Dec. 6, 2023, 2:51 a.m. OK GNU C++17 (64) TESTS 14 15 409600
235995301 ROTA2 C Dec. 6, 2023, 4:40 a.m. OK GNU C++17 (64) TESTS 14 15 512000
236001717 hskyr- C Dec. 6, 2023, 6:02 a.m. OK GNU C++17 (64) TESTS 14 15 512000
235995562 fzyz2020 C Dec. 6, 2023, 4:44 a.m. OK GNU C++17 (64) TESTS 14 15 512000
235995044 xingyunline C Dec. 6, 2023, 4:36 a.m. OK GNU C++17 (64) TESTS 14 15 512000
235993993 solaidee C Dec. 6, 2023, 4:19 a.m. OK GNU C++20 (64) TESTS 14 0 0
235993910 Asbeforezb C Dec. 6, 2023, 4:18 a.m. OK GNU C++20 (64) TESTS 14 0 512000
235990407 Yahia-zhran1 C Dec. 6, 2023, 3:15 a.m. OK GNU C++20 (64) TESTS 14 0 512000
235983570 euyia2 C Dec. 6, 2023, 1:02 a.m. OK GNU C++20 (64) TESTS 14 0 512000
235982066 chawinkn C Dec. 6, 2023, 12:18 a.m. OK GNU C++20 (64) TESTS 14 0 512000
235966280 Md_Tasrik C Dec. 5, 2023, 7:07 p.m. OK GNU C++20 (64) TESTS 10 0 512000
235963731 Ibraheem.MH C Dec. 5, 2023, 6:39 p.m. OK GNU C++20 (64) TESTS 10 0 512000
235956638 Imran_Raza C Dec. 5, 2023, 5:36 p.m. OK GNU C++20 (64) TESTS 10 0 512000
235956511 schmosby C Dec. 5, 2023, 5:35 p.m. OK GNU C++20 (64) TESTS 10 0 512000
235999736 kuguadawang C Dec. 6, 2023, 5:40 a.m. OK GNU C++20 (64) TESTS 14 0 512000
235983371 SadFriedRice C Dec. 6, 2023, 12:57 a.m. OK Go TESTS 14 31 3174400
235956586 veerX01 C Dec. 5, 2023, 5:35 p.m. OK Go TESTS 10 701 3993600
235962026 Yousef_Badr C Dec. 5, 2023, 6:22 p.m. OK Java 11 TESTS 10 171 0
235944131 BurnerAce C Dec. 5, 2023, 4:46 p.m. OK Java 11 TESTS 10 202 0
235958736 druti6 C Dec. 5, 2023, 5:52 p.m. OK Java 11 TESTS 10 218 0
235957425 rajneesh.osho C Dec. 5, 2023, 5:42 p.m. OK Java 11 TESTS 10 233 0
235999481 siddak_18 C Dec. 6, 2023, 5:36 a.m. OK Java 11 TESTS 14 312 0
235994543 achal5623 C Dec. 6, 2023, 4:28 a.m. OK Java 11 TESTS 14 312 0
235967614 Kushagra8009 C Dec. 5, 2023, 7:23 p.m. OK Java 11 TESTS 10 312 0
235946178 monukumar123 C Dec. 5, 2023, 4:51 p.m. OK Java 11 TESTS 10 312 0
235960202 Abood19 C Dec. 5, 2023, 6:05 p.m. OK Java 17 TESTS 10 170 614400
235946566 pallavkumar6200 C Dec. 5, 2023, 4:52 p.m. OK Java 17 TESTS 10 186 409600
235944561 shashankp10 C Dec. 5, 2023, 4:47 p.m. OK Java 17 TESTS 10 218 409600
235995859 StrangeBai C Dec. 6, 2023, 4:49 a.m. OK Java 17 TESTS 14 233 512000
235953853 tejasdharmik12 C Dec. 5, 2023, 5:17 p.m. OK Java 17 TESTS 10 249 716800
235987131 QianCCC C Dec. 6, 2023, 2:23 a.m. OK Java 17 TESTS 14 264 819200
235951252 Nagendravarma C Dec. 5, 2023, 5:03 p.m. OK Java 17 TESTS 10 280 204800
235949608 Ronak_Thesiya C Dec. 5, 2023, 4:58 p.m. OK Java 17 TESTS 10 280 409600
235953366 ram_666 C Dec. 5, 2023, 5:14 p.m. OK Java 17 TESTS 10 280 512000
235955211 mo_heat C Dec. 5, 2023, 5:25 p.m. OK Java 17 TESTS 10 280 716800
235959430 vikasseervi357 C Dec. 5, 2023, 5:58 p.m. OK Java 21 TESTS 10 218 102400
235959491 java_noob69 C Dec. 5, 2023, 5:59 p.m. OK Java 21 TESTS 10 265 15974400
235953613 ramitg254 C Dec. 5, 2023, 5:15 p.m. OK Java 21 TESTS 10 311 204800
235998114 darshanjan-entrepreneur C Dec. 6, 2023, 5:18 a.m. OK Java 21 TESTS 14 311 307200
235987782 nikesh1057 C Dec. 6, 2023, 2:35 a.m. OK Java 21 TESTS 14 327 102400
235947363 Surajit007 C Dec. 5, 2023, 4:54 p.m. OK Java 21 TESTS 10 327 409600
235995251 cnzh C Dec. 6, 2023, 4:39 a.m. OK Java 21 TESTS 14 342 512000
235945670 Tocoung C Dec. 5, 2023, 4:50 p.m. OK Java 21 TESTS 10 373 204800
235945536 prithviraj051105 C Dec. 5, 2023, 4:50 p.m. OK Java 21 TESTS 10 373 204800
235945524 Samsritha_putta C Dec. 5, 2023, 4:50 p.m. OK Java 21 TESTS 10 374 512000
235994881 Java_Programmer C Dec. 6, 2023, 4:34 a.m. OK Java 8 TESTS 14 108 0
235989685 arpita010 C Dec. 6, 2023, 3:04 a.m. OK Java 8 TESTS 14 124 0
235949488 mohamedhassan_c C Dec. 5, 2023, 4:58 p.m. OK Java 8 TESTS 10 124 5836800
235954856 Akarsh2810 C Dec. 5, 2023, 5:23 p.m. OK Java 8 TESTS 10 139 0
235953358 Bill35 C Dec. 5, 2023, 5:14 p.m. OK Java 8 TESTS 10 171 0
235966252 Sumitsingh7 C Dec. 5, 2023, 7:07 p.m. OK Java 8 TESTS 10 217 7680000
235989761 BlueGronto C Dec. 6, 2023, 3:05 a.m. OK Java 8 TESTS 14 218 0
235956458 21241a6712 C Dec. 5, 2023, 5:34 p.m. OK Java 8 TESTS 10 218 0
235998452 Sandeep_9198 C Dec. 6, 2023, 5:22 a.m. OK Java 8 TESTS 14 233 0
235959543 dev22_sharma C Dec. 5, 2023, 5:59 p.m. OK Java 8 TESTS 10 234 0
235944419 mishagam C Dec. 5, 2023, 4:47 p.m. OK Kotlin 1.7 TESTS 10 404 8908800
235964261 _a253 C Dec. 5, 2023, 6:44 p.m. OK Kotlin 1.7 TESTS 10 451 25190400
235955350 tatianyi C Dec. 5, 2023, 5:26 p.m. OK MS C++ 2017 TESTS 10 31 409600
235986748 WXL. C Dec. 6, 2023, 2:15 a.m. OK MS C++ 2017 TESTS 14 46 409600
235975540 richardotcom C Dec. 5, 2023, 9:15 p.m. OK MS C++ 2017 TESTS 14 46 409600
235988266 Alxyddog C Dec. 6, 2023, 2:42 a.m. OK MS C++ 2017 TESTS 14 61 409600
236000035 Ravitosh C Dec. 6, 2023, 5:44 a.m. OK MS C++ 2017 TESTS 14 62 409600
235979905 khalaf512 C Dec. 5, 2023, 11:05 p.m. OK MS C++ 2017 TESTS 14 62 409600
235978696 codewithyogesh C Dec. 5, 2023, 10:27 p.m. OK MS C++ 2017 TESTS 14 78 409600
235944028 onedriection C Dec. 5, 2023, 4:46 p.m. OK MS C++ 2017 TESTS 10 92 1024000
235944671 amit_shinde C Dec. 5, 2023, 4:48 p.m. OK MS C++ 2017 TESTS 10 93 0
235987036 EntityZephyr C Dec. 6, 2023, 2:21 a.m. OK MS C++ 2017 TESTS 14 108 102400
235980089 mr_dramm C Dec. 5, 2023, 11:11 p.m. OK Node.js TESTS 14 249 6860800
235978706 rsFalse C Dec. 5, 2023, 10:27 p.m. OK Perl TESTS 14 171 17920000
235962096 dagmat C Dec. 5, 2023, 6:23 p.m. OK PyPy 3 TESTS 10 155 5427200
235975083 khanter_ C Dec. 5, 2023, 9:05 p.m. OK PyPy 3 TESTS 14 171 7475200
235999334 acken C Dec. 6, 2023, 5:34 a.m. OK PyPy 3 TESTS 14 171 9113600
235946457 CMRIT_22R05a6715 C Dec. 5, 2023, 4:52 p.m. OK PyPy 3 TESTS 10 311 5836800
235972186 Mashul C Dec. 5, 2023, 8:21 p.m. OK PyPy 3 TESTS 14 311 8499200
235945669 22r05a0510 C Dec. 5, 2023, 4:50 p.m. OK PyPy 3 TESTS 10 327 5836800
235945023 21r01a6601 C Dec. 5, 2023, 4:48 p.m. OK PyPy 3 TESTS 10 327 5836800
235975202 MadrasMacho C Dec. 5, 2023, 9:08 p.m. OK PyPy 3 TESTS 14 327 6963200
235954914 Lullabaly C Dec. 5, 2023, 5:23 p.m. OK PyPy 3 TESTS 10 358 6246400
235947045 s.pris C Dec. 5, 2023, 4:53 p.m. OK PyPy 3 TESTS 10 390 7168000
235971952 gardengnome C Dec. 5, 2023, 8:18 p.m. OK PyPy 3-64 TESTS 14 77 5427200
235945710 sushmanth.dampur8780 C Dec. 5, 2023, 4:50 p.m. OK PyPy 3-64 TESTS 10 108 7782400
235961654 DP_FORMULA C Dec. 5, 2023, 6:19 p.m. OK PyPy 3-64 TESTS 10 124 8294400
235993682 himanshuraj08 C Dec. 6, 2023, 4:14 a.m. OK PyPy 3-64 TESTS 14 140 9420800
235952084 alex391a C Dec. 5, 2023, 5:07 p.m. OK PyPy 3-64 TESTS 10 155 9216000
235943672 qtq2 C Dec. 5, 2023, 4:45 p.m. OK PyPy 3-64 TESTS 10 155 13107200
236000359 K-423 C Dec. 6, 2023, 5:47 a.m. OK PyPy 3-64 TESTS 14 170 9113600
235943785 kristian_achwan C Dec. 5, 2023, 4:46 p.m. OK PyPy 3-64 TESTS 10 171 9523200
235954340 carolinux C Dec. 5, 2023, 5:20 p.m. OK PyPy 3-64 TESTS 10 186 9420800
235958470 Tobzhan C Dec. 5, 2023, 5:50 p.m. OK PyPy 3-64 TESTS 10 186 10035200
235955769 aureliony C Dec. 5, 2023, 5:29 p.m. OK Python 3 TESTS 10 109 2252800
235961008 varunracha470 C Dec. 5, 2023, 6:13 p.m. OK Python 3 TESTS 10 124 614400
235949642 kodexs C Dec. 5, 2023, 4:58 p.m. OK Python 3 TESTS 10 124 614400
235960801 Shashi_kumar_Vemula C Dec. 5, 2023, 6:11 p.m. OK Python 3 TESTS 10 124 1126400
235959918 aureliony C Dec. 5, 2023, 6:02 p.m. OK Python 3 TESTS 10 124 2252800
235944415 lahari_655 C Dec. 5, 2023, 4:47 p.m. OK Python 3 TESTS 10 139 2662400
235943641 MRXz C Dec. 5, 2023, 4:45 p.m. OK Python 3 TESTS 10 140 512000
235947575 Martinien_ENSAF C Dec. 5, 2023, 4:54 p.m. OK Python 3 TESTS 10 140 614400
235946360 Aadi03 C Dec. 5, 2023, 4:52 p.m. OK Python 3 TESTS 10 140 614400
235952863 samyaksrivastava9 C Dec. 5, 2023, 5:11 p.m. OK Python 3 TESTS 10 140 921600
235957461 Andriamanitra C Dec. 5, 2023, 5:42 p.m. OK Ruby 3 TESTS 10 405 18534400
235979591 0x81 C Dec. 5, 2023, 10:54 p.m. OK Ruby 3 TESTS 14 467 1433600
235951969 emanuele-em C Dec. 5, 2023, 5:07 p.m. OK Rust 2021 TESTS 10 31 1228800
235958837 Loganwick C Dec. 5, 2023, 5:53 p.m. OK Rust 2021 TESTS 10 124 2560000

remove filters

Back to search problems