Codeforces Global Round 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
1148 Codeforces Global Round 3 FINISHED False 8100 185297074 June 1, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5367 ) C Crazy Diamond PROGRAMMING constructive algorithms sortings 1700

B'You are given a permutation p of integers from 1 to n , where n is an even number. Your goal is to sort the permutation. To do so, you can perform zero or more operations of the following type: There is no need to minimize the number of operations, however you should use no more than 5 cdot n operations. One can show that it is always possible to do that. The first line contains a single integer n ( 2 <= q n <= q 3 cdot 10^5 , n is even) -- the length of the permutation. The second line contains n distinct integers p_1, p_2, ldots, p_n ( 1 <= p_i <= n ) -- the given permutation. On the first line print m ( 0 <= m <= 5 cdot n ) -- the number of swaps to perform. Each of the following m lines should contain integers a_i, b_i ( 1 <= a_i, b_i <= n , |a_i - b_i| ge frac{n}{2} ) -- the indices that should be swapped in the corresponding swap. Note that there is no need to minimize the number of operations. We can show that an answer always exists. In the first example, when one swap elements on positions 1 and 2 , the array becomes sorted. In the second example, pay attention that there is no need to minimize number of swaps. In the third example, after swapping elements on positions 1 and 5 the array becomes: [4, 5, 3, 1, 2, 6] . After swapping elements on positions 2 and 5 the array becomes [4, 2, 3, 1, 5, 6] and finally after swapping elements on positions 1 and 4 the array becomes sorted: [1, 2, 3, 4, 5, 6] . '...

Tutorials

Codeforces Global Round 3 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
55000399 jiangly C June 3, 2019, 4:02 a.m. OK Clang++17 Diagnostics TESTS 37 467 12697600 1700
56137584 rainboy C June 27, 2019, midnight OK Clang++17 Diagnostics TESTS 37 592 13312000 1700
54935769 avm C June 1, 2019, 3:52 p.m. OK D TESTS 37 420 38195200 1700
54928913 iica C June 1, 2019, 3:19 p.m. OK D TESTS 37 545 22118400 1700
55188417 Denor C June 6, 2019, 5:06 a.m. OK Delphi TESTS 37 374 14540800 1700
54946936 ruban C June 1, 2019, 4:48 p.m. OK Delphi TESTS 37 405 42700800 1700
54934316 d4rkn19ht C June 1, 2019, 3:44 p.m. OK FPC TESTS 37 2215 64102400 1700
55536535 Errichto C June 13, 2019, 4:45 p.m. OK GNU C11 TESTS 37 2136 13209600 1700
55536529 Errichto C June 13, 2019, 4:44 p.m. OK GNU C11 TESTS 37 2167 13209600 1700
55536307 the_white_devil C June 13, 2019, 4:36 p.m. OK GNU C11 TESTS 37 2167 13209600 1700
54975871 CJK000 C June 2, 2019, 10:47 a.m. OK GNU C11 TESTS 37 2199 132300800 1700
55055593 about C June 3, 2019, 6:51 p.m. OK GNU C11 TESTS 37 2277 19456000 1700
54944373 _Rebellion C June 1, 2019, 4:36 p.m. OK GNU C11 TESTS 37 2324 14438400 1700
56137234 rainboy C June 26, 2019, 11:35 p.m. OK GNU C11 TESTS 37 2791 48025600 1700
56136941 rainboy C June 26, 2019, 11:13 p.m. OK GNU C11 TESTS 37 2823 48025600 1700
56137338 rainboy C June 26, 2019, 11:41 p.m. OK GNU C11 TESTS 37 2823 48025600 1700
56137210 rainboy C June 26, 2019, 11:34 p.m. OK GNU C11 TESTS 37 2838 48025600 1700
54960368 ChthollyNotaSeniorious C June 2, 2019, 3:20 a.m. OK GNU C++11 TESTS 37 77 15052800 1700
55610341 ReaLNero1 C June 16, 2019, 5:16 a.m. OK GNU C++11 TESTS 37 93 15052800 1700
54934837 528hby C June 1, 2019, 3:47 p.m. OK GNU C++11 TESTS 37 93 28057600 1700
55663330 ChthollyTree C June 17, 2019, 12:14 a.m. OK GNU C++11 TESTS 37 93 48128000 1700
55122423 xryjr233 C June 5, 2019, 11:20 a.m. OK GNU C++11 TESTS 37 109 14438400 1700
59648366 chenyewei_1234 C Aug. 29, 2019, 7:02 a.m. OK GNU C++11 TESTS 37 109 15052800 1700
54929608 xryjr233 C June 1, 2019, 3:22 p.m. OK GNU C++11 TESTS 37 124 14438400 1700
54958651 maomao330 C June 2, 2019, 2:13 a.m. OK GNU C++11 TESTS 37 124 16896000 1700
54928841 ouuan C June 1, 2019, 3:19 p.m. OK GNU C++11 TESTS 37 139 30003200 1700
54999146 sxd666 C June 3, 2019, 3:03 a.m. OK GNU C++11 TESTS 37 156 52940800 1700
54972623 vishnu_m C June 2, 2019, 9:16 a.m. OK GNU C++14 TESTS 37 108 11878400 1700
54931211 Linkus C June 1, 2019, 3:30 p.m. OK GNU C++14 TESTS 37 187 18739200 1700
54964410 atoiz C June 2, 2019, 5:41 a.m. OK GNU C++14 TESTS 37 202 14438400 1700
54932247 Nson C June 1, 2019, 3:34 p.m. OK GNU C++14 TESTS 37 202 15052800 1700
54958306 purple_bro C June 2, 2019, 1:56 a.m. OK GNU C++14 TESTS 37 217 7884800 1700
54973119 emmmhjif C June 2, 2019, 9:28 a.m. OK GNU C++14 TESTS 37 217 14438400 1700
57342505 mig C July 19, 2019, 7:45 p.m. OK GNU C++14 TESTS 37 217 15052800 1700
68717905 Heart_Blue C Jan. 13, 2020, 3:09 p.m. OK GNU C++14 TESTS 37 217 15052800 1700
58903043 DDDaybreak C Aug. 16, 2019, 9:59 a.m. OK GNU C++14 TESTS 37 217 15155200 1700
55127746 Tommyr7 C June 5, 2019, 1:40 p.m. OK GNU C++14 TESTS 37 217 16076800 1700
54930257 m1sch3f C June 1, 2019, 3:25 p.m. OK GNU C++17 TESTS 37 171 16998400 1700
54982457 prantoran C June 2, 2019, 1:53 p.m. OK GNU C++17 TESTS 37 202 7680000 1700
54928017 kessido C June 1, 2019, 3:15 p.m. OK GNU C++17 TESTS 37 202 13824000 1700
54942695 abeaumont C June 1, 2019, 4:28 p.m. OK GNU C++17 TESTS 37 217 7577600 1700
54969213 Atreus C June 2, 2019, 7:51 a.m. OK GNU C++17 TESTS 37 217 7577600 1700
57337503 Antygenius C July 19, 2019, 4:46 p.m. OK GNU C++17 TESTS 37 217 7577600 1700
57339740 SetsunaOgiso C July 19, 2019, 5:52 p.m. OK GNU C++17 TESTS 37 217 13209600 1700
54935680 mjhmjh1104 C June 1, 2019, 3:51 p.m. OK GNU C++17 TESTS 37 217 15052800 1700
60844322 qinyuyang C Sept. 19, 2019, 12:03 p.m. OK GNU C++17 TESTS 37 217 48128000 1700
67142407 anjgodara C Dec. 18, 2019, 7:22 a.m. OK GNU C++17 TESTS 37 218 7577600 1700
54941204 caidodo0_0 C June 1, 2019, 4:20 p.m. OK Go TESTS 37 748 50176000 1700
54934863 fnch C June 1, 2019, 3:47 p.m. OK Java 8 TESTS 37 233 40243200 1700
54936365 sarthakmanna C June 1, 2019, 3:55 p.m. OK Java 8 TESTS 37 249 37683200 1700
54989242 SrapZark C June 2, 2019, 5:37 p.m. OK Java 8 TESTS 37 265 12390400 1700
54934224 Shun_PI C June 1, 2019, 3:44 p.m. OK Java 8 TESTS 37 280 39833600 1700
54983904 rahsutamrev C June 2, 2019, 2:37 p.m. OK Java 8 TESTS 37 280 78336000 1700
54983214 rahsutamrev C June 2, 2019, 2:16 p.m. OK Java 8 TESTS 37 280 78336000 1700
55082807 In_The_Name_Of_Love C June 4, 2019, 11:25 a.m. OK Java 8 TESTS 37 295 78233600 1700
54971432 burtmacklin C June 2, 2019, 8:47 a.m. OK Java 8 TESTS 37 296 12902400 1700
54931402 Yugioh C June 1, 2019, 3:30 p.m. OK Java 8 TESTS 37 311 24371200 1700
54930694 martins C June 1, 2019, 3:27 p.m. OK Java 8 TESTS 37 311 39116800 1700
61190234 Spheniscine C Sept. 24, 2019, 2:13 a.m. OK Kotlin TESTS 37 405 65945600 1700
61110341 Spheniscine C Sept. 23, 2019, 11 a.m. OK Kotlin TESTS 37 483 75264000 1700
61110694 Spheniscine C Sept. 23, 2019, 11:08 a.m. OK Kotlin TESTS 37 514 75264000 1700
54942406 ut.Blast C June 1, 2019, 4:26 p.m. OK Kotlin TESTS 37 780 88371200 1700
54950062 Denzed C June 1, 2019, 6:51 p.m. OK Kotlin TESTS 37 841 80281600 1700
55189853 xxx_alisher_xxx C June 6, 2019, 5:57 a.m. OK Kotlin TESTS 37 1326 177766400 1700
54930451 eki C June 1, 2019, 3:26 p.m. OK Mono C# TESTS 37 545 47206400 1700
54932106 kuuso C June 1, 2019, 3:34 p.m. OK Mono C# TESTS 37 608 61440000 1700
54929704 keymoon C June 1, 2019, 3:23 p.m. OK Mono C# TESTS 37 638 87654400 1700
54939630 omikad C June 1, 2019, 4:11 p.m. OK Mono C# TESTS 37 686 78643200 1700
54941715 jyk C June 1, 2019, 4:22 p.m. OK Mono C# TESTS 37 732 132710400 1700
59696347 treasuryonly C Aug. 30, 2019, 8:45 a.m. OK Mono C# TESTS 37 842 132096000 1700
54933174 LateRest C June 1, 2019, 3:39 p.m. OK Mono C# TESTS 37 1981 104345600 1700
54970869 faxse C June 2, 2019, 8:32 a.m. OK Mono C# TESTS 37 2339 45465600 1700
60076309 vjudge1 C Sept. 5, 2019, 12:41 p.m. OK MS C++ TESTS 37 233 14438400 1700
61322047 vjudge1 C Sept. 26, 2019, 12:51 p.m. OK MS C++ TESTS 37 280 14438400 1700
54929717 math957963 C June 1, 2019, 3:23 p.m. OK MS C++ TESTS 37 296 13926400 1700
56137582 rainboy C June 27, 2019, midnight OK MS C++ TESTS 37 311 14438400 1700
54969638 Victor_Morozov C June 2, 2019, 8:02 a.m. OK MS C++ TESTS 37 326 22630400 1700
54932262 mandinga C June 1, 2019, 3:34 p.m. OK MS C++ TESTS 37 452 16998400 1700
54938788 hiliy C June 1, 2019, 4:07 p.m. OK MS C++ TESTS 37 1045 14438400 1700
55568034 vjudge2 C June 14, 2019, 4:45 p.m. OK MS C++ TESTS 37 1045 28876800 1700
60080418 vjudge5 C Sept. 5, 2019, 1:50 p.m. OK MS C++ TESTS 37 2448 13209600 1700
54930552 youx C June 1, 2019, 3:26 p.m. OK MS C++ 2017 TESTS 37 280 12288000 1700
54969407 kkeey C June 2, 2019, 7:55 a.m. OK MS C++ 2017 TESTS 37 280 32051200 1700
54960744 querry C June 2, 2019, 3:34 a.m. OK MS C++ 2017 TESTS 37 311 12083200 1700
57964074 ZSTU-2018329621261 C July 30, 2019, 1:39 a.m. OK MS C++ 2017 TESTS 37 327 17203200 1700
55308304 NPUlzh C June 8, 2019, 3:55 p.m. OK MS C++ 2017 TESTS 37 342 14438400 1700
68631709 AleksanderBalobanov C Jan. 12, 2020, 3:16 a.m. OK MS C++ 2017 TESTS 37 342 16896000 1700
54954932 ItsNikolor C June 1, 2019, 9:50 p.m. OK MS C++ 2017 TESTS 37 373 14438400 1700
55073895 Lordxx C June 4, 2019, 7:37 a.m. OK MS C++ 2017 TESTS 37 374 14438400 1700
54945822 snowdozer C June 1, 2019, 4:43 p.m. OK MS C++ 2017 TESTS 37 374 18022400 1700
56137577 rainboy C June 27, 2019, midnight OK MS C++ 2017 TESTS 37 389 14438400 1700
54934709 CyberGoose C June 1, 2019, 3:46 p.m. OK Ocaml TESTS 37 608 33689600 1700
54938172 wunder9l C June 1, 2019, 4:04 p.m. OK PyPy 2 TESTS 37 374 55705600 1700
54937008 kabeer27 C June 1, 2019, 3:58 p.m. OK PyPy 2 TESTS 37 452 49356800 1700
54957725 cherry_su C June 2, 2019, 1:25 a.m. OK PyPy 2 TESTS 37 452 56524800 1700
61857770 YESMAths C Oct. 4, 2019, 2:30 p.m. OK PyPy 2 TESTS 37 608 100454400 1700
54930300 pajenegod C June 1, 2019, 3:25 p.m. OK PyPy 2 TESTS 37 608 152371200 1700
54938384 c1729 C June 1, 2019, 4:05 p.m. OK PyPy 2 TESTS 37 826 35737600 1700
55568615 raj1307 C June 14, 2019, 5:08 p.m. OK PyPy 2 TESTS 37 904 98713600 1700
54937819 shiv1470 C June 1, 2019, 4:02 p.m. OK PyPy 3 TESTS 37 919 44544000 1700
54932154 Kiri8128 C June 1, 2019, 3:34 p.m. OK PyPy 3 TESTS 37 951 86937600 1700
55084575 nik-in-au C June 4, 2019, 12:04 p.m. OK PyPy 3 TESTS 37 1060 32563200 1700
55270902 Bovniova C June 7, 2019, 4:20 p.m. OK PyPy 3 TESTS 37 1107 89395200 1700
54931168 perContest1 C June 1, 2019, 3:29 p.m. OK PyPy 3 TESTS 37 1122 35225600 1700
55943277 Nipun_iiitd C June 22, 2019, 6:03 p.m. OK PyPy 3 TESTS 37 1216 78745600 1700
55271269 Bovniova C June 7, 2019, 4:30 p.m. OK PyPy 3 TESTS 37 1231 142438400 1700
54942579 beemax C June 1, 2019, 4:27 p.m. OK PyPy 3 TESTS 37 1247 41779200 1700
58567509 StinsonOvO C Aug. 11, 2019, 8:37 a.m. OK PyPy 3 TESTS 37 1247 42905600 1700
54946262 pineriver C June 1, 2019, 4:45 p.m. OK PyPy 3 TESTS 37 1278 53043200 1700
54969003 sinianluoye C June 2, 2019, 7:45 a.m. OK Python 2 TESTS 37 1091 32870400 1700
54942340 SoSooding C June 1, 2019, 4:26 p.m. OK Python 2 TESTS 37 1435 46080000 1700
58948977 -Morass- C Aug. 17, 2019, 10:10 a.m. OK Python 2 TESTS 37 1512 76288000 1700
54929421 nwi C June 1, 2019, 3:21 p.m. OK Python 2 TESTS 37 1730 121958400 1700
54938069 wolffd C June 1, 2019, 4:03 p.m. OK Python 2 TESTS 37 1778 117452800 1700
54942717 Black_Fregat C June 1, 2019, 4:28 p.m. OK Python 3 TESTS 37 1404 135680000 1700
54983958 gaidash C June 2, 2019, 2:39 p.m. OK Python 3 TESTS 37 1450 127795200 1700
54954998 mylyanyk.ivan C June 1, 2019, 9:54 p.m. OK Python 3 TESTS 37 1684 107520000 1700
54956589 dandersonw C June 1, 2019, 11:52 p.m. OK Python 3 TESTS 37 1684 108236800 1700
67413799 nethish C Dec. 22, 2019, 9:11 a.m. OK Python 3 TESTS 37 2027 105472000 1700
67411830 nethish C Dec. 22, 2019, 8:37 a.m. OK Python 3 TESTS 37 2043 105472000 1700
55065620 iamssk C June 4, 2019, 3:23 a.m. OK Python 3 TESTS 37 2215 115916800 1700
64617456 MinecraftFuns C Nov. 10, 2019, 5:31 a.m. OK Python 3 TESTS 37 2230 116224000 1700
55313186 ParsaBahrami C June 8, 2019, 7:06 p.m. OK Python 3 TESTS 37 2246 116019200 1700
55310713 vjudge4 C June 8, 2019, 5:25 p.m. OK Python 3 TESTS 37 2261 115916800 1700
54952418 rinzu C June 1, 2019, 7:52 p.m. OK Ruby TESTS 37 1091 182681600 1700
54950923 rinzu C June 1, 2019, 7:10 p.m. OK Ruby TESTS 37 1185 182784000 1700
54932155 EbTech C June 1, 2019, 3:34 p.m. OK Rust TESTS 37 249 35020800 1700
54931571 limed C June 1, 2019, 3:31 p.m. OK Scala TESTS 37 1200 157491200 1700

remove filters

Back to search problems