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 |
---|---|---|---|---|---|---|
1095 | Codeforces Round 529 (Div. 3) | FINISHED | False | 7200 | 185901899 | Dec. 27, 2018, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 7585 ) | D | Circular Dance | PROGRAMMING | implementation | 1600 |
B"There are n kids, numbered from 1 to n , dancing in a circle around the Christmas tree. Let's enumerate them in a clockwise direction as p_1 , p_2 , ..., p_n (all these numbers are from 1 to n and are distinct, so p is a permutation). Let the next kid for a kid p_i be kid p_{i + 1} if i < n and p_1 otherwise. After the dance, each kid remembered two kids: the next kid (let's call him x ) and the next kid for x . Each kid told you which kids he/she remembered: the kid i remembered kids a_{i, 1} and a_{i, 2} . However, the order of a_{i, 1} and a_{i, 2} can differ from their order in the circle. You have to restore the order of the kids in the circle using this information. If there are several answers, you may print any. It is guaranteed that at least one solution exists. If you are Python programmer, consider using PyPy instead of Python when you submit your code. The first line of the input contains one integer n ( 3 <= n <= 2 cdot 10^5 ) -- the number of the kids. The next n lines contain 2 integers each. The i -th line contains two integers a_{i, 1} and a_{i, 2} ( 1 <= a_{i, 1}, a_{i, 2} <= n, a_{i, 1} ne a_{i, 2} ) -- the kids the i -th kid remembered, given in arbitrary order. Print n integers p_1 , p_2 , ..., p_n -- permutation of integers from 1 to n , which corresponds to the order of kids in the circle. If there are several answers, you may print any (for example, it doesn't matter which kid is the first in the circle). It is guaranteed that at least one solution exists. "... |
Codeforces Round #529 (Div. 3) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
47873701 | _LJ | D | Jan. 3, 2019, 2:11 p.m. | OK | Clang++17 Diagnostics | TESTS | 22 | 280 | 19046400 | 1600 | |
54816431 | Denor | D | May 29, 2019, 8:18 p.m. | OK | Delphi | TESTS | 22 | 140 | 2457600 | 1600 | |
58367241 | naranja011223 | D | Aug. 6, 2019, 4:50 a.m. | OK | FPC | TESTS | 22 | 654 | 16076800 | 1600 | |
51750453 | chaorenhaha | D | March 23, 2019, 9:20 a.m. | OK | FPC | TESTS | 22 | 655 | 4608000 | 1600 | |
47612713 | khoa101003 | D | Dec. 28, 2018, 8:57 a.m. | OK | FPC | TESTS | 22 | 685 | 3379200 | 1600 | |
47782727 | Horcrux1729 | D | Dec. 31, 2018, 9:02 a.m. | OK | GNU C11 | TESTS | 22 | 702 | 2355200 | 1600 | |
47887078 | wenbo1188 | D | Jan. 4, 2019, 1:08 a.m. | OK | GNU C11 | TESTS | 22 | 702 | 3174400 | 1600 | |
47960258 | cyand1317 | D | Jan. 5, 2019, 8:55 a.m. | OK | GNU C11 | TESTS | 22 | 717 | 1638400 | 1600 | |
48602610 | dipeshshivrame | D | Jan. 20, 2019, 9:04 a.m. | OK | GNU C11 | TESTS | 22 | 717 | 2457600 | 1600 | |
48198675 | knia | D | Jan. 11, 2019, 2:50 a.m. | OK | GNU C11 | TESTS | 22 | 717 | 2457600 | 1600 | |
60207142 | ishanmodi13 | D | Sept. 7, 2019, 8:39 a.m. | OK | GNU C11 | TESTS | 22 | 717 | 3993600 | 1600 | |
51612082 | ArKCa | D | March 21, 2019, 10:54 a.m. | OK | GNU C11 | TESTS | 22 | 733 | 1638400 | 1600 | |
48092528 | alsoba | D | Jan. 8, 2019, 2:38 p.m. | OK | GNU C11 | TESTS | 22 | 733 | 1638400 | 1600 | |
47672217 | RahmatyParsa | D | Dec. 29, 2018, 6:50 a.m. | OK | GNU C11 | TESTS | 22 | 733 | 1638400 | 1600 | |
54570969 | rainboy | D | May 24, 2019, 7:15 p.m. | OK | GNU C11 | TESTS | 22 | 733 | 3993600 | 1600 | |
53210143 | Umi | D | April 24, 2019, 4:28 a.m. | OK | GNU C++11 | TESTS | 22 | 46 | 2457600 | 1600 | |
47659852 | rushilpaul | D | Dec. 28, 2018, 6:24 p.m. | OK | GNU C++11 | TESTS | 22 | 62 | 3174400 | 1600 | |
55214172 | nwpu2018302329 | D | June 6, 2019, 3:56 p.m. | OK | GNU C++11 | TESTS | 22 | 77 | 7168000 | 1600 | |
47613920 | lzqwq | D | Dec. 28, 2018, 9:30 a.m. | OK | GNU C++11 | TESTS | 22 | 78 | 3174400 | 1600 | |
47968793 | asd233 | D | Jan. 5, 2019, 1:29 p.m. | OK | GNU C++11 | TESTS | 22 | 78 | 3174400 | 1600 | |
47620317 | zhou2003 | D | Dec. 28, 2018, 12:30 p.m. | OK | GNU C++11 | TESTS | 22 | 78 | 3276800 | 1600 | |
47841139 | Karry5307 | D | Jan. 2, 2019, 12:01 p.m. | OK | GNU C++11 | TESTS | 22 | 78 | 4812800 | 1600 | |
64501242 | Kylin_ | D | Nov. 8, 2019, 4:20 a.m. | OK | GNU C++11 | TESTS | 22 | 78 | 25907200 | 1600 | |
48071921 | coffees | D | Jan. 8, 2019, 12:58 a.m. | OK | GNU C++11 | TESTS | 22 | 93 | 2457600 | 1600 | |
55307086 | luogu_bot5 | D | June 8, 2019, 3:10 p.m. | OK | GNU C++11 | TESTS | 22 | 93 | 3174400 | 1600 | |
48776816 | tokitsukaze | D | Jan. 23, 2019, 4:40 a.m. | OK | GNU C++14 | TESTS | 22 | 109 | 14643200 | 1600 | |
49958439 | vinayvyas27 | D | Feb. 15, 2019, 5:04 p.m. | OK | GNU C++14 | TESTS | 22 | 124 | 819200 | 1600 | |
50487137 | vjudge2 | D | Feb. 25, 2019, 12:02 p.m. | OK | GNU C++14 | TESTS | 22 | 124 | 819200 | 1600 | |
47891025 | moyin | D | Jan. 4, 2019, 6:32 a.m. | OK | GNU C++14 | TESTS | 22 | 124 | 1638400 | 1600 | |
49874659 | vjudge3 | D | Feb. 13, 2019, 3:18 p.m. | OK | GNU C++14 | TESTS | 22 | 124 | 1638400 | 1600 | |
47779247 | arasHi_ | D | Dec. 31, 2018, 6:54 a.m. | OK | GNU C++14 | TESTS | 22 | 124 | 1638400 | 1600 | |
49876306 | vjudge2 | D | Feb. 13, 2019, 4:02 p.m. | OK | GNU C++14 | TESTS | 22 | 124 | 1638400 | 1600 | |
48596059 | NaVi.s1mple | D | Jan. 20, 2019, 6:15 a.m. | OK | GNU C++14 | TESTS | 22 | 124 | 1843200 | 1600 | |
47680398 | OO0OO0OO0OO0 | D | Dec. 29, 2018, 11:47 a.m. | OK | GNU C++14 | TESTS | 22 | 124 | 1843200 | 1600 | |
47706357 | ljupche98 | D | Dec. 29, 2018, 8:43 p.m. | OK | GNU C++14 | TESTS | 22 | 124 | 1843200 | 1600 | |
48086571 | I__D__ | D | Jan. 8, 2019, 11:37 a.m. | OK | GNU C++17 | TESTS | 22 | 46 | 8294400 | 1600 | |
48654438 | ReaLNero1 | D | Jan. 21, 2019, 1:33 a.m. | OK | GNU C++17 | TESTS | 22 | 46 | 8294400 | 1600 | |
48086267 | I__D__ | D | Jan. 8, 2019, 11:30 a.m. | OK | GNU C++17 | TESTS | 22 | 46 | 8294400 | 1600 | |
57969230 | w20181112 | D | July 30, 2019, 4:56 a.m. | OK | GNU C++17 | TESTS | 22 | 124 | 1638400 | 1600 | |
65448767 | kiimak | D | Nov. 20, 2019, 5:06 p.m. | OK | GNU C++17 | TESTS | 22 | 124 | 1638400 | 1600 | |
68003164 | Rahul_cpp | D | Dec. 31, 2019, 11:53 a.m. | OK | GNU C++17 | TESTS | 22 | 124 | 1638400 | 1600 | |
48258845 | Lannister96 | D | Jan. 11, 2019, 5:05 p.m. | OK | GNU C++17 | TESTS | 22 | 124 | 1843200 | 1600 | |
58112317 | Maybach | D | Aug. 1, 2019, 7:40 a.m. | OK | GNU C++17 | TESTS | 22 | 124 | 1843200 | 1600 | |
48079000 | I__D__ | D | Jan. 8, 2019, 6:20 a.m. | OK | GNU C++17 | TESTS | 22 | 124 | 1843200 | 1600 | |
49617800 | fffeyn | D | Feb. 8, 2019, 7:19 a.m. | OK | GNU C++17 | TESTS | 22 | 124 | 1843200 | 1600 | |
47671064 | davidguandev | D | Dec. 29, 2018, 6 a.m. | OK | Go | TESTS | 22 | 717 | 5324800 | 1600 | |
47670308 | davidguandev | D | Dec. 29, 2018, 5:19 a.m. | OK | Go | TESTS | 22 | 764 | 9728000 | 1600 | |
60304741 | WangJialei | D | Sept. 9, 2019, 1:27 p.m. | OK | Go | TESTS | 22 | 920 | 9216000 | 1600 | |
60214612 | vjudge4 | D | Sept. 7, 2019, 11:23 a.m. | OK | Go | TESTS | 22 | 936 | 9216000 | 1600 | |
68134337 | rohan101 | D | Jan. 3, 2020, 6:12 p.m. | OK | Java 11 | TESTS | 22 | 452 | 19763200 | 1600 | |
47702177 | --- | D | Dec. 29, 2018, 5:27 p.m. | OK | Java 8 | TESTS | 22 | 186 | 0 | 1600 | |
47852913 | tsumit023 | D | Jan. 2, 2019, 7:03 p.m. | OK | Java 8 | TESTS | 22 | 187 | 0 | 1600 | |
48108874 | megaspazz | D | Jan. 9, 2019, 7:50 a.m. | OK | Java 8 | TESTS | 22 | 202 | 0 | 1600 | |
55583798 | prem_cse | D | June 15, 2019, 8:19 a.m. | OK | Java 8 | TESTS | 22 | 202 | 0 | 1600 | |
47614786 | prakhar897 | D | Dec. 28, 2018, 9:55 a.m. | OK | Java 8 | TESTS | 22 | 202 | 0 | 1600 | |
48471774 | revanthreddy85 | D | Jan. 16, 2019, 9:13 p.m. | OK | Java 8 | TESTS | 22 | 217 | 0 | 1600 | |
47811468 | In_The_Name_Of_Love | D | Jan. 1, 2019, 11:37 a.m. | OK | Java 8 | TESTS | 22 | 217 | 0 | 1600 | |
55421144 | horseprabhat625 | D | June 11, 2019, 6:34 a.m. | OK | Java 8 | TESTS | 22 | 217 | 102400 | 1600 | |
69942328 | luchy0120 | D | Feb. 1, 2020, 6:32 a.m. | OK | Java 8 | TESTS | 22 | 218 | 0 | 1600 | |
49941802 | saurabh0611 | D | Feb. 15, 2019, 10:03 a.m. | OK | Java 8 | TESTS | 22 | 218 | 0 | 1600 | |
47845048 | spookywooky | D | Jan. 2, 2019, 2:12 p.m. | OK | Kotlin | TESTS | 22 | 2370 | 152883200 | 1600 | |
56309850 | og.kostya | D | June 30, 2019, 2:12 p.m. | OK | Mono C# | TESTS | 22 | 93 | 5427200 | 1600 | |
52593369 | Mosyagin | D | April 11, 2019, 7:19 a.m. | OK | Mono C# | TESTS | 22 | 218 | 14233600 | 1600 | |
49897054 | treasuryonly | D | Feb. 14, 2019, 7:26 a.m. | OK | Mono C# | TESTS | 22 | 264 | 17510400 | 1600 | |
47713042 | teru | D | Dec. 30, 2018, 5:37 a.m. | OK | Mono C# | TESTS | 22 | 280 | 12492800 | 1600 | |
47687266 | ken_love_rin | D | Dec. 29, 2018, 3:30 p.m. | OK | Mono C# | TESTS | 22 | 794 | 4608000 | 1600 | |
51037763 | NEvOl | D | March 8, 2019, 3:51 p.m. | OK | Mono C# | TESTS | 22 | 889 | 15462400 | 1600 | |
53464513 | vjudge2 | D | April 28, 2019, 9:14 a.m. | OK | MS C++ | TESTS | 22 | 108 | 1638400 | 1600 | |
50097103 | vjudge4 | D | Feb. 18, 2019, 1:13 p.m. | OK | MS C++ | TESTS | 22 | 108 | 1843200 | 1600 | |
66315696 | vjudge2 | D | Dec. 5, 2019, 1 p.m. | OK | MS C++ | TESTS | 22 | 108 | 2457600 | 1600 | |
55003656 | vjudge5 | D | June 3, 2019, 6:16 a.m. | OK | MS C++ | TESTS | 22 | 108 | 2457600 | 1600 | |
54482348 | vjudge2 | D | May 22, 2019, 11:35 a.m. | OK | MS C++ | TESTS | 22 | 108 | 2457600 | 1600 | |
50096446 | vjudge1 | D | Feb. 18, 2019, 12:58 p.m. | OK | MS C++ | TESTS | 22 | 108 | 2457600 | 1600 | |
47719516 | hbase | D | Dec. 30, 2018, 10:18 a.m. | OK | MS C++ | TESTS | 22 | 108 | 4915200 | 1600 | |
47796521 | vjudge2 | D | Dec. 31, 2018, 5:31 p.m. | OK | MS C++ | TESTS | 22 | 108 | 12800000 | 1600 | |
48079087 | I__D__ | D | Jan. 8, 2019, 6:24 a.m. | OK | MS C++ | TESTS | 22 | 109 | 1638400 | 1600 | |
62899933 | vjudge2 | D | Oct. 19, 2019, 3:33 a.m. | OK | MS C++ | TESTS | 22 | 109 | 2457600 | 1600 | |
56157896 | petko_mitkov | D | June 27, 2019, 11:05 a.m. | OK | MS C++ 2017 | TESTS | 22 | 155 | 3379200 | 1600 | |
57993652 | pmitkov | D | July 30, 2019, 2:11 p.m. | OK | MS C++ 2017 | TESTS | 22 | 156 | 3379200 | 1600 | |
63120047 | Ekrte | D | Oct. 22, 2019, 10:53 a.m. | OK | MS C++ 2017 | TESTS | 22 | 171 | 3379200 | 1600 | |
58642577 | ZSTU-2018329621261 | D | Aug. 12, 2019, 4:24 a.m. | OK | MS C++ 2017 | TESTS | 22 | 171 | 6656000 | 1600 | |
64347092 | vjudge2 | D | Nov. 6, 2019, 6:50 a.m. | OK | MS C++ 2017 | TESTS | 22 | 186 | 3174400 | 1600 | |
58077067 | Bettledemire_ | D | July 31, 2019, 12:43 p.m. | OK | MS C++ 2017 | TESTS | 22 | 202 | 13824000 | 1600 | |
51421595 | Still_Theory | D | March 17, 2019, 4:50 p.m. | OK | MS C++ 2017 | TESTS | 22 | 421 | 3174400 | 1600 | |
49557783 | Efrocinya | D | Feb. 7, 2019, 10:45 a.m. | OK | MS C++ 2017 | TESTS | 22 | 421 | 3686400 | 1600 | |
58230174 | yorky | D | Aug. 3, 2019, 4:25 p.m. | OK | MS C++ 2017 | TESTS | 22 | 421 | 8908800 | 1600 | |
57090757 | AtomG | D | July 15, 2019, 10:39 a.m. | OK | MS C++ 2017 | TESTS | 22 | 436 | 3379200 | 1600 | |
48710000 | juhyun16 | D | Jan. 22, 2019, 8 a.m. | OK | Node.js | TESTS | 22 | 546 | 46489600 | 1600 | |
50097211 | vjudge4 | D | Feb. 18, 2019, 1:16 p.m. | OK | Node.js | TESTS | 22 | 1091 | 74854400 | 1600 | |
47654852 | mayakin | D | Dec. 28, 2018, 4:36 p.m. | OK | PHP | TESTS | 22 | 296 | 85708800 | 1600 | |
56258795 | raj1307 | D | June 29, 2019, 7:14 a.m. | OK | PyPy 2 | TESTS | 22 | 342 | 25702400 | 1600 | |
49063639 | c1729 | D | Jan. 27, 2019, 4:38 p.m. | OK | PyPy 2 | TESTS | 22 | 451 | 32153600 | 1600 | |
49823830 | Mukundan314 | D | Feb. 12, 2019, 10:22 a.m. | OK | PyPy 2 | TESTS | 22 | 545 | 58163200 | 1600 | |
66072506 | xiaowuc1 | D | Nov. 30, 2019, 8:21 p.m. | OK | PyPy 2 | TESTS | 22 | 1185 | 12595200 | 1600 | |
47803010 | supachai_pay | D | Jan. 1, 2019, 3:16 a.m. | OK | PyPy 2 | TESTS | 22 | 1248 | 21708800 | 1600 | |
58688145 | wolffd | D | Aug. 13, 2019, 1:32 a.m. | OK | PyPy 2 | TESTS | 22 | 1279 | 23040000 | 1600 | |
49807364 | idgaf | D | Feb. 11, 2019, 8:45 p.m. | OK | PyPy 2 | TESTS | 22 | 1310 | 21913600 | 1600 | |
47867843 | CHelle | D | Jan. 3, 2019, 11 a.m. | OK | PyPy 3 | TESTS | 22 | 514 | 25190400 | 1600 | |
47722313 | Yee_172 | D | Dec. 30, 2018, 12:06 p.m. | OK | PyPy 3 | TESTS | 22 | 561 | 30003200 | 1600 | |
47724616 | homuncculus | D | Dec. 30, 2018, 1:31 p.m. | OK | PyPy 3 | TESTS | 22 | 608 | 30003200 | 1600 | |
49063869 | Narut | D | Jan. 27, 2019, 4:45 p.m. | OK | PyPy 3 | TESTS | 22 | 608 | 47104000 | 1600 | |
47872579 | kgmkr00001 | D | Jan. 3, 2019, 1:40 p.m. | OK | PyPy 3 | TESTS | 22 | 623 | 28467200 | 1600 | |
48022709 | III_Wolverine_III | D | Jan. 6, 2019, 6:57 a.m. | OK | PyPy 3 | TESTS | 22 | 638 | 28876800 | 1600 | |
51156302 | Annvv | D | March 11, 2019, 10:53 a.m. | OK | PyPy 3 | TESTS | 22 | 654 | 34304000 | 1600 | |
47972838 | Mr.Inconsistent | D | Jan. 5, 2019, 3:54 p.m. | OK | PyPy 3 | TESTS | 22 | 670 | 25395200 | 1600 | |
53527521 | yfo | D | April 29, 2019, 5:04 p.m. | OK | PyPy 3 | TESTS | 22 | 811 | 40243200 | 1600 | |
57156592 | brosucks | D | July 16, 2019, 4:57 p.m. | OK | PyPy 3 | TESTS | 22 | 826 | 23449600 | 1600 | |
47877809 | scambret | D | Jan. 3, 2019, 4:27 p.m. | OK | Python 2 | TESTS | 22 | 701 | 30515200 | 1600 | |
47703990 | adshin21 | D | Dec. 29, 2018, 6:47 p.m. | OK | Python 2 | TESTS | 22 | 779 | 21504000 | 1600 | |
47823934 | psaini | D | Jan. 1, 2019, 8:12 p.m. | OK | Python 2 | TESTS | 22 | 810 | 22732800 | 1600 | |
47666867 | noob77777 | D | Dec. 29, 2018, 1:38 a.m. | OK | Python 2 | TESTS | 22 | 904 | 38092800 | 1600 | |
49063910 | Narut | D | Jan. 27, 2019, 4:45 p.m. | OK | Python 3 | TESTS | 22 | 686 | 34816000 | 1600 | |
49063834 | Narut | D | Jan. 27, 2019, 4:44 p.m. | OK | Python 3 | TESTS | 22 | 686 | 34816000 | 1600 | |
47844332 | nowyyz | D | Jan. 2, 2019, 1:51 p.m. | OK | Python 3 | TESTS | 22 | 748 | 27648000 | 1600 | |
47770249 | julianferres | D | Dec. 30, 2018, 8:25 p.m. | OK | Python 3 | TESTS | 22 | 795 | 33996800 | 1600 | |
49066401 | Narut | D | Jan. 27, 2019, 5:56 p.m. | OK | Python 3 | TESTS | 22 | 810 | 24473600 | 1600 | |
47962629 | wangzpeng | D | Jan. 5, 2019, 10:17 a.m. | OK | Python 3 | TESTS | 22 | 810 | 43212800 | 1600 | |
47722325 | Yee_172 | D | Dec. 30, 2018, 12:06 p.m. | OK | Python 3 | TESTS | 22 | 841 | 25088000 | 1600 | |
47621077 | index_ | D | Dec. 28, 2018, 12:49 p.m. | OK | Python 3 | TESTS | 22 | 841 | 28262400 | 1600 | |
49826410 | Leendertz | D | Feb. 12, 2019, 11:52 a.m. | OK | Python 3 | TESTS | 22 | 873 | 40448000 | 1600 | |
49867592 | Firepaw | D | Feb. 13, 2019, 12:36 p.m. | OK | Python 3 | TESTS | 22 | 889 | 28262400 | 1600 | |
65154379 | maxglushkov561 | D | Nov. 16, 2019, 8:45 a.m. | OK | Rust | TESTS | 22 | 109 | 1638400 | 1600 | |
47681528 | Dx18 | D | Dec. 29, 2018, 12:23 p.m. | OK | Rust | TESTS | 22 | 140 | 3174400 | 1600 | |
47897213 | yakamoto | D | Jan. 4, 2019, 11:28 a.m. | OK | Scala | TESTS | 22 | 826 | 40448000 | 1600 |
Back to search problems