Educational Codeforces Round 147 (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
1821 Educational Codeforces Round 147 (Rated for Div. 2) FINISHED False 7200 55178663 April 20, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 14702 ) C Tear It Apart PROGRAMMING brute force implementation math strings

B'You are given a string s , consisting of lowercase Latin letters. In one operation, you can select several (one or more) positions in it such that no two selected positions are adjacent to each other. Then you remove the letters on the selected positions from the string. The resulting parts are concatenated without changing their order. What is the smallest number of operations required to make all the letters in s the same? The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of testcases. The only line of each testcase contains a string s , consisting of lowercase Latin letters. Its length is from 1 to 2 cdot 10^5 . The total length of the strings over all testcases doesn 't exceed 2 cdot 10^5 . For each testcase, print a single integer -- the smallest number of operations required to make all the letters in the given string s the same. In the first testcase, you can select positions 2, 4 and 6 and remove the corresponding letters 'b ', 'c ' and 'b '. In the third testcase, the letters in the string are already the same, so you don 't have to make any operations. In the fourth testcase, one of the possible solutions in 2 operations is the following. You can select positions 1, 4, 6 first. The string becomes "bce". Then select positions 1 and 3 . The string becomes "c". All letters in it are the same, since it 's just one letter. '...

Tutorials

115296

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
202980290 John_27_Max C April 21, 2023, 6:09 p.m. OK C# 10 TESTS 17 108 614400
202910121 bluemegane C April 21, 2023, 1:42 a.m. OK C# 8 TESTS 17 155 3584000
202931283 ravinem1 C April 21, 2023, 7:39 a.m. OK C# 8 TESTS 17 187 4198400
202916364 LilyBlack C April 21, 2023, 4:19 a.m. OK Clang++17 Diagnostics TESTS 17 795 13004800
202894098 alex.atg912 C April 20, 2023, 6:40 p.m. OK Clang++20 Diagnostics TESTS 17 623 15769600
202961620 ptyzzzy C April 21, 2023, 2:17 p.m. OK Clang++20 Diagnostics TESTS 17 779 19968000
202961934 ptyzzzy C April 21, 2023, 2:20 p.m. OK Clang++20 Diagnostics TESTS 17 1075 19968000
202961815 ptyzzzy C April 21, 2023, 2:19 p.m. OK Clang++20 Diagnostics TESTS 17 1138 19968000
202946918 pnS73fm C April 21, 2023, 11:15 a.m. OK GNU C11 TESTS 17 46 0
202892063 astronom1cal C April 20, 2023, 6:15 p.m. OK GNU C11 TESTS 17 61 204800
202908640 XuzhenV C April 21, 2023, 12:58 a.m. OK GNU C++14 TESTS 17 15 204800
202909990 thehou C April 21, 2023, 1:39 a.m. OK GNU C++14 TESTS 17 15 512000
202907127 zhuomaple C April 21, 2023, 12:08 a.m. OK GNU C++14 TESTS 17 15 512000
202898849 NikhilSharma26 C April 20, 2023, 8:13 p.m. OK GNU C++14 TESTS 17 15 512000
202885997 udta_kouwa C April 20, 2023, 5:05 p.m. OK GNU C++14 TESTS 17 15 512000
202956767 toacwa C April 21, 2023, 1:22 p.m. OK GNU C++14 TESTS 17 15 512000
202936780 Dhruvil-Lakhtaria C April 21, 2023, 8:53 a.m. OK GNU C++14 TESTS 17 15 512000
202907818 aandrike C April 21, 2023, 12:32 a.m. OK GNU C++14 TESTS 17 15 921600
202931276 lmf_up C April 21, 2023, 7:39 a.m. OK GNU C++14 TESTS 17 15 1024000
202966766 yeshubo_qwq a_grain C April 21, 2023, 3:19 p.m. OK GNU C++14 TESTS 17 15 1024000
202986724 terminator_123 C April 21, 2023, 7:52 p.m. OK GNU C++17 TESTS 17 15 512000
202985281 ad12001 C April 21, 2023, 7:26 p.m. OK GNU C++17 TESTS 17 15 512000
202985211 unbeatable_abhi C April 21, 2023, 7:25 p.m. OK GNU C++17 TESTS 17 15 512000
202984958 adityamane711 C April 21, 2023, 7:20 p.m. OK GNU C++17 TESTS 17 15 512000
202978984 idoproblems C April 21, 2023, 5:51 p.m. OK GNU C++17 TESTS 17 15 512000
202977489 youssefmontaser C April 21, 2023, 5:31 p.m. OK GNU C++17 TESTS 17 15 512000
202964124 0x1x0 C April 21, 2023, 2:46 p.m. OK GNU C++17 TESTS 17 15 512000
202963173 abhishek_0123 C April 21, 2023, 2:35 p.m. OK GNU C++17 TESTS 17 15 512000
203010004 vaibhavsinghz C April 22, 2023, 5:32 a.m. OK GNU C++17 TESTS 17 15 512000
203007500 coderchamp7 C April 22, 2023, 4:51 a.m. OK GNU C++17 TESTS 17 15 512000
202897101 capsule C April 20, 2023, 7:33 p.m. OK GNU C++17 (64) TESTS 17 15 512000
202963730 naman-0316 C April 21, 2023, 2:42 p.m. OK GNU C++17 (64) TESTS 17 15 512000
202957497 walilili C April 21, 2023, 1:30 p.m. OK GNU C++17 (64) TESTS 17 15 512000
202950895 Shivansh0809 C April 21, 2023, 12:13 p.m. OK GNU C++17 (64) TESTS 17 15 512000
202950732 chappy1 C April 21, 2023, 12:10 p.m. OK GNU C++17 (64) TESTS 17 15 512000
202946138 eiqkx C April 21, 2023, 11:03 a.m. OK GNU C++17 (64) TESTS 17 15 512000
202935544 tditya_aeltia C April 21, 2023, 8:36 a.m. OK GNU C++17 (64) TESTS 17 15 512000
202927318 houren C April 21, 2023, 6:43 a.m. OK GNU C++17 (64) TESTS 17 15 512000
202913316 notyour_young C April 21, 2023, 3:05 a.m. OK GNU C++17 (64) TESTS 17 15 512000
202894049 kotatsugame C April 20, 2023, 6:39 p.m. OK GNU C++17 (64) TESTS 17 15 512000
203005904 Yychen C April 22, 2023, 4:22 a.m. OK GNU C++20 (64) TESTS 17 15 512000
203004880 abdrahmanabdkareem C April 22, 2023, 4:03 a.m. OK GNU C++20 (64) TESTS 17 15 512000
203003128 Gats C April 22, 2023, 3:21 a.m. OK GNU C++20 (64) TESTS 17 15 512000
203001552 user12399 C April 22, 2023, 2:40 a.m. OK GNU C++20 (64) TESTS 17 15 512000
202997984 FedeNQ C April 22, 2023, 12:57 a.m. OK GNU C++20 (64) TESTS 17 15 512000
202997379 mugiwara_2980 C April 22, 2023, 12:37 a.m. OK GNU C++20 (64) TESTS 17 15 512000
202992157 anwer_lahami1 C April 21, 2023, 9:55 p.m. OK GNU C++20 (64) TESTS 17 15 512000
202991222 Piashy C April 21, 2023, 9:29 p.m. OK GNU C++20 (64) TESTS 17 15 512000
203010332 wakaka C April 22, 2023, 5:38 a.m. OK GNU C++20 (64) TESTS 17 15 512000
203011239 muntasir__ C April 22, 2023, 5:50 a.m. OK GNU C++20 (64) TESTS 17 15 512000
202889529 harsh.awasthi C April 20, 2023, 5:42 p.m. OK Go TESTS 17 31 1433600
202961210 liangjiahui11 C April 21, 2023, 2:12 p.m. OK Go TESTS 17 46 7475200
202919737 naveenkumar.s2021cseb C April 21, 2023, 5:23 a.m. OK Java 11 TESTS 17 171 0
202992380 Pranav_Sharda C April 21, 2023, 10 p.m. OK Java 11 TESTS 17 202 0
203004584 djrfrn C April 22, 2023, 3:56 a.m. OK Java 11 TESTS 17 249 0
202893016 vijender_8601 C April 20, 2023, 6:26 p.m. OK Java 11 TESTS 17 264 0
202927228 SkadiTheCorruptHeart C April 21, 2023, 6:42 a.m. OK Java 11 TESTS 17 280 0
202888393 XIN C April 20, 2023, 5:29 p.m. OK Java 11 TESTS 17 280 0
202885273 kasiru_69 C April 20, 2023, 4:59 p.m. OK Java 11 TESTS 17 296 6246400
202897875 imvivekthakur C April 20, 2023, 7:53 p.m. OK Java 11 TESTS 17 311 0
202945578 nkrishnasatvik C April 21, 2023, 10:55 a.m. OK Java 11 TESTS 17 358 7270400
202889757 pranp_24 C April 20, 2023, 5:45 p.m. OK Java 11 TESTS 17 420 0
202892394 Badass_Nemesis C April 20, 2023, 6:18 p.m. OK Java 17 TESTS 17 202 512000
202908437 cnlonces C April 21, 2023, 12:51 a.m. OK Java 17 TESTS 17 202 614400
202894840 Suraj1607 C April 20, 2023, 6:50 p.m. OK Java 17 TESTS 17 202 716800
202934222 1isGreaterThan0 C April 21, 2023, 8:19 a.m. OK Java 17 TESTS 17 217 102400
202991132 Creator_321 C April 21, 2023, 9:27 p.m. OK Java 17 TESTS 17 218 409600
202971450 aruniscoding C April 21, 2023, 4:13 p.m. OK Java 17 TESTS 17 233 512000
202930939 Danger_Don C April 21, 2023, 7:34 a.m. OK Java 17 TESTS 17 233 512000
202939709 alibaba C April 21, 2023, 9:32 a.m. OK Java 17 TESTS 17 249 307200
202929473 spiralJava_ C April 21, 2023, 7:12 a.m. OK Java 17 TESTS 17 249 512000
202890536 notreallysure C April 20, 2023, 5:54 p.m. OK Java 17 TESTS 17 249 716800
202901709 NerfThis C April 20, 2023, 9:21 p.m. OK Java 8 TESTS 17 139 0
202933449 Java_Programmer C April 21, 2023, 8:09 a.m. OK Java 8 TESTS 17 155 0
202889899 UniversalAdmin C April 20, 2023, 5:47 p.m. OK Java 8 TESTS 17 155 0
202888125 UniversalAdmin C April 20, 2023, 5:27 p.m. OK Java 8 TESTS 17 155 0
202914445 amit_roy C April 21, 2023, 3:34 a.m. OK Java 8 TESTS 17 155 2457600
202900224 pra1hamgup1a C April 20, 2023, 8:46 p.m. OK Java 8 TESTS 17 170 0
202889979 UniversalAdmin C April 20, 2023, 5:48 p.m. OK Java 8 TESTS 17 171 0
202889607 UniversalAdmin C April 20, 2023, 5:43 p.m. OK Java 8 TESTS 17 171 0
202899778 -crazy_coder- C April 20, 2023, 8:35 p.m. OK Java 8 TESTS 17 186 0
202987080 durgeshpoint111 C April 21, 2023, 7:59 p.m. OK Java 8 TESTS 17 202 0
202886351 Phan_Trung_Duc C April 20, 2023, 5:09 p.m. OK MS C++ 2017 TESTS 17 61 614400
202910805 huminclu C April 21, 2023, 2:04 a.m. OK MS C++ 2017 TESTS 17 62 204800
202980150 VeDrofin C April 21, 2023, 6:07 p.m. OK MS C++ 2017 TESTS 17 62 614400
202932345 devanshbatra C April 21, 2023, 7:54 a.m. OK MS C++ 2017 TESTS 17 62 614400
202886056 qtrez C April 20, 2023, 5:06 p.m. OK MS C++ 2017 TESTS 17 62 614400
202889625 skimono C April 20, 2023, 5:44 p.m. OK MS C++ 2017 TESTS 17 62 6348800
202913017 maxliang C April 21, 2023, 2:58 a.m. OK PyPy 3 TESTS 17 155 5120000
202957347 lol_py C April 21, 2023, 1:29 p.m. OK PyPy 3 TESTS 17 576 6963200
202899531 julondonor C April 20, 2023, 8:28 p.m. OK PyPy 3 TESTS 17 638 10035200
202940050 amansahore09 C April 21, 2023, 9:37 a.m. OK PyPy 3 TESTS 17 889 7270400
202948943 RobinFromTheHood C April 21, 2023, 11:45 a.m. OK PyPy 3-64 TESTS 17 140 8192000
202934845 LiZnB C April 21, 2023, 8:27 a.m. OK PyPy 3-64 TESTS 17 155 12390400
202888349 TheViking733n C April 20, 2023, 5:29 p.m. OK PyPy 3-64 TESTS 17 155 14745600
202899760 jerome_coding C April 20, 2023, 8:34 p.m. OK PyPy 3-64 TESTS 17 155 16076800
202898901 aspiringquant C April 20, 2023, 8:14 p.m. OK PyPy 3-64 TESTS 17 170 9420800
202949518 RobinFromTheHood C April 21, 2023, 11:53 a.m. OK PyPy 3-64 TESTS 17 171 8089600
202896968 Hisoka-TheMagician C April 20, 2023, 7:30 p.m. OK PyPy 3-64 TESTS 17 171 9318400
202997860 pajenegod C April 22, 2023, 12:53 a.m. OK PyPy 3-64 TESTS 17 171 14438400
202997808 pajenegod C April 22, 2023, 12:52 a.m. OK PyPy 3-64 TESTS 17 171 14438400
202944890 YaoBIG C April 21, 2023, 10:45 a.m. OK PyPy 3-64 TESTS 17 187 11776000
202911026 biltharesatyendra C April 21, 2023, 2:09 a.m. OK Python 2 TESTS 17 514 614400
202903560 myyan92 C April 20, 2023, 10:08 p.m. OK Python 3 TESTS 17 311 512000
202914571 eeveeislove C April 21, 2023, 3:37 a.m. OK Python 3 TESTS 17 436 716800
202928426 aayush_chhabra C April 21, 2023, 6:57 a.m. OK Python 3 TESTS 17 655 6041600
202948601 Mahad_SundarSTEM C April 21, 2023, 11:40 a.m. OK Python 3 TESTS 17 888 512000
202889900 k_ano C April 20, 2023, 5:47 p.m. OK Python 3 TESTS 17 966 409600
202990612 khan_ali C April 21, 2023, 9:13 p.m. OK Python 3 TESTS 17 1060 1433600
202885395 PrakshalJain C April 20, 2023, 5 p.m. OK Python 3 TESTS 17 1092 614400
202906097 lemurr C April 20, 2023, 11:31 p.m. OK Python 3 TESTS 17 1248 10342400
202963210 jackson.souza C April 21, 2023, 2:35 p.m. OK Python 3 TESTS 17 1262 716800
202976895 Kita C April 21, 2023, 5:23 p.m. OK Python 3 TESTS 17 1403 1536000
202903639 Antonio_Colapso_07 C April 20, 2023, 10:10 p.m. OK Ruby 3 TESTS 17 1668 921600
202895615 Antonio_Colapso_07 C April 20, 2023, 7:03 p.m. OK Ruby 3 TESTS 17 1949 921600
202953045 ilyshana C April 21, 2023, 12:40 p.m. OK Rust 2021 TESTS 17 15 819200
202915807 cpchenpi C April 21, 2023, 4:08 a.m. OK Rust 2021 TESTS 17 30 512000
202911796 Spheniscine C April 21, 2023, 2:30 a.m. OK Rust 2021 TESTS 17 31 614400
202960726 p-a-t C April 21, 2023, 2:06 p.m. OK Rust 2021 TESTS 17 1606 13107200

remove filters

Back to search problems