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 |
---|---|---|---|---|---|---|
903 | Educational Codeforces Round 34 (Rated for Div. 2) | FINISHED | False | 7200 | 218732099 | Dec. 12, 2017, 3:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1480 ) | E | Swapping Characters | PROGRAMMING | brute force hashing implementation strings | 2200 |
B"We had a string s consisting of n lowercase Latin letters. We made k copies of this string, thus obtaining k identical strings s1, xe2 x80 x89s2, xe2 x80 x89..., xe2 x80 x89sk. After that, in each of these strings we swapped exactly two characters (the characters we swapped could be identical, but they had different indices in the string). You are given k strings s1, xe2 x80 x89s2, xe2 x80 x89..., xe2 x80 x89sk, and you have to restore any string s so that it is possible to obtain these strings by performing aforementioned operations. Note that the total length of the strings you are given doesn't exceed 5000 (that is, k xc2 xb7n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x895000). The first line contains two integers k and n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x892500, xe2 x80 x892 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x895000, xe2 x80 x89k xc2 xb7 n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x895000) -- the number of strings we obtained, and the length of each of these strings. Next k lines contain the strings s1, xe2 x80 x89s2, xe2 x80 x89..., xe2 x80 x89sk, each consisting of exactly n lowercase Latin letters. Print any suitable string s, or -1 if such string doesn't exist. In the first example s1 is obtained by swapping the second and the fourth character in acab, s2 is obtained by swapping the first and the second character, and to get s3, we swap the third and the fourth character. In the second example s1 is obtained by swapping the third and the fourth character in kbub, s2 -- by swapping the second and the fourth, and s3 -- by swapping the first and the third. In the third example it's impossible to obtain given strings by aforementioned operations. "... |
Educational Codeforces Round 34 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
33279252 | nanae1914 | E | Dec. 16, 2017, 1:14 a.m. | OK | D | TESTS | 80 | 30 | 7168000 | 2200 | |
33199411 | ImForbiddenToSayILoveYou | E | Dec. 13, 2017, 1:18 a.m. | OK | FPC | TESTS | 80 | 46 | 2150400 | 2200 | |
34272169 | Scut82 | E | Jan. 18, 2018, 9:36 a.m. | OK | GNU C++ | TESTS | 80 | 15 | 2150400 | 2200 | |
33896307 | xiaobaiya | E | Jan. 4, 2018, 5:05 a.m. | OK | GNU C++ | TESTS | 80 | 15 | 2150400 | 2200 | |
34102630 | Robbinb1993 | E | Jan. 12, 2018, 9:22 a.m. | OK | GNU C++ | TESTS | 80 | 15 | 2560000 | 2200 | |
33234661 | ftuknights | E | Dec. 14, 2017, 9:09 a.m. | OK | GNU C++ | TESTS | 80 | 15 | 4300800 | 2200 | |
33237666 | Lightning34 | E | Dec. 14, 2017, 11:21 a.m. | OK | GNU C++ | TESTS | 80 | 15 | 14643200 | 2200 | |
34629910 | Scut82 | E | Jan. 28, 2018, 10:14 a.m. | OK | GNU C++ | TESTS | 80 | 30 | 2048000 | 2200 | |
34271456 | Scut82 | E | Jan. 18, 2018, 8:59 a.m. | OK | GNU C++ | TESTS | 80 | 30 | 2252800 | 2200 | |
33356506 | ftuknights | E | Dec. 17, 2017, 2:53 p.m. | OK | GNU C++ | TESTS | 80 | 30 | 2252800 | 2200 | |
33233321 | ftuknights | E | Dec. 14, 2017, 8:06 a.m. | OK | GNU C++ | TESTS | 80 | 30 | 2764800 | 2200 | |
35748651 | Q612 | E | Feb. 27, 2018, 1:09 a.m. | OK | GNU C++ | TESTS | 80 | 30 | 4710400 | 2200 | |
52622395 | rainboy | E | April 11, 2019, 11:08 p.m. | OK | GNU C11 | TESTS | 80 | 31 | 12492800 | 2200 | |
65575869 | Potassium_ | E | Nov. 23, 2019, 9:21 a.m. | OK | GNU C11 | TESTS | 80 | 46 | 25702400 | 2200 | |
33647661 | shdut | E | Dec. 26, 2017, 1:17 p.m. | OK | GNU C++11 | TESTS | 80 | 15 | 2150400 | 2200 | |
33270020 | georgerapeanu | E | Dec. 15, 2017, 3:49 p.m. | OK | GNU C++11 | TESTS | 80 | 15 | 2150400 | 2200 | |
33243550 | Leemur | E | Dec. 14, 2017, 3:05 p.m. | OK | GNU C++11 | TESTS | 80 | 15 | 2150400 | 2200 | |
33237370 | 0c.c0 | E | Dec. 14, 2017, 11:11 a.m. | OK | GNU C++11 | TESTS | 80 | 15 | 2150400 | 2200 | |
33845914 | nshul | E | Jan. 1, 2018, 11:29 a.m. | OK | GNU C++11 | TESTS | 80 | 15 | 2150400 | 2200 | |
34191418 | mdpfeifer | E | Jan. 15, 2018, 8:03 a.m. | OK | GNU C++11 | TESTS | 80 | 15 | 2150400 | 2200 | |
33228289 | J_X | E | Dec. 14, 2017, 2:24 a.m. | OK | GNU C++11 | TESTS | 80 | 15 | 2252800 | 2200 | |
33208935 | arshad2117 | E | Dec. 13, 2017, 9:54 a.m. | OK | GNU C++11 | TESTS | 80 | 15 | 2252800 | 2200 | |
33622115 | EsTer | E | Dec. 25, 2017, 3:40 p.m. | OK | GNU C++11 | TESTS | 80 | 15 | 2252800 | 2200 | |
33247304 | Artemx | E | Dec. 14, 2017, 5:41 p.m. | OK | GNU C++11 | TESTS | 80 | 15 | 2252800 | 2200 | |
33279929 | hello_codeforces | E | Dec. 16, 2017, 3:10 a.m. | OK | GNU C++14 | TESTS | 80 | 15 | 2048000 | 2200 | |
33211659 | Meternal | E | Dec. 13, 2017, 11:45 a.m. | OK | GNU C++14 | TESTS | 80 | 15 | 2048000 | 2200 | |
33208276 | shehebe | E | Dec. 13, 2017, 9:22 a.m. | OK | GNU C++14 | TESTS | 80 | 15 | 2048000 | 2200 | |
34111660 | 0ogway | E | Jan. 12, 2018, 5:23 p.m. | OK | GNU C++14 | TESTS | 80 | 15 | 2048000 | 2200 | |
33352960 | Ragha1 | E | Dec. 17, 2017, 12:14 p.m. | OK | GNU C++14 | TESTS | 80 | 15 | 2048000 | 2200 | |
34119172 | randomlyChosen | E | Jan. 13, 2018, 5:22 a.m. | OK | GNU C++14 | TESTS | 80 | 15 | 2150400 | 2200 | |
33971825 | Hadi_A | E | Jan. 6, 2018, 8:03 p.m. | OK | GNU C++14 | TESTS | 80 | 15 | 2150400 | 2200 | |
33624706 | saisurya027 | E | Dec. 25, 2017, 4:51 p.m. | OK | GNU C++14 | TESTS | 80 | 15 | 2150400 | 2200 | |
33622240 | RKJ | E | Dec. 25, 2017, 3:46 p.m. | OK | GNU C++14 | TESTS | 80 | 15 | 2150400 | 2200 | |
33384357 | Sihc | E | Dec. 18, 2017, 3:39 p.m. | OK | GNU C++14 | TESTS | 80 | 15 | 2150400 | 2200 | |
39052588 | AngryAdhami | E | June 8, 2018, 6:16 p.m. | OK | GNU C++17 | TESTS | 80 | 30 | 307200 | 2200 | |
69563838 | pranav_012 | E | Jan. 26, 2020, 11:39 a.m. | OK | GNU C++17 | TESTS | 80 | 31 | 102400 | 2200 | |
62870292 | _PortgasD.Ace_ | E | Oct. 18, 2019, 1:34 p.m. | OK | GNU C++17 | TESTS | 80 | 31 | 204800 | 2200 | |
61565051 | kostia244 | E | Sept. 30, 2019, 4:49 p.m. | OK | GNU C++17 | TESTS | 80 | 31 | 204800 | 2200 | |
58545118 | tranquanghuy | E | Aug. 10, 2019, 4:11 p.m. | OK | GNU C++17 | TESTS | 80 | 31 | 204800 | 2200 | |
45417030 | lxdlam | E | Nov. 7, 2018, 2:51 p.m. | OK | GNU C++17 | TESTS | 80 | 31 | 204800 | 2200 | |
39819074 | JoJo | E | July 1, 2018, 10:54 a.m. | OK | GNU C++17 | TESTS | 80 | 31 | 204800 | 2200 | |
66675770 | kgcurry59 | E | Dec. 12, 2019, 11:14 a.m. | OK | GNU C++17 | TESTS | 80 | 31 | 204800 | 2200 | |
62870448 | HelloCodeforce | E | Oct. 18, 2019, 1:36 p.m. | OK | GNU C++17 | TESTS | 80 | 31 | 204800 | 2200 | |
65810993 | morio__ | E | Nov. 27, 2019, 8:59 a.m. | OK | GNU C++17 | TESTS | 80 | 31 | 307200 | 2200 | |
52622394 | Dukkha | E | April 11, 2019, 11:08 p.m. | OK | Java 8 | TESTS | 80 | 124 | 0 | 2200 | |
47535812 | 7dan | E | Dec. 27, 2018, 1:22 a.m. | OK | Java 8 | TESTS | 80 | 124 | 0 | 2200 | |
39014620 | habanera | E | June 7, 2018, 9:32 a.m. | OK | Java 8 | TESTS | 80 | 140 | 0 | 2200 | |
33234204 | I_love_Malika | E | Dec. 14, 2017, 8:45 a.m. | OK | Java 8 | TESTS | 80 | 140 | 20684800 | 2200 | |
62113525 | Whiplash99 | E | Oct. 8, 2019, 12:48 p.m. | OK | Java 8 | TESTS | 80 | 171 | 0 | 2200 | |
33223282 | asutoshrana | E | Dec. 13, 2017, 6:52 p.m. | OK | Java 8 | TESTS | 80 | 171 | 20684800 | 2200 | |
33282688 | Kavi.Prajapati | E | Dec. 16, 2017, 7:11 a.m. | OK | Java 8 | TESTS | 80 | 171 | 21094400 | 2200 | |
33620003 | about | E | Dec. 25, 2017, 2:58 p.m. | OK | Java 8 | TESTS | 80 | 171 | 21708800 | 2200 | |
33592724 | muy_atractivo | E | Dec. 24, 2017, 12:17 p.m. | OK | Java 8 | TESTS | 80 | 171 | 23552000 | 2200 | |
49665126 | MuhammedAbdalla | E | Feb. 9, 2019, 2:05 p.m. | OK | Java 8 | TESTS | 80 | 187 | 39014400 | 2200 | |
46699406 | Coder_D | E | Dec. 6, 2018, 11:47 p.m. | OK | Mono C# | TESTS | 80 | 156 | 3993600 | 2200 | |
34625123 | guoshiyuan484 | E | Jan. 28, 2018, 6:24 a.m. | OK | MS C++ | TESTS | 80 | 31 | 14643200 | 2200 | |
38480733 | MenOfPassion | E | May 21, 2018, 10:51 a.m. | OK | MS C++ | TESTS | 80 | 62 | 409600 | 2200 | |
33385934 | mshcherba | E | Dec. 18, 2017, 4:36 p.m. | OK | MS C++ | TESTS | 80 | 139 | 2764800 | 2200 | |
33203382 | Takagero | E | Dec. 13, 2017, 6 a.m. | OK | MS C++ | TESTS | 80 | 202 | 2252800 | 2200 | |
33478767 | s_p | E | Dec. 21, 2017, noon | OK | Perl | TESTS | 80 | 46 | 2764800 | 2200 | |
33453410 | s_p | E | Dec. 20, 2017, 11:14 a.m. | OK | Perl | TESTS | 80 | 139 | 10956800 | 2200 | |
33236041 | latsyrc1123 | E | Dec. 14, 2017, 10:18 a.m. | OK | PyPy 2 | TESTS | 80 | 93 | 22220800 | 2200 | |
60336545 | MVP | E | Sept. 10, 2019, 8:50 a.m. | OK | PyPy 2 | TESTS | 80 | 171 | 1843200 | 2200 | |
33512570 | JiK | E | Dec. 22, 2017, 3:13 p.m. | OK | PyPy 2 | TESTS | 80 | 217 | 36249600 | 2200 | |
33792051 | thisishaoyu | E | Dec. 29, 2017, 7:03 p.m. | OK | PyPy 3 | TESTS | 80 | 295 | 26316800 | 2200 | |
33612865 | freedom_dr | E | Dec. 25, 2017, 9:25 a.m. | OK | PyPy 3 | TESTS | 80 | 624 | 26828800 | 2200 | |
33228807 | dthung1602 | E | Dec. 14, 2017, 3:25 a.m. | OK | Python 2 | TESTS | 80 | 93 | 4915200 | 2200 | |
38543250 | Ali_Pi | E | May 22, 2018, 5:46 p.m. | OK | Python 2 | TESTS | 80 | 124 | 307200 | 2200 | |
33207887 | atryapa | E | Dec. 13, 2017, 9:08 a.m. | OK | Python 3 | TESTS | 80 | 78 | 5939200 | 2200 | |
33207808 | atryapa | E | Dec. 13, 2017, 9:04 a.m. | OK | Python 3 | TESTS | 80 | 78 | 5939200 | 2200 | |
33222933 | atryapa | E | Dec. 13, 2017, 6:35 p.m. | OK | Python 3 | TESTS | 80 | 78 | 6041600 | 2200 |
Back to search problems