Codeforces Round 820 (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
1729 Codeforces Round 820 (Div. 3) FINISHED False 8100 68829899 Sept. 12, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 30278 ) B Decode String PROGRAMMING greedy strings

B'Polycarp has a string s consisting of lowercase Latin letters. He encodes it using the following algorithm. He goes through the letters of the string s from left to right and for each letter Polycarp considers its number in the alphabet: For example, if the string s is code, then Polycarp will encode this string as follows: Thus, code of string code is 315045. You are given a string t resulting from encoding the string s . Your task is to decode it (get the original string s by t ). The first line of the input contains an integer q ( 1 <= q <= 10^4 ) -- the number of test cases in the input. The descriptions of the test cases follow. The first line of description of each test case contains one integer n ( 1 <= n <= 50 ) -- the length of the given code. The second line of the description of each test case contains a string t of length n -- the given code. It is guaranteed that there exists such a string of lowercase Latin letters, as a result of encoding which the string t is obtained. For each test case output the required string s -- the string that gives string t as the result of encoding. It is guaranteed that such a string always exists. It can be shown that such a string is always unique. The first test case is explained above. In the second test case, the answer is aj. Indeed, the number of the letter a is equal to 1 , so 1 will be appended to the code. The number of the letter j is 10 , so 100 will be appended to the code. The resulting code is 1100. There are no zeros in the third test case, which means that the numbers of all letters are less than 10 and are encoded as one digit. The original string is abacaba. In the fourth test case, the string s is equal to ll. The letter l has the number 12 and is encoded as 120. So ll is indeed 120120. '...

Tutorials

Codeforces Round #820 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
171959764 qsxsq B Sept. 12, 2022, 6:25 p.m. OK C# 10 TESTS 4 77 5939200
171979147 bluemegane B Sept. 13, 2022, 12:44 a.m. OK C# 8 TESTS 6 124 3072000
171948525 DarkWillow B Sept. 12, 2022, 5:04 p.m. OK GNU C11 TESTS 4 15 0
171976196 gxlois B Sept. 12, 2022, 11:04 p.m. OK GNU C11 TESTS 6 31 0
171966395 kuru_loli B Sept. 12, 2022, 7:39 p.m. OK GNU C11 TESTS 6 62 0
171978869 Ferran B Sept. 13, 2022, 12:36 a.m. OK GNU C11 TESTS 6 62 0
171991561 E_H_P B Sept. 13, 2022, 5:05 a.m. OK GNU C11 TESTS 6 78 0
171968196 0xOnyx B Sept. 12, 2022, 8:04 p.m. OK GNU C11 TESTS 6 78 0
171975042 iffatul_anon B Sept. 12, 2022, 10:28 p.m. OK GNU C11 TESTS 6 78 0
171987124 SP2003 B Sept. 13, 2022, 3:50 a.m. OK GNU C11 TESTS 6 124 0
171968620 omeganot B Sept. 12, 2022, 8:10 p.m. OK GNU C++14 TESTS 6 15 0
171980411 764934649 B Sept. 13, 2022, 1:19 a.m. OK GNU C++14 TESTS 6 15 0
171983080 Kaedehara_Kazuha_ B Sept. 13, 2022, 2:24 a.m. OK GNU C++14 TESTS 6 15 0
171963236 AleksaMaster B Sept. 12, 2022, 7:01 p.m. OK GNU C++14 TESTS 4 15 0
171970051 khacdanh B Sept. 12, 2022, 8:35 p.m. OK GNU C++14 TESTS 6 15 0
171969307 MasterMind B Sept. 12, 2022, 8:22 p.m. OK GNU C++14 TESTS 6 15 102400
171958805 sid369 B Sept. 12, 2022, 6:16 p.m. OK GNU C++14 TESTS 4 15 102400
171958620 Kevin8502 B Sept. 12, 2022, 6:14 p.m. OK GNU C++14 TESTS 4 15 102400
171953631 yadav_vinar B Sept. 12, 2022, 5:34 p.m. OK GNU C++14 TESTS 4 15 102400
171990047 jtf_shine B Sept. 13, 2022, 4:40 a.m. OK GNU C++14 TESTS 6 15 102400
171991094 ahmedsaif10 B Sept. 13, 2022, 4:57 a.m. OK GNU C++17 TESTS 6 0 204800
171950379 safiaadel B Sept. 12, 2022, 5:13 p.m. OK GNU C++17 TESTS 4 15 0
171955267 prashant68 B Sept. 12, 2022, 5:46 p.m. OK GNU C++17 TESTS 4 15 0
171960067 Nishant777 B Sept. 12, 2022, 6:28 p.m. OK GNU C++17 TESTS 4 15 0
171965679 michal_w B Sept. 12, 2022, 7:30 p.m. OK GNU C++17 TESTS 6 15 0
171970884 MOIN46 B Sept. 12, 2022, 8:50 p.m. OK GNU C++17 TESTS 6 15 0
171978806 SamuNatsu B Sept. 13, 2022, 12:34 a.m. OK GNU C++17 TESTS 6 15 0
171994289 Tunggg B Sept. 13, 2022, 5:44 a.m. OK GNU C++17 TESTS 6 15 0
171950479 yousefahmed200 B Sept. 12, 2022, 5:13 p.m. OK GNU C++17 TESTS 4 15 0
171954453 yashshet B Sept. 12, 2022, 5:39 p.m. OK GNU C++17 TESTS 4 15 0
171960201 techy_bear B Sept. 12, 2022, 6:29 p.m. OK GNU C++17 (64) TESTS 4 15 0
171993625 hbnd_jaw1 B Sept. 13, 2022, 5:34 a.m. OK GNU C++17 (64) TESTS 6 15 0
171979487 chenmoooo B Sept. 13, 2022, 12:54 a.m. OK GNU C++17 (64) TESTS 6 15 0
171977790 yaoveil B Sept. 13, 2022, 12:05 a.m. OK GNU C++17 (64) TESTS 6 15 0
171969142 enslaved B Sept. 12, 2022, 8:20 p.m. OK GNU C++17 (64) TESTS 6 15 0
171968572 I_Am_A_Noob B Sept. 12, 2022, 8:09 p.m. OK GNU C++17 (64) TESTS 6 15 0
171962057 blackout_yash B Sept. 12, 2022, 6:49 p.m. OK GNU C++17 (64) TESTS 4 15 0
171959925 JohanWOW B Sept. 12, 2022, 6:27 p.m. OK GNU C++17 (64) TESTS 4 15 0
171955026 incursive B Sept. 12, 2022, 5:44 p.m. OK GNU C++17 (64) TESTS 4 15 0
171954249 Krzychuo B Sept. 12, 2022, 5:38 p.m. OK GNU C++17 (64) TESTS 4 15 0
171945632 Scorpion47 B Sept. 12, 2022, 4:53 p.m. OK GNU C++20 (64) TESTS 4 0 0
171954062 Efimova_kamila B Sept. 12, 2022, 5:37 p.m. OK GNU C++20 (64) TESTS 4 0 0
171957473 shaky_adino B Sept. 12, 2022, 6:04 p.m. OK GNU C++20 (64) TESTS 4 0 0
171963057 mariamhsn B Sept. 12, 2022, 6:59 p.m. OK GNU C++20 (64) TESTS 4 0 0
171974802 Sase B Sept. 12, 2022, 10:21 p.m. OK GNU C++20 (64) TESTS 6 0 1638400
171994842 notyour_young B Sept. 13, 2022, 5:51 a.m. OK GNU C++20 (64) TESTS 6 15 0
171994772 F_Rio B Sept. 13, 2022, 5:50 a.m. OK GNU C++20 (64) TESTS 6 15 0
171995079 suyashsapkal B Sept. 13, 2022, 5:54 a.m. OK GNU C++20 (64) TESTS 6 15 0
171995409 TheHarwoodButcher B Sept. 13, 2022, 5:59 a.m. OK GNU C++20 (64) TESTS 6 15 0
171995557 sketkar B Sept. 13, 2022, 6 a.m. OK GNU C++20 (64) TESTS 6 15 0
171950846 __Serendipity B Sept. 12, 2022, 5:15 p.m. OK Java 11 TESTS 4 186 0
171983614 rajan44chauhan B Sept. 13, 2022, 2:35 a.m. OK Java 11 TESTS 6 202 0
171989614 vijender_8601 B Sept. 13, 2022, 4:33 a.m. OK Java 11 TESTS 6 217 0
171957948 Aman_dixit B Sept. 12, 2022, 6:08 p.m. OK Java 11 TESTS 4 233 15155200
171982917 aditya2024 B Sept. 13, 2022, 2:20 a.m. OK Java 11 TESTS 6 234 0
171973825 Yousef_Badr B Sept. 12, 2022, 9:54 p.m. OK Java 11 TESTS 6 248 204800
171953453 meteoLdrago B Sept. 12, 2022, 5:32 p.m. OK Java 11 TESTS 4 264 0
171963674 rd37574 B Sept. 12, 2022, 7:06 p.m. OK Java 11 TESTS 4 264 0
171994440 simran0502 B Sept. 13, 2022, 5:46 a.m. OK Java 11 TESTS 6 265 0
171959070 im_amanaashish B Sept. 12, 2022, 6:18 p.m. OK Java 11 TESTS 4 265 0
171979075 IceWolf898 B Sept. 13, 2022, 12:42 a.m. OK Java 17 TESTS 6 249 409600
171988338 Kamal_15 B Sept. 13, 2022, 4:13 a.m. OK Java 17 TESTS 6 249 921600
171973879 LeetCodeforces_Null B Sept. 12, 2022, 9:55 p.m. OK Java 17 TESTS 6 265 204800
171978046 _wjy B Sept. 13, 2022, 12:13 a.m. OK Java 17 TESTS 6 280 819200
171961670 Rahul_072 B Sept. 12, 2022, 6:45 p.m. OK Java 17 TESTS 4 342 0
171987428 max. B Sept. 13, 2022, 3:57 a.m. OK Java 17 TESTS 6 342 1433600
171947035 himanshu11__ B Sept. 12, 2022, 4:58 p.m. OK Java 17 TESTS 4 373 0
171960421 harshit7650 B Sept. 12, 2022, 6:32 p.m. OK Java 17 TESTS 4 389 819200
171964140 rudra03 B Sept. 12, 2022, 7:11 p.m. OK Java 17 TESTS 4 421 0
171994294 bakdauletabdumuminov B Sept. 13, 2022, 5:44 a.m. OK Java 17 TESTS 6 436 614400
171981741 chaiku B Sept. 13, 2022, 1:52 a.m. OK Java 8 TESTS 6 108 0
171970223 adi_7861 B Sept. 12, 2022, 8:38 p.m. OK Java 8 TESTS 6 108 0
171984695 poopoop B Sept. 13, 2022, 2:59 a.m. OK Java 8 TESTS 6 109 0
171954215 ahmedTarek28 B Sept. 12, 2022, 5:38 p.m. OK Java 8 TESTS 4 109 0
171954121 jkslyk B Sept. 12, 2022, 5:37 p.m. OK Java 8 TESTS 4 109 0
171992744 ikillmyself B Sept. 13, 2022, 5:22 a.m. OK Java 8 TESTS 6 124 0
171949951 govindrajput B Sept. 12, 2022, 5:11 p.m. OK Java 8 TESTS 4 124 0
171948973 Koka B Sept. 12, 2022, 5:06 p.m. OK Java 8 TESTS 4 124 0
171994369 ikillmyself B Sept. 13, 2022, 5:45 a.m. OK Java 8 TESTS 6 139 0
171948177 DylanSmith B Sept. 12, 2022, 5:03 p.m. OK Java 8 TESTS 4 139 0
171961224 PeachJamm B Sept. 12, 2022, 6:40 p.m. OK MS C++ 2017 TESTS 4 46 0
171954919 AbdAlmalek-Mok B Sept. 12, 2022, 5:43 p.m. OK MS C++ 2017 TESTS 4 46 0
171950822 abhivarma209 B Sept. 12, 2022, 5:15 p.m. OK MS C++ 2017 TESTS 4 46 0
171964311 Myth35 B Sept. 12, 2022, 7:13 p.m. OK MS C++ 2017 TESTS 4 61 0
171986361 kas181 B Sept. 13, 2022, 3:33 a.m. OK MS C++ 2017 TESTS 6 77 0
171974991 Tan2K B Sept. 12, 2022, 10:26 p.m. OK MS C++ 2017 TESTS 6 93 0
171982658 6ziv B Sept. 13, 2022, 2:13 a.m. OK MS C++ 2017 TESTS 6 109 0
171952113 salah03 B Sept. 12, 2022, 5:23 p.m. OK MS C++ 2017 TESTS 4 217 0
171979435 Liberator187 B Sept. 13, 2022, 12:52 a.m. OK PyPy 3 TESTS 6 155 3993600
171961977 priyannk_k B Sept. 12, 2022, 6:48 p.m. OK PyPy 3 TESTS 4 311 8601600
171979551 WalrusRamen21 B Sept. 13, 2022, 12:55 a.m. OK PyPy 3 TESTS 6 405 8089600
171976693 kelagnir B Sept. 12, 2022, 11:23 p.m. OK PyPy 3 TESTS 6 436 7577600
171967984 sagarpm18 B Sept. 12, 2022, 8:01 p.m. OK PyPy 3 TESTS 6 468 9625600
171966866 crapcode B Sept. 12, 2022, 7:45 p.m. OK PyPy 3-64 TESTS 6 93 7372800
171980427 samchen123 B Sept. 13, 2022, 1:19 a.m. OK PyPy 3-64 TESTS 6 93 7577600
171966953 crapcode B Sept. 12, 2022, 7:46 p.m. OK PyPy 3-64 TESTS 6 109 6656000
171990563 USYDLDH B Sept. 13, 2022, 4:49 a.m. OK PyPy 3-64 TESTS 6 109 8192000
171992652 nealzane B Sept. 13, 2022, 5:20 a.m. OK PyPy 3-64 TESTS 6 109 8396800
171957257 dyppp B Sept. 12, 2022, 6:03 p.m. OK PyPy 3-64 TESTS 4 124 9216000
171972761 satyamshrma B Sept. 12, 2022, 9:30 p.m. OK PyPy 3-64 TESTS 6 124 9420800
171964010 _icy_ B Sept. 12, 2022, 7:10 p.m. OK PyPy 3-64 TESTS 4 139 9318400
171980922 dereshy B Sept. 13, 2022, 1:32 a.m. OK PyPy 3-64 TESTS 6 155 9113600
171991508 AmeMis B Sept. 13, 2022, 5:05 a.m. OK PyPy 3-64 TESTS 6 155 9932800
171946552 Reyadjr20112000 B Sept. 12, 2022, 4:57 p.m. OK Python 3 TESTS 4 171 1126400
171956464 pshubham.me B Sept. 12, 2022, 5:56 p.m. OK Python 3 TESTS 4 202 409600
171961016 ervishalkumarsingh3112 B Sept. 12, 2022, 6:38 p.m. OK Python 3 TESTS 4 233 0
171956848 bip22 B Sept. 12, 2022, 5:59 p.m. OK Python 3 TESTS 4 233 0
171952224 p4ndish B Sept. 12, 2022, 5:24 p.m. OK Python 3 TESTS 4 233 0
171963784 Mahfuj_Mahtab_Mohot B Sept. 12, 2022, 7:07 p.m. OK Python 3 TESTS 4 234 0
171960146 Askarbek_2 B Sept. 12, 2022, 6:29 p.m. OK Python 3 TESTS 4 265 0
171953975 Ovicorsho B Sept. 12, 2022, 5:36 p.m. OK Python 3 TESTS 4 280 0
171949334 minochaji B Sept. 12, 2022, 5:08 p.m. OK Python 3 TESTS 4 280 0
171956497 rex_phalange B Sept. 12, 2022, 5:56 p.m. OK Python 3 TESTS 4 295 0
171963289 liut B Sept. 12, 2022, 7:02 p.m. OK Rust 2021 TESTS 4 15 0
171953785 wrick B Sept. 12, 2022, 5:34 p.m. OK Scala TESTS 4 701 0

remove filters

Back to search problems