Educational Codeforces Round 14

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
691 Educational Codeforces Round 14 FINISHED False 7200 269013587 July 13, 2016, 4 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5608 ) D Swaps in Permutation PROGRAMMING dfs and similar ds math 1700

B"You are given a permutation of the numbers 1, xe2 x80 x892, xe2 x80 x89..., xe2 x80 x89n and m pairs of positions (aj, xe2 x80 x89bj). At each step you can choose a pair from the given positions and swap the numbers in that positions. What is the lexicographically maximal permutation one can get? Let p and q be two permutations of the numbers 1, xe2 x80 x892, xe2 x80 x89..., xe2 x80 x89n. p is lexicographically smaller than the q if a number 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n exists, so pk xe2 x80 x89= xe2 x80 x89qk for 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89< xe2 x80 x89i and pi xe2 x80 x89< xe2 x80 x89qi. The first line contains two integers n and m (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89106) -- the length of the permutation p and the number of pairs of positions. The second line contains n distinct integers pi (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89pi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) -- the elements of the permutation p. Each of the last m lines contains two integers (aj, xe2 x80 x89bj) (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89aj, xe2 x80 x89bj xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) -- the pairs of positions to swap. Note that you are given a positions, not the values to swap. Print the only line with n distinct integers p'i (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89p'i xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) -- the lexicographically maximal permutation one can get. "...

Tutorials

Editorial of Educational Codeforces Round 14

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
19110137 0lkeh D July 14, 2016, 2:46 p.m. OK FPC TESTS 38 2199 72192000 1700
19110151 0lkeh D July 14, 2016, 2:47 p.m. OK FPC TESTS 38 2246 72192000 1700
19110080 0lkeh D July 14, 2016, 2:43 p.m. OK FPC TESTS 38 2323 72192000 1700
19089312 hvcuong98 D July 13, 2016, 5:24 p.m. OK FPC TESTS 38 2370 44134400 1700
19089977 0lkeh D July 13, 2016, 5:30 p.m. OK FPC TESTS 38 2417 72192000 1700
40666246 chaorenhaha D July 23, 2018, 9:56 a.m. OK FPC TESTS 39 2418 77619200 1700
19110217 0lkeh D July 14, 2016, 2:50 p.m. OK FPC TESTS 38 2448 48128000 1700
19111122 dmlocdmloc D July 14, 2016, 3:42 p.m. OK FPC TESTS 38 2464 48128000 1700
19111089 0lkeh D July 14, 2016, 3:41 p.m. OK FPC TESTS 38 2496 72192000 1700
19226032 k2nt D July 19, 2016, 7:09 a.m. OK FPC TESTS 39 2589 32051200 1700
20916077 rainboy D Sept. 25, 2016, 9:56 p.m. OK GNU C TESTS 39 1107 20070400 1700
20916071 rainboy D Sept. 25, 2016, 9:55 p.m. OK GNU C TESTS 39 1138 20070400 1700
20915894 rainboy D Sept. 25, 2016, 9:35 p.m. OK GNU C TESTS 39 1138 20070400 1700
19154167 double301 D July 15, 2016, 1:15 p.m. OK GNU C TESTS 38 1138 92467200 1700
19089691 aman_shahi2 D July 13, 2016, 5:28 p.m. OK GNU C TESTS 38 1184 68403200 1700
19091206 Chipe1 D July 13, 2016, 5:43 p.m. OK GNU C TESTS 38 1200 36352000 1700
40984106 ReaLNero1 D July 30, 2018, 7:11 p.m. OK GNU C++ TESTS 39 389 36966400 1700
20919940 FHW_SO_WALL D Sept. 26, 2016, 6:14 a.m. OK GNU C++ TESTS 39 452 36966400 1700
41560408 ceerRep sagiri_ ppppaidy D Aug. 13, 2018, 1:54 p.m. OK GNU C++ TESTS 39 686 44134400 1700
19086700 TerryMcGinnis D July 13, 2016, 5:03 p.m. OK GNU C++ TESTS 38 748 35532800 1700
19109368 qzwlecr D July 14, 2016, 2:02 p.m. OK GNU C++ TESTS 38 779 31539200 1700
20195412 windniw coolxxx Who1 D Aug. 27, 2016, 12:52 p.m. OK GNU C++ TESTS 39 857 31129600 1700
19090227 arsijo D July 13, 2016, 5:34 p.m. OK GNU C++ TESTS 38 857 37068800 1700
19769075 vjudge1 D Aug. 10, 2016, 4:10 p.m. OK GNU C++ TESTS 39 857 66252800 1700
19168858 vjudge2 D July 16, 2016, 8:03 a.m. OK GNU C++ TESTS 38 873 21094400 1700
29132318 dhuacm10 D Aug. 2, 2017, 2 p.m. OK GNU C++ TESTS 39 904 26112000 1700
19190590 Bassel D July 17, 2016, 1:14 p.m. OK GNU C++11 TESTS 39 452 31539200 1700
19190504 Bassel D July 17, 2016, 1:07 p.m. OK GNU C++11 TESTS 39 499 31539200 1700
19190560 Bassel D July 17, 2016, 1:12 p.m. OK GNU C++11 TESTS 39 529 35532800 1700
29132378 demerzel D Aug. 2, 2017, 2:02 p.m. OK GNU C++11 TESTS 39 530 26112000 1700
46665547 Lenh_Ho_Xung D Dec. 6, 2018, 1:16 a.m. OK GNU C++11 TESTS 39 545 43622400 1700
61772827 mintCHILL D Oct. 3, 2019, 10:47 a.m. OK GNU C++11 TESTS 39 608 35635200 1700
19435339 Bobocan D July 27, 2016, 7:08 a.m. OK GNU C++11 TESTS 39 623 35532800 1700
46666259 Dingdongww D Dec. 6, 2018, 2:26 a.m. OK GNU C++11 TESTS 39 623 52940800 1700
19102410 xietutu D July 14, 2016, 7:32 a.m. OK GNU C++11 TESTS 38 654 36864000 1700
43932261 Umi D Oct. 7, 2018, 7:48 a.m. OK GNU C++11 TESTS 39 655 55193600 1700
20354928 vjudge3 D Sept. 3, 2016, 7:20 a.m. OK GNU C++14 TESTS 39 920 240435200 1700
48888285 sudhanshu6324 D Jan. 24, 2019, 1:07 p.m. OK GNU C++14 TESTS 39 1091 35532800 1700
49158769 vjudge2 D Jan. 29, 2019, 2:38 p.m. OK GNU C++14 TESTS 39 1091 47718400 1700
25864849 mengxiang000 D March 28, 2017, 4:23 a.m. OK GNU C++14 TESTS 39 1091 53657600 1700
49158595 vjudge4 D Jan. 29, 2019, 2:34 p.m. OK GNU C++14 TESTS 39 1122 47718400 1700
50212067 Ada.Grad.Shil D Feb. 20, 2019, 1:07 a.m. OK GNU C++14 TESTS 39 1138 35737600 1700
48888037 sudhanshu6324 D Jan. 24, 2019, 1:03 p.m. OK GNU C++14 TESTS 39 1138 35737600 1700
65456103 Mc_Square D Nov. 20, 2019, 8:40 p.m. OK GNU C++14 TESTS 39 1169 43417600 1700
44598925 DovydasVad D Oct. 20, 2018, 1:27 p.m. OK GNU C++14 TESTS 39 1169 50790400 1700
47465141 aeternalis1 D Dec. 24, 2018, 5:30 p.m. OK GNU C++14 TESTS 39 1170 43724800 1700
68344612 tsutaj1458 D Jan. 7, 2020, 6:27 a.m. OK GNU C++17 TESTS 39 1076 38604800 1700
48077294 wassim.omais D Jan. 8, 2019, 5:14 a.m. OK GNU C++17 TESTS 39 1107 37888000 1700
58185483 vjudge2 D Aug. 2, 2019, 4:57 p.m. OK GNU C++17 TESTS 39 1107 44032000 1700
69610360 paulthewineguy D Jan. 27, 2020, 11:17 a.m. OK GNU C++17 TESTS 39 1154 35737600 1700
57507600 vjudge2 D July 22, 2019, 12:34 p.m. OK GNU C++17 TESTS 39 1154 44032000 1700
51249415 VOIDHY D March 13, 2019, 7:40 a.m. OK GNU C++17 TESTS 39 1169 35737600 1700
49625421 vjudge3 D Feb. 8, 2019, 11:43 a.m. OK GNU C++17 TESTS 39 1169 68096000 1700
46723120 ivan100sic D Dec. 7, 2018, 1:53 p.m. OK GNU C++17 TESTS 39 1184 58982400 1700
44756064 minhducsun2OO2 D Oct. 24, 2018, 1:16 a.m. OK GNU C++17 TESTS 39 1185 56422400 1700
59425569 qinding D Aug. 25, 2019, 2:06 a.m. OK GNU C++17 TESTS 39 1200 36659200 1700
19541630 binhuq D July 31, 2016, 4:10 p.m. OK Go TESTS 39 2152 133222400 1700
19560431 binhuq D Aug. 1, 2016, 12:33 p.m. OK Go TESTS 39 2308 134348800 1700
19560329 binhuq D Aug. 1, 2016, 12:27 p.m. OK Go TESTS 39 2354 139878400 1700
68046842 thisbeit D Jan. 1, 2020, 4:51 p.m. OK Java 11 TESTS 39 1653 140288000 1700
67925738 ankyy_0103 D Dec. 29, 2019, 4:48 p.m. OK Java 11 TESTS 39 2994 238899200 1700
19158294 smalex69 D July 15, 2016, 5:01 p.m. OK Java 7 TESTS 38 1341 150937600 1700
19141295 alibaba D July 15, 2016, 3:42 a.m. OK Java 7 TESTS 38 3010 171827200 1700
19542695 lehar D July 31, 2016, 5:30 p.m. OK Java 7 TESTS 39 4726 260096000 1700
19094879 noopers D July 13, 2016, 7:08 p.m. OK Java 8 TESTS 38 1013 48537600 1700
20332796 kafy83 D Sept. 2, 2016, 12:25 a.m. OK Java 8 TESTS 39 1309 109260800 1700
20332632 kafy83 D Sept. 1, 2016, 11:55 p.m. OK Java 8 TESTS 39 1341 109363200 1700
19463020 WonderMouse D July 28, 2016, 2:14 p.m. OK Java 8 TESTS 39 1372 76697600 1700
19086526 Azat_Yusupov D July 13, 2016, 5:02 p.m. OK Java 8 TESTS 38 1543 41779200 1700
39219247 Ahmed_Diab D June 13, 2018, 2:30 p.m. OK Java 8 TESTS 39 1591 143155200 1700
20738984 Dukkha D Sept. 18, 2016, 3:51 p.m. OK Java 8 TESTS 39 1606 41779200 1700
20738122 Dukkha D Sept. 18, 2016, 3:06 p.m. OK Java 8 TESTS 39 1762 33689600 1700
41917314 AQT D Aug. 20, 2018, 11:56 p.m. OK Java 8 TESTS 39 1809 174387200 1700
28061636 Minaa D June 26, 2017, 4:57 p.m. OK Java 8 TESTS 39 1840 145920000 1700
19229795 pyBlob D July 19, 2016, 10:39 a.m. OK JavaScript TESTS 39 3368 172851200 1700
21268384 dyukha D Oct. 7, 2016, 11:39 p.m. OK Kotlin TESTS 39 2869 266956800 1700
23810894 og.kostya D Jan. 14, 2017, 4:54 p.m. OK MS C# TESTS 39 1107 99430400 1700
19320095 AndreiBarbuta D July 22, 2016, 9:06 a.m. OK MS C# TESTS 39 2027 140800000 1700
19383641 F02H D July 24, 2016, 12:20 p.m. OK MS C# TESTS 39 2090 110796800 1700
19299565 DigitalArtistKz D July 21, 2016, 10:16 a.m. OK MS C# TESTS 39 2682 123801600 1700
19086399 renadeen D July 13, 2016, 5:01 p.m. OK MS C# TESTS 38 3416 170291200 1700
19106755 fr0st D July 14, 2016, 12:02 p.m. OK MS C# TESTS 38 4554 193638400 1700
19442427 funCfans Rayyyyy D July 27, 2016, 1:04 p.m. OK MS C++ TESTS 39 982 37580800 1700
61842193 vjudge4 D Oct. 4, 2019, 10:04 a.m. OK MS C++ TESTS 39 1044 42086400 1700
61841938 vjudge3 D Oct. 4, 2019, 9:59 a.m. OK MS C++ TESTS 39 1060 42086400 1700
19211318 khasanovaa D July 18, 2016, 11:52 a.m. OK MS C++ TESTS 39 1091 42086400 1700
19778493 vjudge1 D Aug. 11, 2016, 6:50 a.m. OK MS C++ TESTS 39 1107 41676800 1700
19779098 vjudge5 D Aug. 11, 2016, 7:35 a.m. OK MS C++ TESTS 39 1107 43110400 1700
20670825 Flowersea D Sept. 17, 2016, 1:03 a.m. OK MS C++ TESTS 39 1153 71168000 1700
19776502 vjudge3 D Aug. 11, 2016, 4:01 a.m. OK MS C++ TESTS 39 1185 73216000 1700
24996122 AyaAbuDoleh D Feb. 24, 2017, 8:59 p.m. OK MS C++ TESTS 39 1200 81510400 1700
19211730 sundariam D July 18, 2016, 12:11 p.m. OK MS C++ TESTS 39 1216 41062400 1700
69557103 vjudge4 D Jan. 26, 2020, 9:15 a.m. OK MS C++ 2017 TESTS 39 3353 36966400 1700
37871216 petiteteaparty D May 3, 2018, 8:17 p.m. OK PyPy 2 TESTS 39 4773 153395200 1700
19094237 jhilary D July 13, 2016, 6:42 p.m. OK PyPy 2 TESTS 38 4944 244224000 1700
19162754 Eeyore D July 15, 2016, 11:26 p.m. OK PyPy 2 TESTS 38 4960 114790400 1700
22186040 CF2_kafuma D Nov. 13, 2016, 1:56 a.m. OK PyPy 2 TESTS 39 4991 142233600 1700
55611047 saku7 D June 16, 2019, 5:44 a.m. OK PyPy 3 TESTS 39 3665 207872000 1700
60687251 rajat_2548 D Sept. 16, 2019, 3:55 p.m. OK PyPy 3 TESTS 39 4367 209408000 1700
60690992 rajat_2548 D Sept. 16, 2019, 5:20 p.m. OK PyPy 3 TESTS 39 4944 230195200 1700

remove filters

Back to search problems