Educational Codeforces Round 121 (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
1626 Educational Codeforces Round 121 (Rated for Div. 2) FINISHED False 7200 89479499 Jan. 16, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 29056 ) A Equidistant Letters PROGRAMMING constructive algorithms

B"You are given a string s , consisting of lowercase Latin letters. Every letter appears in it no more than twice. Your task is to rearrange the letters in the string in such a way that for each pair of letters that appear exactly twice, the distance between the letters in the pair is the same. You are not allowed to add or remove letters. It can be shown that the answer always exists. If there are multiple answers, print any of them. The first line contains a single integer t ( 1 <= t <= 10^3 ) -- the number of testcases. Each testcase consists of a non-empty string s , consisting of lowercase Latin letters. Every letter appears in the string no more than twice. The length of the string doesn't exceed 52 . For each testcase, print a single string. Every letter should appear in it the same number of times as it appears in string s . For each pair of letters that appear exactly twice, the distance between the letters in the pair should be the same. If there are multiple answers, print any of them. In the first testcase of the example, the only letter that appears exactly twice is letter 'l'. You can rearrange the letters arbitrarily, since there are no distances to compare. In the second testcase of the example, the letters that appear exactly twice are 'a', 'b' and 'c'. Initially, letters 'a' are distance 6 apart, letters 'b' are distance 4 apart and letters 'c' are distance 2 apart. They are not the same, so we have to rearrange the letters. After rearrangement, letters 'a' are distance 2 apart, letters 'b' are distance 2 apart and letters 'c' are distance 2 apart. They are all the same, so the answer is valid. In the third testcase of the example, there are no letters that appear exactly twice. Thus, any rearrangement is valid. Including not changing the string at all. "...

Tutorials

99136

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
143028456 farcat576 A Jan. 16, 2022, 5:25 p.m. OK Clang++17 Diagnostics TESTS 4 46 0
143031322 MD_MUMINUR_RASHID A Jan. 16, 2022, 5:48 p.m. OK GNU C11 TESTS 4 15 0
143025480 rainboy A Jan. 16, 2022, 5:09 p.m. OK GNU C11 TESTS 4 15 0
143033229 Googies A Jan. 16, 2022, 6:05 p.m. OK GNU C11 TESTS 4 15 0
143022203 lightYGM A Jan. 16, 2022, 5 p.m. OK GNU C11 TESTS 4 15 0
143019341 00b A Jan. 16, 2022, 3:43 p.m. OK GNU C11 TESTS 4 15 0
143029704 Murli_33 A Jan. 16, 2022, 5:34 p.m. OK GNU C11 TESTS 4 15 1024000
143050722 ZYY-ZHOU A Jan. 17, 2022, 3:09 a.m. OK GNU C11 TESTS 4 46 0
143058044 SP2003 A Jan. 17, 2022, 4:42 a.m. OK GNU C11 TESTS 4 46 0
143018650 xu_yuanxin A Jan. 16, 2022, 3:42 p.m. OK GNU C11 TESTS 4 61 0
143019047 bruceyyds A Jan. 16, 2022, 3:43 p.m. OK GNU C11 TESTS 4 62 0
143060992 huanghan0912 A Jan. 17, 2022, 5:14 a.m. OK GNU C++14 TESTS 4 0 0
143058003 praty200_3 A Jan. 17, 2022, 4:42 a.m. OK GNU C++14 TESTS 4 0 0
143057712 NaGuT A Jan. 17, 2022, 4:39 a.m. OK GNU C++14 TESTS 4 0 0
143065775 sahu_4u A Jan. 17, 2022, 5:55 a.m. OK GNU C++14 TESTS 4 0 0
143065686 wanderrer16 A Jan. 17, 2022, 5:55 a.m. OK GNU C++14 TESTS 4 0 0
143065288 _ncm_ A Jan. 17, 2022, 5:51 a.m. OK GNU C++14 TESTS 4 0 0
143065270 OngOng A Jan. 17, 2022, 5:51 a.m. OK GNU C++14 TESTS 4 0 0
143065013 Hope2820 A Jan. 17, 2022, 5:49 a.m. OK GNU C++14 TESTS 4 0 0
143064784 raanyild A Jan. 17, 2022, 5:47 a.m. OK GNU C++14 TESTS 4 0 0
143058816 venteury A Jan. 17, 2022, 4:49 a.m. OK GNU C++14 TESTS 4 0 0
143066190 Baizho A Jan. 17, 2022, 5:58 a.m. OK GNU C++17 TESTS 4 0 0
143066679 ILHOM_45 A Jan. 17, 2022, 6:02 a.m. OK GNU C++17 TESTS 4 0 0
143066314 PrafulSinghal A Jan. 17, 2022, 5:59 a.m. OK GNU C++17 TESTS 4 0 0
143065933 kigash A Jan. 17, 2022, 5:56 a.m. OK GNU C++17 TESTS 4 0 0
143065861 rex28 A Jan. 17, 2022, 5:56 a.m. OK GNU C++17 TESTS 4 0 0
143065078 uditjaiswal12345 A Jan. 17, 2022, 5:50 a.m. OK GNU C++17 TESTS 4 0 0
143064558 sarthAK_04 A Jan. 17, 2022, 5:45 a.m. OK GNU C++17 TESTS 4 0 0
143064545 Vishwa_savani A Jan. 17, 2022, 5:45 a.m. OK GNU C++17 TESTS 4 0 0
143063867 Acry A Jan. 17, 2022, 5:39 a.m. OK GNU C++17 TESTS 4 0 0
143063843 Ayush479 A Jan. 17, 2022, 5:39 a.m. OK GNU C++17 TESTS 4 0 0
143050708 satwik_1234 A Jan. 17, 2022, 3:08 a.m. OK GNU C++17 (64) TESTS 4 0 0
143050781 zuotihenkuai A Jan. 17, 2022, 3:10 a.m. OK GNU C++17 (64) TESTS 4 0 0
143052873 morphik A Jan. 17, 2022, 3:39 a.m. OK GNU C++17 (64) TESTS 4 0 0
143053977 acktron A Jan. 17, 2022, 3:55 a.m. OK GNU C++17 (64) TESTS 4 0 0
143054353 Harsh__18 A Jan. 17, 2022, 4 a.m. OK GNU C++17 (64) TESTS 4 0 0
143055070 AAZ_01 A Jan. 17, 2022, 4:09 a.m. OK GNU C++17 (64) TESTS 4 0 0
143057092 CODERGARV A Jan. 17, 2022, 4:32 a.m. OK GNU C++17 (64) TESTS 4 0 0
143060490 Ryuk10 A Jan. 17, 2022, 5:10 a.m. OK GNU C++17 (64) TESTS 4 0 0
143060548 alif_cse_ju A Jan. 17, 2022, 5:11 a.m. OK GNU C++17 (64) TESTS 4 0 0
143065534 _Akagami_ A Jan. 17, 2022, 5:53 a.m. OK GNU C++17 (64) TESTS 4 0 0
143046770 jieunie A Jan. 17, 2022, 1:50 a.m. OK GNU C++20 (64) TESTS 4 0 0
143057126 WinterLove A Jan. 17, 2022, 4:33 a.m. OK GNU C++20 (64) TESTS 4 0 0
143054307 jughead__73 A Jan. 17, 2022, 3:59 a.m. OK GNU C++20 (64) TESTS 4 0 0
143050564 aryan183 A Jan. 17, 2022, 3:06 a.m. OK GNU C++20 (64) TESTS 4 0 0
143049466 vjudge5 A Jan. 17, 2022, 2:48 a.m. OK GNU C++20 (64) TESTS 4 0 0
143048987 llj21 A Jan. 17, 2022, 2:38 a.m. OK GNU C++20 (64) TESTS 4 0 0
143046875 IZAZ_ULLAH_KHAN A Jan. 17, 2022, 1:52 a.m. OK GNU C++20 (64) TESTS 4 0 0
143046271 1474478624 A Jan. 17, 2022, 1:37 a.m. OK GNU C++20 (64) TESTS 4 0 0
143065408 deepak1812 A Jan. 17, 2022, 5:52 a.m. OK GNU C++20 (64) TESTS 4 0 0
143059235 rohit_7 A Jan. 17, 2022, 4:54 a.m. OK GNU C++20 (64) TESTS 4 0 0
143046513 graceoflives A Jan. 17, 2022, 1:43 a.m. OK Go TESTS 4 30 102400
143036605 Dmohan A Jan. 16, 2022, 6:46 p.m. OK Go TESTS 4 30 614400
143025654 ashutosh_ A Jan. 16, 2022, 5:10 p.m. OK Java 11 TESTS 4 155 0
143041780 gsi34 A Jan. 16, 2022, 10:22 p.m. OK Java 11 TESTS 4 171 0
143042127 Andwerp A Jan. 16, 2022, 10:39 p.m. OK Java 11 TESTS 4 171 0
143053195 unfixedbug A Jan. 17, 2022, 3:43 a.m. OK Java 11 TESTS 4 171 0
143032368 venkateshaprabhu A Jan. 16, 2022, 5:57 p.m. OK Java 11 TESTS 4 171 4198400
143061969 LongWalk A Jan. 17, 2022, 5:23 a.m. OK Java 11 TESTS 4 186 0
143031494 gigaby8 A Jan. 16, 2022, 5:49 p.m. OK Java 11 TESTS 4 186 0
143019337 fervent_45 A Jan. 16, 2022, 3:43 p.m. OK Java 11 TESTS 4 186 0
143026320 Babbi A Jan. 16, 2022, 5:13 p.m. OK Java 11 TESTS 4 186 102400
143028727 davgogol A Jan. 16, 2022, 5:27 p.m. OK Java 11 TESTS 4 187 0
143047974 zxz_xmx A Jan. 17, 2022, 2:18 a.m. OK Java 8 TESTS 4 77 0
143034524 ak_ankit A Jan. 16, 2022, 6:19 p.m. OK Java 8 TESTS 4 77 0
143038948 tishrah A Jan. 16, 2022, 8:33 p.m. OK Java 8 TESTS 4 93 0
143047603 arpit31 A Jan. 17, 2022, 2:10 a.m. OK Java 8 TESTS 4 93 0
143026567 LITT_UP A Jan. 16, 2022, 5:14 p.m. OK Java 8 TESTS 4 93 0
143061857 hunter.zolomon A Jan. 17, 2022, 5:22 a.m. OK Java 8 TESTS 4 108 0
143031750 Chandler A Jan. 16, 2022, 5:51 p.m. OK Java 8 TESTS 4 108 0
143025691 thehamzarocks A Jan. 16, 2022, 5:10 p.m. OK Java 8 TESTS 4 109 0
143052213 shivam529 A Jan. 17, 2022, 3:30 a.m. OK Java 8 TESTS 4 109 0
143027076 Chandler A Jan. 16, 2022, 5:17 p.m. OK Java 8 TESTS 4 109 0
143024844 SlavaG A Jan. 16, 2022, 5:07 p.m. OK Kotlin 1.5 TESTS 4 234 1126400
143038727 DmtrPpl A Jan. 16, 2022, 8:25 p.m. OK MS C++ 2017 TESTS 4 0 0
143055557 cmj0922 A Jan. 17, 2022, 4:15 a.m. OK MS C++ 2017 TESTS 4 0 0
143035063 Touristinya A Jan. 16, 2022, 6:26 p.m. OK MS C++ 2017 TESTS 4 0 0
143026277 Tangerine A Jan. 16, 2022, 5:13 p.m. OK MS C++ 2017 TESTS 4 15 0
143055599 cmj0922 A Jan. 17, 2022, 4:15 a.m. OK MS C++ 2017 TESTS 4 15 0
143027789 kriksnonsi A Jan. 16, 2022, 5:21 p.m. OK MS C++ 2017 TESTS 4 15 0
143023621 DikshantAvi A Jan. 16, 2022, 5:03 p.m. OK MS C++ 2017 TESTS 4 15 0
143048292 Nidz05 A Jan. 17, 2022, 2:24 a.m. OK .NET Core C# TESTS 4 62 102400
143032980 Tonto_codificador A Jan. 16, 2022, 6:03 p.m. OK Node.js TESTS 4 92 2662400
143031391 rsFalse A Jan. 16, 2022, 5:48 p.m. OK Perl TESTS 4 15 0
143030651 feelme A Jan. 16, 2022, 5:42 p.m. OK PyPy 3 TESTS 4 108 2560000
143048561 continue_and_break A Jan. 17, 2022, 2:30 a.m. OK PyPy 3 TESTS 4 124 2252800
143031226 Rarity.MLP A Jan. 16, 2022, 5:47 p.m. OK PyPy 3 TESTS 4 124 2252800
143051153 kwin A Jan. 17, 2022, 3:15 a.m. OK PyPy 3 TESTS 4 124 2560000
143055165 BlackPearl_ A Jan. 17, 2022, 4:10 a.m. OK PyPy 3 TESTS 4 124 2764800
143055397 ArjitShrivastava A Jan. 17, 2022, 4:13 a.m. OK PyPy 3 TESTS 4 124 3379200
143040084 SangBijaksana A Jan. 16, 2022, 9:13 p.m. OK PyPy 3 TESTS 4 124 3481600
143036976 YashNandwana A Jan. 16, 2022, 6:51 p.m. OK PyPy 3 TESTS 4 139 2252800
143027997 zxcuser2 A Jan. 16, 2022, 5:22 p.m. OK PyPy 3 TESTS 4 139 2662400
143048017 Machiorpolly A Jan. 17, 2022, 2:19 a.m. OK PyPy 3 TESTS 4 139 3174400
143025998 Multibala A Jan. 16, 2022, 5:11 p.m. OK PyPy 3-64 TESTS 4 77 1331200
143027873 MistaAsh A Jan. 16, 2022, 5:21 p.m. OK PyPy 3-64 TESTS 4 93 1536000
143035990 zxcuser1 A Jan. 16, 2022, 6:37 p.m. OK PyPy 3-64 TESTS 4 93 2867200
143027296 neUwUbie_for_ever A Jan. 16, 2022, 5:18 p.m. OK PyPy 3-64 TESTS 4 93 2969600
143019712 Skillful_Wanderer A Jan. 16, 2022, 3:44 p.m. OK PyPy 3-64 TESTS 4 93 2969600
143048353 MHAII A Jan. 17, 2022, 2:26 a.m. OK PyPy 3-64 TESTS 4 93 4096000
143048299 Shah.Zaib A Jan. 17, 2022, 2:25 a.m. OK PyPy 3-64 TESTS 4 93 4096000
143022037 AayushSingh.504 A Jan. 16, 2022, 4:59 p.m. OK PyPy 3-64 TESTS 4 93 4710400
143040801 cheese_yellow A Jan. 16, 2022, 9:40 p.m. OK PyPy 3-64 TESTS 4 93 4812800
143037627 KabirIvan A Jan. 16, 2022, 7:33 p.m. OK PyPy 3-64 TESTS 4 108 2867200
143026115 OLOGY A Jan. 16, 2022, 5:12 p.m. OK Python 2 TESTS 4 31 102400
143038198 elistark A Jan. 16, 2022, 8:08 p.m. OK Python 2 TESTS 4 46 0
143038388 Ratery A Jan. 16, 2022, 8:15 p.m. OK Python 3 TESTS 4 30 0
143066187 try_to_reach_next_rank A Jan. 17, 2022, 5:58 a.m. OK Python 3 TESTS 4 31 0
143049011 Muhammad.Daniyal A Jan. 17, 2022, 2:39 a.m. OK Python 3 TESTS 4 31 0
143048445 lxy66 A Jan. 17, 2022, 2:28 a.m. OK Python 3 TESTS 4 31 0
143043958 a_fan_of_cherish A Jan. 17, 2022, 12:09 a.m. OK Python 3 TESTS 4 31 0
143029274 maremandasreekrishna A Jan. 16, 2022, 5:31 p.m. OK Python 3 TESTS 4 31 0
143026796 MuradHossain A Jan. 16, 2022, 5:15 p.m. OK Python 3 TESTS 4 31 0
143026454 rfi-cfif A Jan. 16, 2022, 5:13 p.m. OK Python 3 TESTS 4 31 0
143028459 Goodboy22 A Jan. 16, 2022, 5:25 p.m. OK Python 3 TESTS 4 31 0
143066122 ramjeeraghu A Jan. 17, 2022, 5:58 a.m. OK Python 3 TESTS 4 46 0
143057663 ink_and_fable A Jan. 17, 2022, 4:38 a.m. OK Rust 2021 TESTS 4 15 0
143035101 clause A Jan. 16, 2022, 6:26 p.m. OK Rust 2021 TESTS 4 15 0
143042862 wnmrmr A Jan. 16, 2022, 11:15 p.m. OK Rust 2021 TESTS 4 31 102400

remove filters

Back to search problems