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 |
---|---|---|---|---|---|---|
1450 | Codeforces Global Round 12 | FINISHED | False | 10800 | 124557899 | Dec. 6, 2020, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 18012 ) | A | Avoid Trygub | PROGRAMMING | constructive algorithms sortings |
B'A string b is a subsequence of a string a if b can be obtained from a by deletion of several (possibly, zero or all) characters. For example, "xy" is a subsequence of "xzyw" and "xy", but not "yx". You are given a string a . Your task is to reorder the characters of a so that "trygub" is not a subsequence of the resulting string. In other words, you should find a string b which is a permutation of symbols of the string a and "trygub" is not a subsequence of b . We have a truly marvelous proof that any string can be arranged not to contain "trygub" as a subsequence, but this problem statement is too short to contain it. The first line contains a single integer t ( 1 <= t <= 100 ) -- the number of test cases. The first line of each test case contains a single integer n ( 1 <= n <= 200 ) -- the length of a . The next line contains the string a of length n , consisting of lowercase English letters. For each test case, output a string b of length n which is a permutation of characters of the string a , and such that "trygub" is not a subsequence of it. If there exist multiple possible strings b , you can print any. In the first test case, "bugyrtnotna" does not contain "trygub" as a subsequence. It does contain the letters of "trygub", but not in the correct order, so it is not a subsequence. In the second test case, we did not change the order of characters because it is not needed. In the third test case, "bruhtrywatchinggura" does contain "trygu" as a subsequence, but not "trygub". '... |
Codeforces Global Round 12 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
100595059 | chowdhuryshashwoto | A | Dec. 7, 2020, 2:07 a.m. | OK | GNU C11 | TESTS | 18 | 15 | 0 | ||
100565644 | raghav00 | A | Dec. 6, 2020, 4:15 p.m. | OK | GNU C11 | TESTS | 18 | 31 | 0 | ||
100577930 | Bold_Eagle | A | Dec. 6, 2020, 5:21 p.m. | OK | GNU C11 | TESTS | 18 | 31 | 0 | ||
100582964 | Jamil-Ahmed | A | Dec. 6, 2020, 6:31 p.m. | OK | GNU C11 | TESTS | 18 | 31 | 0 | ||
100589625 | sameer.g2347 | A | Dec. 6, 2020, 9:02 p.m. | OK | GNU C11 | TESTS | 18 | 31 | 0 | ||
100593738 | BugLeave | A | Dec. 7, 2020, 12:51 a.m. | OK | GNU C11 | TESTS | 18 | 31 | 0 | ||
100603296 | shajra804 | A | Dec. 7, 2020, 6:02 a.m. | OK | GNU C11 | TESTS | 18 | 46 | 0 | ||
100573196 | NK1972 | A | Dec. 6, 2020, 4:54 p.m. | OK | GNU C11 | TESTS | 18 | 46 | 0 | ||
100574905 | Shaiful_Islam_Emon | A | Dec. 6, 2020, 5:04 p.m. | OK | GNU C11 | TESTS | 18 | 93 | 0 | ||
100573596 | heth1705 | A | Dec. 6, 2020, 4:56 p.m. | OK | GNU C11 | TESTS | 18 | 93 | 0 | ||
100570034 | Archit_Gupta | A | Dec. 6, 2020, 4:37 p.m. | OK | GNU C++11 | TESTS | 18 | 15 | 0 | ||
100595021 | GSHgsh | A | Dec. 7, 2020, 2:04 a.m. | OK | GNU C++11 | TESTS | 18 | 15 | 0 | ||
100596752 | purple_rAin | A | Dec. 7, 2020, 3:11 a.m. | OK | GNU C++11 | TESTS | 18 | 15 | 0 | ||
100596555 | gswsc30 | A | Dec. 7, 2020, 3:04 a.m. | OK | GNU C++11 | TESTS | 18 | 15 | 0 | ||
100579568 | pavellevap | A | Dec. 6, 2020, 5:29 p.m. | OK | GNU C++11 | TESTS | 18 | 15 | 0 | ||
100588651 | overwrite | A | Dec. 6, 2020, 8:31 p.m. | OK | GNU C++11 | TESTS | 18 | 15 | 0 | ||
100596586 | Suzukaze_Kiseki | A | Dec. 7, 2020, 3:05 a.m. | OK | GNU C++11 | TESTS | 18 | 15 | 204800 | ||
100602654 | chongya007 | A | Dec. 7, 2020, 5:49 a.m. | OK | GNU C++11 | TESTS | 18 | 30 | 0 | ||
100599516 | pakshik_kothari | A | Dec. 7, 2020, 4:37 a.m. | OK | GNU C++11 | TESTS | 18 | 30 | 0 | ||
100598176 | mann_vora | A | Dec. 7, 2020, 4 a.m. | OK | GNU C++11 | TESTS | 18 | 30 | 0 | ||
100603303 | amvikash | A | Dec. 7, 2020, 6:02 a.m. | OK | GNU C++14 | TESTS | 18 | 30 | 0 | ||
100594997 | vspawar056 | A | Dec. 7, 2020, 2:03 a.m. | OK | GNU C++14 | TESTS | 18 | 30 | 0 | ||
100596504 | leading1star | A | Dec. 7, 2020, 3:02 a.m. | OK | GNU C++14 | TESTS | 18 | 30 | 0 | ||
100601809 | Abhiz_19 | A | Dec. 7, 2020, 5:32 a.m. | OK | GNU C++14 | TESTS | 18 | 30 | 0 | ||
100585215 | m3h3d1 | A | Dec. 6, 2020, 7:04 p.m. | OK | GNU C++14 | TESTS | 18 | 30 | 0 | ||
100586491 | IamODJ | A | Dec. 6, 2020, 7:30 p.m. | OK | GNU C++14 | TESTS | 18 | 30 | 0 | ||
100588633 | aviabhinn98 | A | Dec. 6, 2020, 8:31 p.m. | OK | GNU C++14 | TESTS | 18 | 30 | 0 | ||
100588951 | Hitman571 | A | Dec. 6, 2020, 8:40 p.m. | OK | GNU C++14 | TESTS | 18 | 30 | 0 | ||
100589841 | switchpiggy | A | Dec. 6, 2020, 9:09 p.m. | OK | GNU C++14 | TESTS | 18 | 30 | 0 | ||
100594858 | auddl0756 | A | Dec. 7, 2020, 1:56 a.m. | OK | GNU C++14 | TESTS | 18 | 30 | 0 | ||
100602963 | Asif10H | A | Dec. 7, 2020, 5:55 a.m. | OK | GNU C++17 | TESTS | 18 | 15 | 0 | ||
100593120 | NogiNonoka | A | Dec. 7, 2020, 12:08 a.m. | OK | GNU C++17 | TESTS | 18 | 15 | 0 | ||
100588606 | little_angel | A | Dec. 6, 2020, 8:30 p.m. | OK | GNU C++17 | TESTS | 18 | 15 | 0 | ||
100584455 | UchihaItachi5801 | A | Dec. 6, 2020, 6:51 p.m. | OK | GNU C++17 | TESTS | 18 | 15 | 0 | ||
100600314 | bensanhuan | A | Dec. 7, 2020, 4:57 a.m. | OK | GNU C++17 | TESTS | 18 | 30 | 0 | ||
100601187 | Batyrkhan228 | A | Dec. 7, 2020, 5:18 a.m. | OK | GNU C++17 | TESTS | 18 | 30 | 0 | ||
100599843 | vaibhavdalmia | A | Dec. 7, 2020, 4:45 a.m. | OK | GNU C++17 | TESTS | 18 | 30 | 0 | ||
100598498 | mukul123_ | A | Dec. 7, 2020, 4:10 a.m. | OK | GNU C++17 | TESTS | 18 | 30 | 0 | ||
100597868 | UttamS | A | Dec. 7, 2020, 3:50 a.m. | OK | GNU C++17 | TESTS | 18 | 30 | 0 | ||
100597457 | Samiran | A | Dec. 7, 2020, 3:35 a.m. | OK | GNU C++17 | TESTS | 18 | 30 | 0 | ||
100584083 | Arceus03 | A | Dec. 6, 2020, 6:46 p.m. | OK | GNU C++17 (64) | TESTS | 18 | 15 | 0 | ||
100585451 | bedirhan | A | Dec. 6, 2020, 7:08 p.m. | OK | GNU C++17 (64) | TESTS | 18 | 15 | 0 | ||
100588813 | sameerg2300 | A | Dec. 6, 2020, 8:36 p.m. | OK | GNU C++17 (64) | TESTS | 18 | 15 | 0 | ||
100595641 | errorgorn | A | Dec. 7, 2020, 2:31 a.m. | OK | GNU C++17 (64) | TESTS | 18 | 15 | 0 | ||
100599906 | randow | A | Dec. 7, 2020, 4:47 a.m. | OK | GNU C++17 (64) | TESTS | 18 | 30 | 0 | ||
100600289 | sammyMaX | A | Dec. 7, 2020, 4:57 a.m. | OK | GNU C++17 (64) | TESTS | 18 | 30 | 0 | ||
100596926 | HOLMES_2k | A | Dec. 7, 2020, 3:17 a.m. | OK | GNU C++17 (64) | TESTS | 18 | 30 | 0 | ||
100597981 | ShadeSlide | A | Dec. 7, 2020, 3:53 a.m. | OK | GNU C++17 (64) | TESTS | 18 | 30 | 0 | ||
100598373 | idsigma | A | Dec. 7, 2020, 4:06 a.m. | OK | GNU C++17 (64) | TESTS | 18 | 30 | 0 | ||
100598414 | bear_45 | A | Dec. 7, 2020, 4:07 a.m. | OK | GNU C++17 (64) | TESTS | 18 | 30 | 0 | ||
100566996 | Codeispower | A | Dec. 6, 2020, 4:22 p.m. | OK | Java 11 | TESTS | 18 | 171 | 0 | ||
100585345 | abdelrahman-yousf | A | Dec. 6, 2020, 7:06 p.m. | OK | Java 11 | TESTS | 18 | 171 | 0 | ||
100583004 | litesam | A | Dec. 6, 2020, 6:31 p.m. | OK | Java 11 | TESTS | 18 | 171 | 0 | ||
100599808 | vipin__sharma | A | Dec. 7, 2020, 4:44 a.m. | OK | Java 11 | TESTS | 18 | 186 | 0 | ||
100593601 | gouthamKri5hna | A | Dec. 7, 2020, 12:42 a.m. | OK | Java 11 | TESTS | 18 | 187 | 0 | ||
100593766 | Grazel | A | Dec. 7, 2020, 12:52 a.m. | OK | Java 11 | TESTS | 18 | 202 | 0 | ||
100600872 | prafful49 | A | Dec. 7, 2020, 5:11 a.m. | OK | Java 11 | TESTS | 18 | 202 | 0 | ||
100566441 | sadhwanitushar | A | Dec. 6, 2020, 4:19 p.m. | OK | Java 11 | TESTS | 18 | 217 | 0 | ||
100601081 | ojhaankesh1975 | A | Dec. 7, 2020, 5:16 a.m. | OK | Java 11 | TESTS | 18 | 218 | 0 | ||
100579515 | Strong_Zer0 | A | Dec. 6, 2020, 5:29 p.m. | OK | Java 11 | TESTS | 18 | 218 | 0 | ||
100586547 | ashraf101 | A | Dec. 6, 2020, 7:31 p.m. | OK | Java 8 | TESTS | 18 | 109 | 0 | ||
100583802 | kruzian | A | Dec. 6, 2020, 6:42 p.m. | OK | Java 8 | TESTS | 18 | 109 | 0 | ||
100583035 | gagan_6730 | A | Dec. 6, 2020, 6:32 p.m. | OK | Java 8 | TESTS | 18 | 109 | 0 | ||
100583550 | _jan | A | Dec. 6, 2020, 6:38 p.m. | OK | Java 8 | TESTS | 18 | 109 | 0 | ||
100602650 | antonskubiiev | A | Dec. 7, 2020, 5:49 a.m. | OK | Java 8 | TESTS | 18 | 109 | 0 | ||
100600779 | Dhananjay.07 | A | Dec. 7, 2020, 5:09 a.m. | OK | Java 8 | TESTS | 18 | 109 | 0 | ||
100599428 | Rayhan_ChowdhuRy | A | Dec. 7, 2020, 4:35 a.m. | OK | Java 8 | TESTS | 18 | 109 | 0 | ||
100593938 | hassanU | A | Dec. 7, 2020, 1:02 a.m. | OK | Java 8 | TESTS | 18 | 109 | 0 | ||
100590350 | less_ordinary | A | Dec. 6, 2020, 9:29 p.m. | OK | Java 8 | TESTS | 18 | 109 | 0 | ||
100592804 | xoszm | A | Dec. 6, 2020, 11:46 p.m. | OK | Java 8 | TESTS | 18 | 124 | 0 | ||
100571521 | sevenander | A | Dec. 6, 2020, 4:45 p.m. | OK | Kotlin | TESTS | 18 | 124 | 0 | ||
100594167 | Spheniscine | A | Dec. 7, 2020, 1:17 a.m. | OK | Kotlin | TESTS | 18 | 124 | 512000 | ||
100587644 | Dev.Zaki | A | Dec. 6, 2020, 8:02 p.m. | OK | Kotlin | TESTS | 18 | 171 | 1433600 | ||
100596757 | wuchaojie925 | A | Dec. 7, 2020, 3:11 a.m. | OK | Kotlin | TESTS | 18 | 186 | 1433600 | ||
100566704 | ANKIT_SLAYER | A | Dec. 6, 2020, 4:20 p.m. | OK | MS C++ | TESTS | 18 | 31 | 0 | ||
100593061 | tawfekhesham | A | Dec. 7, 2020, 12:04 a.m. | OK | MS C++ 2017 | TESTS | 18 | 31 | 0 | ||
100596977 | sy20190441030 | A | Dec. 7, 2020, 3:19 a.m. | OK | MS C++ 2017 | TESTS | 18 | 31 | 0 | ||
100595519 | rafle | A | Dec. 7, 2020, 2:25 a.m. | OK | MS C++ 2017 | TESTS | 18 | 31 | 0 | ||
100583160 | Gravekper | A | Dec. 6, 2020, 6:33 p.m. | OK | MS C++ 2017 | TESTS | 18 | 31 | 0 | ||
100567910 | jaynpatel222 | A | Dec. 6, 2020, 4:26 p.m. | OK | MS C++ 2017 | TESTS | 18 | 31 | 102400 | ||
100568421 | zapMonkey02 | A | Dec. 6, 2020, 4:29 p.m. | OK | MS C++ 2017 | TESTS | 18 | 31 | 102400 | ||
100586650 | dwen | A | Dec. 6, 2020, 7:34 p.m. | OK | MS C++ 2017 | TESTS | 18 | 46 | 0 | ||
100574199 | krishnayadav1 | A | Dec. 6, 2020, 5 p.m. | OK | MS C++ 2017 | TESTS | 18 | 46 | 0 | ||
100584629 | Nidz | A | Dec. 6, 2020, 6:54 p.m. | OK | .NET Core C# | TESTS | 18 | 108 | 102400 | ||
100595428 | tajulislam | A | Dec. 7, 2020, 2:21 a.m. | OK | PHP | TESTS | 18 | 46 | 0 | ||
100568579 | rtjoa | A | Dec. 6, 2020, 4:29 p.m. | OK | PyPy 3 | TESTS | 18 | 140 | 0 | ||
100569840 | aslan_dukenbay | A | Dec. 6, 2020, 4:36 p.m. | OK | PyPy 3 | TESTS | 18 | 140 | 102400 | ||
100566783 | DarkOverlord999 | A | Dec. 6, 2020, 4:21 p.m. | OK | PyPy 3 | TESTS | 18 | 140 | 102400 | ||
100598785 | pruv007 | A | Dec. 7, 2020, 4:18 a.m. | OK | PyPy 3 | TESTS | 18 | 140 | 102400 | ||
100601886 | i_m_arin | A | Dec. 7, 2020, 5:33 a.m. | OK | PyPy 3 | TESTS | 18 | 140 | 102400 | ||
100601743 | divyanshmandhan | A | Dec. 7, 2020, 5:30 a.m. | OK | PyPy 3 | TESTS | 18 | 140 | 102400 | ||
100593537 | 87ouo | A | Dec. 7, 2020, 12:36 a.m. | OK | PyPy 3 | TESTS | 18 | 140 | 102400 | ||
100586004 | Venom_007 | A | Dec. 6, 2020, 7:19 p.m. | OK | PyPy 3 | TESTS | 18 | 140 | 102400 | ||
100600733 | safal.gupta001 | A | Dec. 7, 2020, 5:08 a.m. | OK | PyPy 3 | TESTS | 18 | 140 | 1433600 | ||
100594097 | jlallas384 | A | Dec. 7, 2020, 1:12 a.m. | OK | PyPy 3 | TESTS | 18 | 140 | 1433600 | ||
100594930 | biltharesatyendra | A | Dec. 7, 2020, 2 a.m. | OK | Python 2 | TESTS | 18 | 155 | 0 | ||
100597005 | Legolas_Otaku | A | Dec. 7, 2020, 3:20 a.m. | OK | Python 2 | TESTS | 18 | 156 | 0 | ||
100601646 | ap1008 | A | Dec. 7, 2020, 5:28 a.m. | OK | Python 2 | TESTS | 18 | 171 | 102400 | ||
100598611 | practised | A | Dec. 7, 2020, 4:13 a.m. | OK | Python 3 | TESTS | 18 | 93 | 0 | ||
100596576 | KanhuKeNanu | A | Dec. 7, 2020, 3:05 a.m. | OK | Python 3 | TESTS | 18 | 93 | 0 | ||
100586443 | samyaksrivastava9 | A | Dec. 6, 2020, 7:29 p.m. | OK | Python 3 | TESTS | 18 | 93 | 0 | ||
100582458 | pakshi_141199 | A | Dec. 6, 2020, 6:26 p.m. | OK | Python 3 | TESTS | 18 | 93 | 0 | ||
100603344 | 0xc0dey0da | A | Dec. 7, 2020, 6:03 a.m. | OK | Python 3 | TESTS | 18 | 108 | 0 | ||
100599522 | arajeet_arj | A | Dec. 7, 2020, 4:37 a.m. | OK | Python 3 | TESTS | 18 | 108 | 0 | ||
100585503 | iamsarvesh | A | Dec. 6, 2020, 7:08 p.m. | OK | Python 3 | TESTS | 18 | 108 | 0 | ||
100574386 | shubham409 | A | Dec. 6, 2020, 5:01 p.m. | OK | Python 3 | TESTS | 18 | 108 | 0 | ||
100600820 | saiyancoder | A | Dec. 7, 2020, 5:10 a.m. | OK | Python 3 | TESTS | 18 | 109 | 0 | ||
100600792 | arnav2004 | A | Dec. 7, 2020, 5:10 a.m. | OK | Python 3 | TESTS | 18 | 109 | 0 | ||
100597125 | kanik0 | A | Dec. 7, 2020, 3:23 a.m. | OK | Rust | TESTS | 18 | 31 | 102400 |
Back to search problems