Codeforces Round 733 (Div. 1 + Div. 2, based on VK Cup 2021 - Elimination (Engine))

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
1530 Codeforces Round 733 (Div. 1 + Div. 2, based on VK Cup 2021 - Elimination (Engine)) FINISHED False 10800 105290699 July 17, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2986 ) E Minimax PROGRAMMING constructive algorithms greedy implementation strings

B'Prefix function of string t = t_1 t_2 ldots t_n and position i in it is defined as the length k of the longest proper (not equal to the whole substring) prefix of substring t_1 t_2 ldots t_i which is also a suffix of the same substring. For example, for string t = abacaba the values of the prefix function in positions 1, 2, ldots, 7 are equal to [0, 0, 1, 0, 1, 2, 3] . Let f(t) be equal to the maximum value of the prefix function of string t over all its positions. For example, f( abacaba ) = 3 . You are given a string s . Reorder its characters arbitrarily to get a string t (the number of occurrences of any character in strings s and t must be equal). The value of f(t) must be minimized. Out of all options to minimize f(t) , choose the one where string t is the lexicographically smallest. Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 10^5 ). Description of the test cases follows. The only line of each test case contains string s ( 1 <= |s| <= 10^5 ) consisting of lowercase English letters. It is guaranteed that the sum of lengths of s over all test cases does not exceed 10^5 . For each test case print a single string t . The multisets of letters in strings s and t must be equal. The value of f(t) , the maximum of prefix functions in string t , must be as small as possible. String t must be the lexicographically smallest string out of all strings satisfying the previous conditions. A string a is lexicographically smaller than a string b if and only if one of the following holds: In the first test case, f(t) = 0 and the values of prefix function are [0, 0, 0, 0, 0] for any permutation of letters. String ckpuv is the lexicographically smallest permutation of letters of string vkcup. In the second test case, '...

Tutorials

Codeforces Round #733 Editorial (all problems)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
122868931 rainboy E July 17, 2021, 8:34 p.m. OK GNU C11 TESTS 64 358 3788800
122877566 fishcathu. E July 18, 2021, 1:25 a.m. OK GNU C++11 TESTS 64 31 3891200
122889236 rdstihz E July 18, 2021, 5:08 a.m. OK GNU C++11 TESTS 64 31 3993600
122881199 sorry_thebighead E July 18, 2021, 2:53 a.m. OK GNU C++11 TESTS 64 31 3993600
122880214 grass8cow E July 18, 2021, 2:32 a.m. OK GNU C++11 TESTS 64 31 3993600
122875372 xing89qs E July 18, 2021, 12:14 a.m. OK GNU C++11 TESTS 64 31 3993600
122874355 zhuzhirui2005 E July 17, 2021, 11:35 p.m. OK GNU C++11 TESTS 64 31 3993600
122857166 Lucky_Yukikaze E July 17, 2021, 5:32 p.m. OK GNU C++11 TESTS 64 31 3993600
122847356 FreshP_0325 E July 17, 2021, 5:02 p.m. OK GNU C++11 TESTS 64 31 3993600
122878151 Acfboy E July 18, 2021, 1:41 a.m. OK GNU C++11 TESTS 64 31 4300800
122879195 sorry-i-lost E July 18, 2021, 2:09 a.m. OK GNU C++11 TESTS 64 31 4300800
122866243 C1rno E July 17, 2021, 7:48 p.m. OK GNU C++14 TESTS 64 31 3891200
122882807 GennadyTran E July 18, 2021, 3:23 a.m. OK GNU C++14 TESTS 64 31 3993600
122852195 Bedo_Sayed E July 17, 2021, 5:17 p.m. OK GNU C++14 TESTS 64 31 4096000
122871512 100_gods E July 17, 2021, 9:44 p.m. OK GNU C++14 TESTS 64 31 4300800
122853307 MooNight E July 17, 2021, 5:21 p.m. OK GNU C++14 TESTS 64 46 3891200
122890019 kamalsharmaa9 E July 18, 2021, 5:19 a.m. OK GNU C++14 TESTS 64 46 3993600
122887975 Fearless_cod E July 18, 2021, 4:50 a.m. OK GNU C++14 TESTS 64 46 3993600
122886742 meliodas873 E July 18, 2021, 4:30 a.m. OK GNU C++14 TESTS 64 46 3993600
122855994 VPurice E July 17, 2021, 5:29 p.m. OK GNU C++14 TESTS 64 46 3993600
122854916 Sympa E July 17, 2021, 5:26 p.m. OK GNU C++14 TESTS 64 46 3993600
122870198 johnchen902 E July 17, 2021, 9:05 p.m. OK GNU C++17 TESTS 64 31 3788800
122889322 seeeagull E July 18, 2021, 5:09 a.m. OK GNU C++17 TESTS 64 31 3788800
122886602 djc E July 18, 2021, 4:27 a.m. OK GNU C++17 TESTS 64 31 3891200
122886706 pr0grammer E July 18, 2021, 4:29 a.m. OK GNU C++17 TESTS 64 31 3891200
122877864 LptN21 E July 18, 2021, 1:33 a.m. OK GNU C++17 TESTS 64 31 3891200
122856501 Shubham_Persia E July 17, 2021, 5:30 p.m. OK GNU C++17 TESTS 64 31 3891200
122884926 Geralt-of-Rivia E July 18, 2021, 3:59 a.m. OK GNU C++17 TESTS 64 31 3993600
122869326 jokkeer E July 17, 2021, 8:42 p.m. OK GNU C++17 TESTS 64 31 3993600
122866918 Crescendo E July 17, 2021, 7:58 p.m. OK GNU C++17 TESTS 64 31 3993600
122866290 ashish_jasuja E July 17, 2021, 7:49 p.m. OK GNU C++17 TESTS 64 31 3993600
122856318 Narut E July 17, 2021, 5:30 p.m. OK GNU C++17 (64) TESTS 64 30 4915200
122849142 QiHai_ E July 17, 2021, 5:08 p.m. OK GNU C++17 (64) TESTS 64 31 4403200
122851842 Lemonade255 E July 17, 2021, 5:16 p.m. OK GNU C++17 (64) TESTS 64 31 4403200
122848234 KYoA_A E July 17, 2021, 5:05 p.m. OK GNU C++17 (64) TESTS 64 31 4608000
122865143 Kregor E July 17, 2021, 7:35 p.m. OK GNU C++17 (64) TESTS 64 31 4608000
122851869 dblark E July 17, 2021, 5:16 p.m. OK GNU C++17 (64) TESTS 64 31 4608000
122866348 NO-COMPETITION E July 17, 2021, 7:50 p.m. OK GNU C++17 (64) TESTS 64 31 4710400
122867820 lelbaba E July 17, 2021, 8:13 p.m. OK GNU C++17 (64) TESTS 64 31 4710400
122877075 petitaugustin E July 18, 2021, 1:11 a.m. OK GNU C++17 (64) TESTS 64 31 4710400
122871543 Narutobaco E July 17, 2021, 9:45 p.m. OK GNU C++17 (64) TESTS 64 31 4710400
122877773 codelegend E July 18, 2021, 1:31 a.m. OK Haskell TESTS 64 62 13721600
122865686 clyring E July 17, 2021, 7:41 p.m. OK Haskell TESTS 64 78 11673600
122877665 codelegend E July 18, 2021, 1:28 a.m. OK Haskell TESTS 64 124 11673600
122854934 baron_ E July 17, 2021, 5:26 p.m. OK Java 11 TESTS 64 218 24371200
122869888 Is2ac E July 17, 2021, 8:56 p.m. OK Java 11 TESTS 64 218 24371200
122849632 dalt E July 17, 2021, 5:09 p.m. OK Java 11 TESTS 64 218 25497600
122892208 hakr_2104 E July 18, 2021, 5:50 a.m. OK Java 11 TESTS 64 264 25292800
122864895 Dukkha E July 17, 2021, 7:32 p.m. OK Java 11 TESTS 64 280 24985600
122890770 Catchiz E July 18, 2021, 5:31 a.m. OK Java 11 TESTS 64 280 25190400
122864262 dusty.and.rusty E July 17, 2021, 7:27 p.m. OK Java 11 TESTS 64 311 25497600
122874191 augurar E July 17, 2021, 11:28 p.m. OK Java 8 TESTS 64 124 20992000
122883683 aggarwalanshul01 E July 18, 2021, 3:38 a.m. OK Java 8 TESTS 64 139 22016000
122865852 kkkkush E July 17, 2021, 7:44 p.m. OK Java 8 TESTS 64 140 21299200
122865889 NighTurs E July 17, 2021, 7:44 p.m. OK Java 8 TESTS 64 140 21504000
122865438 Katushechka E July 17, 2021, 7:38 p.m. OK Java 8 TESTS 64 140 22425600
122868005 honeysingh18 E July 17, 2021, 8:17 p.m. OK Java 8 TESTS 64 140 22425600
122865127 pulkit1411 E July 17, 2021, 7:35 p.m. OK Java 8 TESTS 64 140 39116800
122854193 golions E July 17, 2021, 5:24 p.m. OK Java 8 TESTS 64 155 22425600
122853621 rabaiBomkarBittalBang E July 17, 2021, 5:22 p.m. OK Java 8 TESTS 64 156 23449600
122849037 plusplus6408 E July 17, 2021, 5:07 p.m. OK Java 8 TESTS 64 202 22323200
122847433 koper E July 17, 2021, 5:02 p.m. OK Kotlin TESTS 64 826 24576000
122854045 ComPhyPark E July 17, 2021, 5:23 p.m. OK MS C++ 2017 TESTS 64 46 3891200
122878490 Cube219 E July 18, 2021, 1:50 a.m. OK MS C++ 2017 TESTS 64 61 3993600
122852135 moreda E July 17, 2021, 5:17 p.m. OK MS C++ 2017 TESTS 64 62 4096000
122866590 danilgrig E July 17, 2021, 7:53 p.m. OK MS C++ 2017 TESTS 64 62 4096000
122870052 Tangerine E July 17, 2021, 9:01 p.m. OK MS C++ 2017 TESTS 64 343 3993600
122856263 Yupiteru E July 17, 2021, 5:30 p.m. OK .NET Core C# TESTS 64 187 21708800
122851628 TheNoOneCoder E July 17, 2021, 5:16 p.m. OK PyPy 3 TESTS 64 233 29286400
122865575 ayaoni E July 17, 2021, 7:40 p.m. OK PyPy 3 TESTS 64 295 30105600
122867211 oadey89 E July 17, 2021, 8:02 p.m. OK PyPy 3 TESTS 64 312 29593600
122848892 its_jag E July 17, 2021, 5:07 p.m. OK PyPy 3 TESTS 64 327 30617600
122852855 dinoco_hicks E July 17, 2021, 5:20 p.m. OK PyPy 3 TESTS 64 358 29900800
122853414 ayaoni E July 17, 2021, 5:21 p.m. OK PyPy 3 TESTS 64 374 30208000
122857901 Pheonix23 E July 17, 2021, 5:33 p.m. OK PyPy 3 TESTS 64 421 30105600
122874614 hritik3878 E July 17, 2021, 11:45 p.m. OK PyPy 3 TESTS 64 608 30310400
122882685 MILOY E July 18, 2021, 3:21 a.m. OK PyPy 3 TESTS 64 904 40345600
122852604 Soul_Silver E July 17, 2021, 5:19 p.m. OK PyPy 3 TESTS 64 1247 33587200
122883291 SummerDAway E July 18, 2021, 3:31 a.m. OK Python 2 TESTS 64 795 8192000
122875466 turgon314 E July 18, 2021, 12:18 a.m. OK Python 3 TESTS 64 514 7884800
122847136 belkka E July 17, 2021, 5:01 p.m. OK Python 3 TESTS 64 966 8601600
122879786 NecroSean38 E July 18, 2021, 2:22 a.m. OK Python 3 TESTS 64 982 8499200
122849860 emelyan E July 17, 2021, 5:10 p.m. OK Python 3 TESTS 64 1060 8192000
122850195 r57shell E July 17, 2021, 5:11 p.m. OK Python 3 TESTS 64 1138 8908800
122871264 hxu10 E July 17, 2021, 9:37 p.m. OK Python 3 TESTS 64 1450 7884800
122870043 vinay272001 E July 17, 2021, 9 p.m. OK Python 3 TESTS 64 1808 7884800
122873035 8uk.8ak E July 17, 2021, 10:40 p.m. OK Rust TESTS 64 31 4300800
122854628 Hillmouse E July 17, 2021, 5:25 p.m. OK Rust TESTS 64 46 4096000
122871179 8uk.8ak E July 17, 2021, 9:34 p.m. OK Rust TESTS 64 841 7270400
122871039 8uk.8ak E July 17, 2021, 9:30 p.m. OK Rust TESTS 64 904 4300800
122870950 8uk.8ak E July 17, 2021, 9:28 p.m. OK Rust TESTS 64 904 4300800
122870915 8uk.8ak E July 17, 2021, 9:26 p.m. OK Rust TESTS 64 904 4300800

remove filters

Back to search problems