Educational Codeforces Round 179 (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
2111 Educational Codeforces Round 179 (Rated for Div. 2) FINISHED False 7200 27444323 June 3, 2025, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 5391 ) E Changing the String PROGRAMMING binary search data structures greedy implementation sortings strings

Given a string (s) that consists only of the first three letters of the Latin alphabet, meaning each character of the string is either a , b , or c . Also given are (q) operations that need to be performed on the string. In each operation, two letters (x) and (y) from the set of the first three letters of the Latin alphabet are provided, and for each operation, one of the following two actions must be taken: change any (one) occurrence of the letter (x) in the string (s) to the letter (y) (if at least one occurrence of the letter (x) exists); do nothing. The goal is to perform all operations in the given order in such a way that the string (s) becomes lexicographically minimal. Recall that a string (a) is lexicographically less than a string (b) if and only if one of the following conditions holds: (a) is a prefix of (b), but (a \neq b); at the first position where (a) and (b) differ, the string (a) has a letter that comes earlier in the alphabet than the corresponding letter in (b). Each test consists of several test cases. The first line contains a single integer (t) ((1 \le t \le 10^{3})) — the number of test cases. The description of the test cases follows. In the first line of each test case, there are two integers (n) and (q) ((1 \le n, q \le 2 \cdot 10^{5})) — the length of the string (s) and the number of operations. In the second line of each test case, the string (s) is given — a string of exactly (n) characters, each of which is a , b , or c . The next (q) lines of each test case contain the description of the operations. Each line contains two characters (x) and (y), each of which is a , b , or c . Additional constraints on the input: the sum of (n) across all test cases does not exceed (2 \cdot 10^{5}); the sum of (q) across all test cases does not exceed (2 \cdot 10^{5}). For each test case, output the lexicograp

Tutorials

Educational Codeforces Round 179 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
322904102 muneeb564 E June 4, 2025, 6:59 p.m. OK C++17 (GCC 7-32) TESTS 32 61 0
322924960 zlxhh666 E June 5, 2025, 2:51 a.m. OK C++17 (GCC 7-32) TESTS 32 62 0
322907253 gleepglinky E June 4, 2025, 7:38 p.m. OK C++17 (GCC 7-32) TESTS 32 62 0
322885039 wewin909 E June 4, 2025, 4:03 p.m. OK C++17 (GCC 7-32) TESTS 32 62 0
322829138 dhruvilpatel217 E June 4, 2025, 9:04 a.m. OK C++17 (GCC 7-32) TESTS 32 62 0
322792078 Dedust E June 4, 2025, 2:44 a.m. OK C++17 (GCC 7-32) TESTS 32 62 0
322931786 bubbarob19 E June 5, 2025, 4:22 a.m. OK C++17 (GCC 7-32) TESTS 32 62 102400
322929857 khan.daniyal1329 E June 5, 2025, 3:57 a.m. OK C++17 (GCC 7-32) TESTS 32 62 102400
322913340 Eliza_Golas E June 4, 2025, 9:23 p.m. OK C++17 (GCC 7-32) TESTS 32 62 102400
322908270 Tanzim639 E June 4, 2025, 7:51 p.m. OK C++17 (GCC 7-32) TESTS 32 62 102400
322933333 ZX1123 E June 5, 2025, 4:41 a.m. OK C++20 (GCC 13-64) TESTS 32 61 102400
322909579 Ziad3ssam10 E June 4, 2025, 8:10 p.m. OK C++20 (GCC 13-64) TESTS 32 61 102400
322896495 AWDang E June 4, 2025, 5:45 p.m. OK C++20 (GCC 13-64) TESTS 32 61 102400
322837893 RONAK007 E June 4, 2025, 10:02 a.m. OK C++20 (GCC 13-64) TESTS 32 61 102400
322796560 fishcathu E June 4, 2025, 3:57 a.m. OK C++20 (GCC 13-64) TESTS 32 61 102400
322840463 kinitic013 E June 4, 2025, 10:21 a.m. OK C++20 (GCC 13-64) TESTS 32 61 614400
322871037 abhiap2004 E June 4, 2025, 2:11 p.m. OK C++20 (GCC 13-64) TESTS 32 61 1024000
322909142 ag._. E June 4, 2025, 8:03 p.m. OK C++20 (GCC 13-64) TESTS 32 62 0
322858177 Wu_Xin_45 E June 4, 2025, 12:33 p.m. OK C++20 (GCC 13-64) TESTS 32 62 0
322842991 grinding_into_abyss E June 4, 2025, 10:40 a.m. OK C++20 (GCC 13-64) TESTS 32 62 0
322930269 PancakeKing E June 5, 2025, 4:03 a.m. OK C++23 (GCC 14-64, msys2) TESTS 32 46 102400
322872350 Radio_Head E June 4, 2025, 2:21 p.m. OK C++23 (GCC 14-64, msys2) TESTS 32 46 102400
322794602 False0099 E June 4, 2025, 3:26 a.m. OK C++23 (GCC 14-64, msys2) TESTS 32 46 102400
322938975 00.ghost E June 5, 2025, 5:40 a.m. OK C++23 (GCC 14-64, msys2) TESTS 32 61 102400
322925794 3209014313 E June 5, 2025, 3:03 a.m. OK C++23 (GCC 14-64, msys2) TESTS 32 61 102400
322884629 blackkingwow E June 4, 2025, 4 p.m. OK C++23 (GCC 14-64, msys2) TESTS 32 61 102400
322795997 FangYifan E June 4, 2025, 3:48 a.m. OK C++23 (GCC 14-64, msys2) TESTS 32 61 102400
322786058 dragoonSlayer E June 4, 2025, 12:18 a.m. OK C++23 (GCC 14-64, msys2) TESTS 32 61 102400
322816922 keeshu E June 4, 2025, 7:37 a.m. OK C++23 (GCC 14-64, msys2) TESTS 32 62 0
322930216 zhaoyingwei E June 5, 2025, 4:02 a.m. OK C++23 (GCC 14-64, msys2) TESTS 32 62 102400
322853184 owi8270 E June 4, 2025, 11:58 a.m. OK Go TESTS 32 249 14848000
322856997 owi8270 E June 4, 2025, 12:24 p.m. OK Go TESTS 32 249 15564800
322778502 fire12324344 E June 3, 2025, 9:11 p.m. OK Java 21 TESTS 32 358 1945600
322889304 _TokaiTeio_ E June 4, 2025, 4:41 p.m. OK Java 21 TESTS 32 374 1331200
322859147 Winners_eye E June 4, 2025, 12:41 p.m. OK Java 21 TESTS 32 405 2048000
322795962 NpHardcore_05 E June 4, 2025, 3:48 a.m. OK Java 21 TESTS 32 421 21401600
322913514 polsage E June 4, 2025, 9:27 p.m. OK Java 21 TESTS 32 452 16998400
322869195 lupunish E June 4, 2025, 1:56 p.m. OK Java 21 TESTS 32 483 1433600
322820265 Swarnadip_Kar E June 4, 2025, 8:01 a.m. OK Java 21 TESTS 32 499 16691200
322864967 winkhatri292004 E June 4, 2025, 1:25 p.m. OK Java 21 TESTS 32 608 1331200
322825348 MrSavageVS E June 4, 2025, 8:37 a.m. OK Java 21 TESTS 32 780 17408000
322851793 BalaramanM E June 4, 2025, 11:47 a.m. OK Java 21 TESTS 32 780 28364800
322790965 codesuv E June 4, 2025, 2:24 a.m. OK Java 8 TESTS 32 202 0
322862517 satyams_9001 E June 4, 2025, 1:07 p.m. OK Java 8 TESTS 32 296 21606400
322892386 AnatolyS E June 4, 2025, 5:08 p.m. OK Kotlin 1.9 TESTS 32 406 1740800
322792946 minuki646 E June 4, 2025, 2:59 a.m. OK PyPy 3-64 TESTS 32 171 14233600
322915989 DarkTemplarDrop E June 4, 2025, 10:28 p.m. OK PyPy 3-64 TESTS 32 234 25190400
322884205 maruf_khan96 E June 4, 2025, 3:56 p.m. OK PyPy 3-64 TESTS 32 265 27955200
322794405 hxu10 E June 4, 2025, 3:23 a.m. OK PyPy 3-64 TESTS 32 374 26112000
322849706 KGC_444 E June 4, 2025, 11:31 a.m. OK PyPy 3-64 TESTS 32 421 12083200
322850429 DivyamAwasthy E June 4, 2025, 11:37 a.m. OK PyPy 3-64 TESTS 32 421 15155200
322801849 gardengnome E June 4, 2025, 5:06 a.m. OK PyPy 3-64 TESTS 32 436 23244800
322853647 wujiu03 E June 4, 2025, 12:01 p.m. OK PyPy 3-64 TESTS 32 452 15155200
322841910 Polynomu E June 4, 2025, 10:32 a.m. OK PyPy 3-64 TESTS 32 452 18227200
322839827 Pulkit_gupta E June 4, 2025, 10:16 a.m. OK PyPy 3-64 TESTS 32 452 19353600
322875614 date727 E June 4, 2025, 2:45 p.m. OK Python 3 TESTS 32 312 2662400
322844487 shanks_jr10 E June 4, 2025, 10:52 a.m. OK Python 3 TESTS 32 312 14336000
322840201 vogel-im-kafig E June 4, 2025, 10:19 a.m. OK Python 3 TESTS 32 343 13004800
322847205 svrmalaviya E June 4, 2025, 11:13 a.m. OK Python 3 TESTS 32 358 4198400
322783209 vxgmichel E June 3, 2025, 10:36 p.m. OK Python 3 TESTS 32 406 5632000
322863954 dp_unrated E June 4, 2025, 1:17 p.m. OK Python 3 TESTS 32 812 25190400
322826997 pulkit_garg14 E June 4, 2025, 8:49 a.m. OK Python 3 TESTS 32 983 5632000
322839455 vogel-im-kafig E June 4, 2025, 10:13 a.m. OK Python 3 TESTS 32 1046 10854400
322821344 0x81 E June 4, 2025, 8:09 a.m. OK Rust 2021 TESTS 32 124 921600

remove filters

Back to search problems