Codeforces Round 501 (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
1015 Codeforces Round 501 (Div. 3) FINISHED False 7200 198775499 July 31, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 11624 ) B Obtaining the String PROGRAMMING implementation 1300

B'You are given two strings s and t . Both strings have length n and consist of lowercase Latin letters. The characters in the strings are numbered from 1 to n . You can successively perform the following move any number of times (possibly, zero): You can 't apply a move to the string t . The moves are applied to the string s one after another. Your task is to obtain the string t from the string s . Find any way to do it with at most 10^4 such moves. You do not have to minimize the number of moves, just find any sequence of moves of length 10^4 or less to transform s into t . The first line of the input contains one integer n ( 1 <= n <= 50 ) -- the length of strings s and t . The second line of the input contains the string s consisting of n lowercase Latin letters. The third line of the input contains the string t consisting of n lowercase Latin letters. If it is impossible to obtain the string t using moves, print "-1". Otherwise in the first line print one integer k -- the number of moves to transform s to t . Note that k must be an integer number between 0 and 10^4 inclusive. In the second line print k integers c_j ( 1 <= c_j < n ), where c_j means that on the j -th move you swap characters s_{c_j} and s_{c_j + 1} . If you do not need to apply any moves, print a single integer 0 in the first line and either leave the second line empty or do not print it at all. In the first example the string s changes as follows: "abcdef" rightarrow "abdcef" rightarrow "abdcfe" rightarrow "abdfce" rightarrow "abdfec". In the second example there is no way to transform the string s into the string t through any allowed moves. '...

Tutorials

60949

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
45429457 Pigmeu B Nov. 8, 2018, 1:52 a.m. OK Clang++17 Diagnostics TESTS 48 46 6348800 1300
48903526 YassineLoulou B Jan. 24, 2019, 7:10 p.m. OK Clang++17 Diagnostics TESTS 48 46 7372800 1300
58083686 ahmat B July 31, 2019, 2:44 p.m. OK D TESTS 48 31 4198400 1300
41539627 rr_ B Aug. 12, 2018, 9:06 p.m. OK D TESTS 48 31 4198400 1300
58084233 ahmat B July 31, 2019, 2:56 p.m. OK D TESTS 48 46 4198400 1300
41198601 BattleCry B Aug. 4, 2018, 3:26 a.m. OK FPC TESTS 48 30 102400 1300
41321092 chinahhy B Aug. 8, 2018, 1:12 a.m. OK FPC TESTS 48 31 102400 1300
41388577 _Time_Lord_ B Aug. 9, 2018, 7:17 a.m. OK FPC TESTS 48 31 204800 1300
52346688 luogu_bot4 B April 5, 2019, 12:57 p.m. OK FPC TESTS 48 31 409600 1300
41446683 programming0808 B Aug. 11, 2018, 1:06 a.m. OK FPC TESTS 48 31 716800 1300
41114328 MrMajumder B Aug. 2, 2018, 8:16 a.m. OK GNU C TESTS 48 30 307200 1300
41091655 nbdyn B Aug. 1, 2018, 4:59 p.m. OK GNU C TESTS 48 31 0 1300
41560558 stdio2016 B Aug. 13, 2018, 1:58 p.m. OK GNU C TESTS 48 31 0 1300
41153497 RenKai_Z B Aug. 3, 2018, 10:29 a.m. OK GNU C TESTS 48 31 0 1300
41108252 alawal B Aug. 2, 2018, 5:29 a.m. OK GNU C TESTS 48 31 0 1300
41107392 Yash_agrawal19 B Aug. 2, 2018, 5 a.m. OK GNU C TESTS 48 31 0 1300
42066793 kara42 B Aug. 24, 2018, 8:12 p.m. OK GNU C TESTS 48 31 204800 1300
41150218 Bear_Two_ B Aug. 3, 2018, 8:29 a.m. OK GNU C TESTS 48 31 307200 1300
41118274 nbdyn B Aug. 2, 2018, 10:22 a.m. OK GNU C TESTS 48 31 307200 1300
41116333 DShakil B Aug. 2, 2018, 9:10 a.m. OK GNU C TESTS 48 31 307200 1300
42004635 Sherek B Aug. 23, 2018, 5:31 p.m. OK GNU C++ TESTS 48 30 0 1300
41925714 vjudge4 B Aug. 21, 2018, 7:20 a.m. OK GNU C++ TESTS 48 30 0 1300
41293533 Pambisito B Aug. 7, 2018, 5:35 a.m. OK GNU C++ TESTS 48 30 0 1300
41252987 CompuPhysics B Aug. 5, 2018, 5:38 p.m. OK GNU C++ TESTS 48 30 0 1300
41605048 Koning B Aug. 15, 2018, 1:28 a.m. OK GNU C++ TESTS 48 30 102400 1300
42296195 vjudge5 B Aug. 31, 2018, 3:23 a.m. OK GNU C++ TESTS 48 30 204800 1300
41329439 sjc_fan B Aug. 8, 2018, 7:51 a.m. OK GNU C++ TESTS 48 30 307200 1300
41098921 gurpreet_ait B Aug. 1, 2018, 10:36 p.m. OK GNU C++ TESTS 48 30 409600 1300
41427322 ziwen B Aug. 10, 2018, 10:11 a.m. OK GNU C++ TESTS 48 30 716800 1300
42348716 vjudge5 B Sept. 2, 2018, 2:16 a.m. OK GNU C++ TESTS 48 31 0 1300
47876797 meumang1 B Jan. 3, 2019, 3:53 p.m. OK GNU C11 TESTS 48 31 0 1300
44404695 luogu_bot3 B Oct. 16, 2018, 2:21 p.m. OK GNU C11 TESTS 48 31 0 1300
45248622 GhostMan21 B Nov. 3, 2018, 3:14 p.m. OK GNU C11 TESTS 48 31 0 1300
45248658 LChaves B Nov. 3, 2018, 3:15 p.m. OK GNU C11 TESTS 48 31 0 1300
46934138 NoSoul B Dec. 12, 2018, 1:02 p.m. OK GNU C11 TESTS 48 31 0 1300
58691442 wander_dog B Aug. 13, 2019, 3:24 a.m. OK GNU C11 TESTS 48 31 0 1300
49562047 vjudge1 B Feb. 7, 2019, 1:04 p.m. OK GNU C11 TESTS 48 31 409600 1300
55056335 patilc125 B June 3, 2019, 7:10 p.m. OK GNU C11 TESTS 48 31 1945600 1300
49561975 vjudge4 B Feb. 7, 2019, 1:01 p.m. OK GNU C11 TESTS 48 31 3993600 1300
41535039 DeaderJR B Aug. 12, 2018, 5:06 p.m. OK GNU C++11 TESTS 48 15 0 1300
41568327 nikizakr B Aug. 13, 2018, 7:03 p.m. OK GNU C++11 TESTS 48 15 0 1300
42325118 Rods B Sept. 1, 2018, 4:09 a.m. OK GNU C++11 TESTS 48 15 204800 1300
50877946 TheScienceGuy B March 6, 2019, 7:31 a.m. OK GNU C++11 TESTS 48 30 0 1300
64793124 vjudge2 B Nov. 13, 2019, 11:56 a.m. OK GNU C++11 TESTS 48 30 0 1300
55862513 pdp0911 B June 21, 2019, 10:20 a.m. OK GNU C++11 TESTS 48 30 0 1300
55084543 vjudge5 B June 4, 2019, 12:04 p.m. OK GNU C++11 TESTS 48 30 0 1300
54233732 vjudge5 B May 16, 2019, 9:48 a.m. OK GNU C++11 TESTS 48 30 0 1300
45860878 vjudge3 B Nov. 17, 2018, 5:28 a.m. OK GNU C++11 TESTS 48 30 0 1300
43115427 baxirushi77 B Sept. 20, 2018, 1:34 p.m. OK GNU C++11 TESTS 48 30 0 1300
41251860 0_marchuk B Aug. 5, 2018, 4:48 p.m. OK GNU C++14 TESTS 48 15 0 1300
41534955 vaibhav711 B Aug. 12, 2018, 5:01 p.m. OK GNU C++14 TESTS 48 15 0 1300
41640680 fffeyn B Aug. 16, 2018, 5:13 a.m. OK GNU C++14 TESTS 48 15 0 1300
42000197 Mr_Maverick B Aug. 23, 2018, 2:37 p.m. OK GNU C++14 TESTS 48 15 0 1300
45308197 6016203019 B Nov. 5, 2018, 12:06 a.m. OK GNU C++14 TESTS 48 15 0 1300
46008431 bilau_de_campina B Nov. 20, 2018, 6:28 p.m. OK GNU C++14 TESTS 48 15 0 1300
46047027 oldbranch B Nov. 22, 2018, 3:26 a.m. OK GNU C++14 TESTS 48 15 0 1300
50919227 khalil.a.b B March 7, 2019, 8:13 a.m. OK GNU C++14 TESTS 48 15 0 1300
51416164 Madeline B March 17, 2019, 2:07 p.m. OK GNU C++14 TESTS 48 15 0 1300
57156488 Abdelrahman_K B July 16, 2019, 4:54 p.m. OK GNU C++14 TESTS 48 15 0 1300
43066646 WallE256 B Sept. 19, 2018, 6:02 a.m. OK GNU C++17 TESTS 48 15 0 1300
55410805 TooMathy B June 10, 2019, 7:40 p.m. OK GNU C++17 TESTS 48 15 0 1300
41223787 marcorubini301 B Aug. 4, 2018, 6 p.m. OK GNU C++17 TESTS 48 15 0 1300
66675558 zeegomo Carlovan GiackAloZ B Dec. 12, 2019, 11:09 a.m. OK GNU C++17 TESTS 48 15 0 1300
49917485 S_S2 B Feb. 14, 2019, 5:09 p.m. OK GNU C++17 TESTS 48 15 0 1300
54231086 vjudge3 B May 16, 2019, 8:45 a.m. OK GNU C++17 TESTS 48 15 0 1300
57176589 klsadjlkd B July 17, 2019, 5:47 a.m. OK GNU C++17 TESTS 48 15 102400 1300
51366025 el.duivel B March 16, 2019, 9:41 a.m. OK GNU C++17 TESTS 48 15 204800 1300
53490995 johncCc B April 29, 2019, 8:39 a.m. OK GNU C++17 TESTS 48 15 204800 1300
49525980 vjudge4 B Feb. 6, 2019, 11:22 a.m. OK GNU C++17 TESTS 48 15 307200 1300
56659223 porktw B July 7, 2019, 9:23 a.m. OK Go TESTS 48 31 0 1300
41627834 synapse B Aug. 15, 2018, 3:42 p.m. OK Go TESTS 48 31 204800 1300
41526111 tusupov B Aug. 12, 2018, 12:01 p.m. OK Go TESTS 48 31 307200 1300
41149786 Catifish B Aug. 3, 2018, 8:17 a.m. OK Go TESTS 48 31 15257600 1300
44394279 kusarius B Oct. 16, 2018, 9:58 a.m. OK Haskell TESTS 48 31 8396800 1300
67255051 abdallahsameh B Dec. 19, 2019, 9:23 p.m. OK Java 11 TESTS 48 233 0 1300
53965418 Ikari_stream B May 10, 2019, 4:39 p.m. OK Java 8 TESTS 48 109 0 1300
66202558 Agnimandur B Dec. 2, 2019, 10:27 p.m. OK Java 8 TESTS 48 109 0 1300
58223679 AhmedZ B Aug. 3, 2019, 1:35 p.m. OK Java 8 TESTS 48 109 0 1300
58223339 YahiaSherif B Aug. 3, 2019, 1:27 p.m. OK Java 8 TESTS 48 109 0 1300
55947618 the41 B June 22, 2019, 9:08 p.m. OK Java 8 TESTS 48 109 0 1300
55588270 ragpatel8742 B June 15, 2019, 10:52 a.m. OK Java 8 TESTS 48 109 0 1300
55531868 TheSawan B June 13, 2019, 2 p.m. OK Java 8 TESTS 48 109 0 1300
55531826 O_E B June 13, 2019, 1:58 p.m. OK Java 8 TESTS 48 109 0 1300
54427532 zohamid B May 20, 2019, 7:30 p.m. OK Java 8 TESTS 48 109 0 1300
52931291 continued258 B April 18, 2019, 2:27 a.m. OK Java 8 TESTS 48 109 0 1300
59876833 david_varela B Sept. 2, 2019, 12:37 a.m. OK Kotlin TESTS 48 140 102400 1300
41100632 vjudge2 B Aug. 2, 2018, 12:42 a.m. OK Kotlin TESTS 48 171 0 1300
41903521 Lishy2010 B Aug. 20, 2018, 1:24 p.m. OK Kotlin TESTS 48 186 307200 1300
44731911 45den450 Kokovina_Nastya v_p B Oct. 23, 2018, 11:01 a.m. OK Mono C# TESTS 48 46 0 1300
41633209 Mosyagin B Aug. 15, 2018, 8:04 p.m. OK Mono C# TESTS 48 46 0 1300
41159709 DemasteR B Aug. 3, 2018, 2:25 p.m. OK Mono C# TESTS 48 46 0 1300
41582760 n.a.borisov B Aug. 14, 2018, 9 a.m. OK Mono C# TESTS 48 46 409600 1300
42119466 TrinidadTobago B Aug. 26, 2018, 11:42 a.m. OK Mono C# TESTS 48 61 0 1300
41215171 keep.deep B Aug. 4, 2018, 12:37 p.m. OK Mono C# TESTS 48 62 3584000 1300
44733630 NEvOl B Oct. 23, 2018, 11:51 a.m. OK Mono C# TESTS 48 62 3584000 1300
54903871 og.kostya B June 1, 2019, 7:56 a.m. OK Mono C# TESTS 48 62 3686400 1300
41564530 chkhetiani B Aug. 13, 2018, 4:36 p.m. OK Mono C# TESTS 48 62 3686400 1300
45449469 nemars B Nov. 8, 2018, 3:10 p.m. OK Mono C# TESTS 48 77 3584000 1300
41601210 alaa98.ash B Aug. 14, 2018, 8:20 p.m. OK MS C++ TESTS 48 30 0 1300
50245085 vjudge4 B Feb. 20, 2019, 2:32 p.m. OK MS C++ TESTS 48 30 102400 1300
41115185 vjudge1 B Aug. 2, 2018, 8:39 a.m. OK MS C++ TESTS 48 30 307200 1300
55085752 vjudge1 B June 4, 2019, 12:31 p.m. OK MS C++ TESTS 48 31 0 1300
55082315 vjudge4 B June 4, 2019, 11:13 a.m. OK MS C++ TESTS 48 31 0 1300
51822651 vjudge4 B March 25, 2019, 12:45 p.m. OK MS C++ TESTS 48 31 0 1300
51818815 vjudge4 B March 25, 2019, 10:57 a.m. OK MS C++ TESTS 48 31 0 1300
64795445 vjudge4 B Nov. 13, 2019, 12:43 p.m. OK MS C++ TESTS 48 31 0 1300
64791296 vjudge5 B Nov. 13, 2019, 11:18 a.m. OK MS C++ TESTS 48 31 0 1300
55088730 vjudge2 B June 4, 2019, 1:36 p.m. OK MS C++ TESTS 48 31 0 1300
58334897 Yanhui Cuc-center HelloWorld1024 B Aug. 5, 2019, 11:05 a.m. OK MS C++ 2017 TESTS 48 31 0 1300
69890511 vjudge5 B Jan. 31, 2020, 9:50 a.m. OK MS C++ 2017 TESTS 48 31 0 1300
68724054 shio B Jan. 13, 2020, 5:18 p.m. OK MS C++ 2017 TESTS 48 31 0 1300
67021694 vjudge3 B Dec. 16, 2019, 1:09 p.m. OK MS C++ 2017 TESTS 48 31 0 1300
63117758 tanimania B Oct. 22, 2019, 10:02 a.m. OK MS C++ 2017 TESTS 48 31 0 1300
63062930 Mad112233 B Oct. 21, 2019, 9:29 a.m. OK MS C++ 2017 TESTS 48 31 0 1300
61405776 NAD777 B Sept. 28, 2019, 6:59 a.m. OK MS C++ 2017 TESTS 48 31 0 1300
58838968 vjudge4 B Aug. 15, 2019, 12:17 a.m. OK MS C++ 2017 TESTS 48 31 0 1300
57852059 Still_Theory B July 27, 2019, 1:31 p.m. OK MS C++ 2017 TESTS 48 31 0 1300
54978050 Skeef79 B June 2, 2019, 11:45 a.m. OK MS C++ 2017 TESTS 48 31 0 1300
49527960 vjudge2 B Feb. 6, 2019, 12:26 p.m. OK Node.js TESTS 48 186 1433600 1300
46369392 gruntov_dima B Nov. 29, 2018, 2:52 p.m. OK PascalABC.NET TESTS 48 61 819200 1300
45283555 GrimGutz B Nov. 4, 2018, 3:09 p.m. OK PascalABC.NET TESTS 48 62 819200 1300
45795271 KGYYT B Nov. 16, 2018, 10:11 a.m. OK PascalABC.NET TESTS 48 77 819200 1300
42127886 mayakin B Aug. 26, 2018, 4:27 p.m. OK PHP TESTS 48 46 0 1300
54820765 Mukundan314 B May 30, 2019, 2:24 a.m. OK PyPy 2 TESTS 48 124 307200 1300
41269839 kd710306 B Aug. 6, 2018, 9:26 a.m. OK PyPy 2 TESTS 48 139 307200 1300
41269698 kd710306 B Aug. 6, 2018, 9:20 a.m. OK PyPy 2 TESTS 48 140 307200 1300
41121711 arikpamnani B Aug. 2, 2018, 12:18 p.m. OK PyPy 2 TESTS 48 155 307200 1300
42451242 morejarphone B Sept. 4, 2018, 8:15 a.m. OK PyPy 2 TESTS 48 155 409600 1300
45433499 c1729 leo7279 B Nov. 8, 2018, 6:18 a.m. OK PyPy 2 TESTS 48 170 1945600 1300
55287802 shafwanur010 B June 8, 2019, 6:03 a.m. OK PyPy 2 TESTS 48 218 1945600 1300
41106653 a03090 B Aug. 2, 2018, 4:34 a.m. OK PyPy 2 TESTS 48 234 204800 1300
44678869 omarnvidia B Oct. 22, 2018, 4:29 a.m. OK PyPy 3 TESTS 48 124 102400 1300
41167353 arknave B Aug. 3, 2018, 3:10 p.m. OK PyPy 3 TESTS 48 139 102400 1300
41222205 MajAK B Aug. 4, 2018, 4:37 p.m. OK PyPy 3 TESTS 48 140 102400 1300
53482921 yfo B April 28, 2019, 10:28 p.m. OK PyPy 3 TESTS 48 140 921600 1300
41221526 mohammedawni B Aug. 4, 2018, 4:06 p.m. OK PyPy 3 TESTS 48 140 921600 1300
69926711 adityajn105 B Jan. 31, 2020, 8:47 p.m. OK PyPy 3 TESTS 48 140 1433600 1300
60242855 kchau B Sept. 7, 2019, 10:58 p.m. OK PyPy 3 TESTS 48 140 1433600 1300
62684799 PhilTheFish B Oct. 16, 2019, 1:47 p.m. OK PyPy 3 TESTS 48 140 1945600 1300
62052100 deadguy B Oct. 7, 2019, 9:46 a.m. OK PyPy 3 TESTS 48 140 2048000 1300
56555143 koptev B July 5, 2019, 11:58 a.m. OK PyPy 3 TESTS 48 140 2048000 1300
41298263 Andromedayu B Aug. 7, 2018, 8:28 a.m. OK Python 2 TESTS 48 156 0 1300
41134656 nealzane B Aug. 2, 2018, 7:47 p.m. OK Python 2 TESTS 48 156 0 1300
46282767 RaquelFolz B Nov. 27, 2018, 2:16 p.m. OK Python 2 TESTS 48 171 0 1300
41137352 homie B Aug. 2, 2018, 10:26 p.m. OK Python 2 TESTS 48 171 0 1300
41114671 franckmy B Aug. 2, 2018, 8:26 a.m. OK Python 2 TESTS 48 171 0 1300
41102775 wangkan2001 B Aug. 2, 2018, 2:04 a.m. OK Python 2 TESTS 48 171 0 1300
41101716 sallyyao2001 B Aug. 2, 2018, 1:26 a.m. OK Python 2 TESTS 48 171 0 1300
41122880 tnowakow B Aug. 2, 2018, 12:49 p.m. OK Python 2 TESTS 48 171 102400 1300
41154268 SoSooding B Aug. 3, 2018, 11:02 a.m. OK Python 2 TESTS 48 186 0 1300
45889829 R_H_Razu B Nov. 17, 2018, 6:04 p.m. OK Python 2 TESTS 48 187 0 1300
49574465 vjudge4 B Feb. 7, 2019, 2:02 p.m. OK Python 3 TESTS 48 108 102400 1300
54422882 pauloleitao B May 20, 2019, 4:31 p.m. OK Python 3 TESTS 48 109 0 1300
49319353 _itachi_uchiha B Feb. 1, 2019, 11:37 a.m. OK Python 3 TESTS 48 109 0 1300
44732671 neo.ezop B Oct. 23, 2018, 11:24 a.m. OK Python 3 TESTS 48 109 0 1300
41759768 rareone0602 B Aug. 18, 2018, 1:58 p.m. OK Python 3 TESTS 48 109 0 1300
41595093 mtarunsai1999 B Aug. 14, 2018, 4:22 p.m. OK Python 3 TESTS 48 109 0 1300
41156900 zakharchenko B Aug. 3, 2018, 12:49 p.m. OK Python 3 TESTS 48 109 0 1300
61257924 vincentviktor B Sept. 25, 2019, 10:45 a.m. OK Python 3 TESTS 48 109 102400 1300
48329896 HazemEssawi B Jan. 13, 2019, 1:51 p.m. OK Python 3 TESTS 48 109 102400 1300
46517566 NikitaSemenov B Dec. 2, 2018, 5:29 p.m. OK Python 3 TESTS 48 109 102400 1300
41314624 clupasq B Aug. 7, 2018, 6:37 p.m. OK Ruby TESTS 48 77 102400 1300
41147761 betrue12 B Aug. 3, 2018, 7:22 a.m. OK Ruby TESTS 48 93 204800 1300
61351213 sansen B Sept. 27, 2019, 8:16 a.m. OK Rust TESTS 48 31 0 1300
42686484 AAcapOK B Sept. 8, 2018, 7:49 p.m. OK Rust TESTS 48 31 0 1300
41824080 yakamoto B Aug. 19, 2018, 11:07 a.m. OK Scala TESTS 48 529 0 1300

remove filters

Back to search problems