Codeforces Round 761 (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
1617 Codeforces Round 761 (Div. 2) FINISHED False 7200 97518263 Dec. 16, 2021, 1:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 16383 ) A Forbidden Subsequence PROGRAMMING constructive algorithms sortings strings

B"You are given strings S and T , consisting of lowercase English letters. It is guaranteed that T is a permutation of the string abc. Find string S' , the lexicographically smallest permutation of S such that T is not a subsequence of S' . String a is a permutation of string b if the number of occurrences of each distinct character is the same in both strings. A string a is a subsequence of a string b if a can be obtained from b by deletion of several (possibly, zero or all) elements. A string a is lexicographically smaller than a string b if and only if one of the following holds: Each test contains multiple test cases. The first line contains a single integer t ( 1 <= t <= 1000 ) -- the number of test cases. Description of the test cases follows. The first line of each test case contains a string S ( 1 <= |S| <= 100 ), consisting of lowercase English letters. The second line of each test case contains a string T that is a permutation of the string abc. (Hence, |T| = 3 ). Note that there is no limit on the sum of |S| across all test cases. For each test case, output a single string S' , the lexicographically smallest permutation of S such that T is not a subsequence of S' . In the first test case, both aaaabbc and aaaabcb are lexicographically smaller than aaaacbb, but they contain abc as a subsequence. In the second test case, abccc is the smallest permutation of cccba and does not contain acb as a subsequence. In the third test case, bcdis is the smallest permutation of dbsic and does not contain bac as a subsequence. "...

Tutorials

Editorial for Codeforces Round #761 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
139601970 axbtf A Dec. 17, 2021, 5:40 a.m. OK Clang++17 Diagnostics TESTS 7 62 0
139561414 gxlois A Dec. 16, 2021, 5:31 p.m. OK D TESTS 7 15 0
139597477 Mrgglock A Dec. 17, 2021, 4:26 a.m. OK GNU C11 TESTS 7 15 0
139556197 parthu A Dec. 16, 2021, 4:42 p.m. OK GNU C11 TESTS 7 218 0
139554391 jm_28 A Dec. 16, 2021, 4:30 p.m. OK GNU C++14 TESTS 7 0 0
139592552 binarypain A Dec. 17, 2021, 2:38 a.m. OK GNU C++14 TESTS 7 0 0
139592528 why_so_much_pain A Dec. 17, 2021, 2:37 a.m. OK GNU C++14 TESTS 7 0 0
139569746 hyoseok A Dec. 16, 2021, 7:08 p.m. OK GNU C++14 TESTS 7 0 0
139556465 niteshkumart.cs19 A Dec. 16, 2021, 4:44 p.m. OK GNU C++14 TESTS 7 0 0
139592689 ajeet_1606 A Dec. 17, 2021, 2:41 a.m. OK GNU C++14 TESTS 7 0 0
139572310 Yazan_Alattar A Dec. 16, 2021, 7:46 p.m. OK GNU C++14 TESTS 7 0 102400
139563143 raipro A Dec. 16, 2021, 5:49 p.m. OK GNU C++14 TESTS 7 0 102400
139601895 l.o_o.l A Dec. 17, 2021, 5:39 a.m. OK GNU C++14 TESTS 7 0 102400
139590010 Friskcpp A Dec. 17, 2021, 1:20 a.m. OK GNU C++14 TESTS 7 0 102400
139594831 RifatArefin32 A Dec. 17, 2021, 3:34 a.m. OK GNU C++17 TESTS 7 0 0
139594302 alok_k6618 A Dec. 17, 2021, 3:21 a.m. OK GNU C++17 TESTS 7 0 0
139593372 Feng_D A Dec. 17, 2021, 3 a.m. OK GNU C++17 TESTS 7 0 0
139582009 supraja872 A Dec. 17, 2021, 12:08 a.m. OK GNU C++17 TESTS 7 0 0
139579331 AngrySeal A Dec. 16, 2021, 10:24 p.m. OK GNU C++17 TESTS 7 0 0
139577434 doomsdayprotocol A Dec. 16, 2021, 9:25 p.m. OK GNU C++17 TESTS 7 0 0
139575647 gabrielwu A Dec. 16, 2021, 8:44 p.m. OK GNU C++17 TESTS 7 0 0
139574986 anonymous_2211 A Dec. 16, 2021, 8:30 p.m. OK GNU C++17 TESTS 7 0 0
139601706 ayu_shh7 A Dec. 17, 2021, 5:36 a.m. OK GNU C++17 TESTS 7 0 0
139594853 xustxozz A Dec. 17, 2021, 3:34 a.m. OK GNU C++17 TESTS 7 0 0
139588668 PurpleCrayon A Dec. 17, 2021, 12:38 a.m. OK GNU C++17 (64) TESTS 7 0 0
139598513 Ashiqi_Shafi A Dec. 17, 2021, 4:44 a.m. OK GNU C++17 (64) TESTS 7 0 0
139590526 limoumou A Dec. 17, 2021, 1:38 a.m. OK GNU C++17 (64) TESTS 7 0 0
139590435 HanTroid A Dec. 17, 2021, 1:35 a.m. OK GNU C++17 (64) TESTS 7 0 0
139569573 sahilgo A Dec. 16, 2021, 7:06 p.m. OK GNU C++17 (64) TESTS 7 0 0
139558702 no_words_to_sky A Dec. 16, 2021, 5:04 p.m. OK GNU C++17 (64) TESTS 7 0 0
139555890 y_cat A Dec. 16, 2021, 4:40 p.m. OK GNU C++17 (64) TESTS 7 0 0
139546065 Codula A Dec. 16, 2021, 3:32 p.m. OK GNU C++17 (64) TESTS 7 0 0
139574909 jt.cheng26_orz A Dec. 16, 2021, 8:29 p.m. OK GNU C++17 (64) TESTS 7 0 307200
139602444 NaveeezZ A Dec. 17, 2021, 5:47 a.m. OK GNU C++17 (64) TESTS 7 15 0
139575958 TanjiRaj A Dec. 16, 2021, 8:51 p.m. OK GNU C++20 (64) TESTS 7 0 0
139574460 UnHingedFrog A Dec. 16, 2021, 8:20 p.m. OK GNU C++20 (64) TESTS 7 0 0
139569418 NoNameLeha A Dec. 16, 2021, 7:04 p.m. OK GNU C++20 (64) TESTS 7 0 0
139567228 XALWA A Dec. 16, 2021, 6:35 p.m. OK GNU C++20 (64) TESTS 7 0 0
139564980 Mahim A Dec. 16, 2021, 6:10 p.m. OK GNU C++20 (64) TESTS 7 0 0
139563684 mohit07 A Dec. 16, 2021, 5:55 p.m. OK GNU C++20 (64) TESTS 7 0 0
139562541 kali666 A Dec. 16, 2021, 5:43 p.m. OK GNU C++20 (64) TESTS 7 0 0
139552853 prishnigarbha A Dec. 16, 2021, 4:19 p.m. OK GNU C++20 (64) TESTS 7 0 0
139590104 manideep1821 A Dec. 17, 2021, 1:24 a.m. OK GNU C++20 (64) TESTS 7 0 0
139577791 Anonim_007 A Dec. 16, 2021, 9:34 p.m. OK GNU C++20 (64) TESTS 7 0 0
139553691 Dmohan A Dec. 16, 2021, 4:25 p.m. OK Go TESTS 7 31 4300800
139582133 Satyaa A Dec. 17, 2021, 12:13 a.m. OK Java 11 TESTS 7 155 0
139568518 black_mamba01 A Dec. 16, 2021, 6:51 p.m. OK Java 11 TESTS 7 155 0
139590446 TienNguyen411 A Dec. 17, 2021, 1:35 a.m. OK Java 11 TESTS 7 171 0
139556870 aashay_03 A Dec. 16, 2021, 4:48 p.m. OK Java 11 TESTS 7 171 0
139564858 manasa_b228 A Dec. 16, 2021, 6:08 p.m. OK Java 11 TESTS 7 186 0
139602009 arbajk_09 A Dec. 17, 2021, 5:40 a.m. OK Java 11 TESTS 7 187 0
139576811 apooravsingh38 A Dec. 16, 2021, 9:10 p.m. OK Java 11 TESTS 7 187 0
139557263 suhas5979 A Dec. 16, 2021, 4:51 p.m. OK Java 11 TESTS 7 187 0
139556330 MrBruh420 A Dec. 16, 2021, 4:43 p.m. OK Java 11 TESTS 7 187 0
139555563 nickjosi A Dec. 16, 2021, 4:37 p.m. OK Java 11 TESTS 7 187 0
139564729 K0ka A Dec. 16, 2021, 6:07 p.m. OK Java 8 TESTS 7 108 0
139560442 pras7946 A Dec. 16, 2021, 5:21 p.m. OK Java 8 TESTS 7 108 0
139596123 solo07 A Dec. 17, 2021, 4:02 a.m. OK Java 8 TESTS 7 109 0
139592281 201502010200 A Dec. 17, 2021, 2:31 a.m. OK Java 8 TESTS 7 109 0
139592761 lzwjava A Dec. 17, 2021, 2:44 a.m. OK Java 8 TESTS 7 124 0
139590809 dangvu0502 A Dec. 17, 2021, 1:47 a.m. OK Java 8 TESTS 7 124 0
139571824 imMTora A Dec. 16, 2021, 7:39 p.m. OK Java 8 TESTS 7 124 0
139554422 narayan.xrd A Dec. 16, 2021, 4:30 p.m. OK Java 8 TESTS 7 124 0
139566138 akshaybhansali101 A Dec. 16, 2021, 6:23 p.m. OK Java 8 TESTS 7 139 0
139568402 Rayhan_ChowdhuRy A Dec. 16, 2021, 6:50 p.m. OK Java 8 TESTS 7 140 0
139580816 _Rimjhim_36 A Dec. 16, 2021, 11:18 p.m. OK MS C++ 2017 TESTS 7 15 0
139559576 fatant A Dec. 16, 2021, 5:12 p.m. OK MS C++ 2017 TESTS 7 31 0
139550189 1_2_3_4_5_9 A Dec. 16, 2021, 4:06 p.m. OK PyPy 2 TESTS 7 109 2048000
139552826 Bambam_Shivam A Dec. 16, 2021, 4:19 p.m. OK PyPy 3 TESTS 7 109 2048000
139552679 Bambam_Shivam A Dec. 16, 2021, 4:18 p.m. OK PyPy 3 TESTS 7 109 2150400
139553222 aman_xoxo A Dec. 16, 2021, 4:22 p.m. OK PyPy 3 TESTS 7 109 2867200
139553033 Bambam_Shivam A Dec. 16, 2021, 4:21 p.m. OK PyPy 3 TESTS 7 124 2048000
139552942 Bambam_Shivam A Dec. 16, 2021, 4:20 p.m. OK PyPy 3 TESTS 7 124 2048000
139554064 xqc0w A Dec. 16, 2021, 4:27 p.m. OK PyPy 3 TESTS 7 124 3891200
139594560 skhan_org A Dec. 17, 2021, 3:27 a.m. OK PyPy 3 TESTS 7 139 3174400
139598274 saurabhbisht A Dec. 17, 2021, 4:40 a.m. OK PyPy 3 TESTS 7 155 3584000
139581504 Drago_ A Dec. 16, 2021, 11:46 p.m. OK PyPy 3 TESTS 7 155 7577600
139552390 Fedak_Aleksandra A Dec. 16, 2021, 4:17 p.m. OK PyPy 3 TESTS 7 156 4198400
139562418 Sir.Alireza A Dec. 16, 2021, 5:41 p.m. OK PyPy 3-64 TESTS 7 124 1843200
139546123 complexroots A Dec. 16, 2021, 3:32 p.m. OK PyPy 3-64 TESTS 7 155 2969600
139547160 Amit7752 A Dec. 16, 2021, 3:34 p.m. OK PyPy 3-64 TESTS 7 171 2252800
139556747 guineapig A Dec. 16, 2021, 4:47 p.m. OK PyPy 3-64 TESTS 7 187 2764800
139590715 rutz12 A Dec. 17, 2021, 1:44 a.m. OK PyPy 3-64 TESTS 7 187 5939200
139561364 Rajesh_Kaipa A Dec. 16, 2021, 5:30 p.m. OK PyPy 3-64 TESTS 7 218 3788800
139549751 todorokishoto.ua15 A Dec. 16, 2021, 4:04 p.m. OK PyPy 3-64 TESTS 7 218 7065600
139546038 wyhong3103 A Dec. 16, 2021, 3:32 p.m. OK PyPy 3-64 TESTS 7 233 3788800
139550460 C.H.A.R.L.I.E. A Dec. 16, 2021, 4:07 p.m. OK PyPy 3-64 TESTS 7 233 4096000
139570019 den1z A Dec. 16, 2021, 7:13 p.m. OK PyPy 3-64 TESTS 7 233 4300800
139567663 gonuguntadeepak A Dec. 16, 2021, 6:40 p.m. OK Python 3 TESTS 7 46 0
139559964 Dhruv_Viradiya A Dec. 16, 2021, 5:16 p.m. OK Python 3 TESTS 7 46 0
139576581 _stylebender_ A Dec. 16, 2021, 9:05 p.m. OK Python 3 TESTS 7 61 0
139568333 bisentanmay A Dec. 16, 2021, 6:49 p.m. OK Python 3 TESTS 7 61 0
139562785 games.princeraj A Dec. 16, 2021, 5:45 p.m. OK Python 3 TESTS 7 61 0
139558460 Mattitanium A Dec. 16, 2021, 5:02 p.m. OK Python 3 TESTS 7 61 0
139556636 Syeda_Raisa_Rahman A Dec. 16, 2021, 4:46 p.m. OK Python 3 TESTS 7 61 0
139551101 SKich A Dec. 16, 2021, 4:10 p.m. OK Python 3 TESTS 7 61 0
139602654 OneBitAnanth A Dec. 17, 2021, 5:49 a.m. OK Python 3 TESTS 7 62 0
139596078 Ratree A Dec. 17, 2021, 4:01 a.m. OK Python 3 TESTS 7 62 0
139582730 kiwiyou A Dec. 17, 2021, 12:37 a.m. OK Rust 2021 TESTS 7 0 307200
139553081 apilat A Dec. 16, 2021, 4:21 p.m. OK Rust 2021 TESTS 7 15 102400

remove filters

Back to search problems