Codeforces Round 580 (Div. 1)

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
1205 Codeforces Round 580 (Div. 1) FINISHED False 7800 165687299 Aug. 18, 2019, 1:45 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 14192 ) A Almost Equal PROGRAMMING constructive algorithms greedy math 1300

B'You are given integer n . You have to arrange numbers from 1 to 2n , using each of them exactly once, on the circle, so that the following condition would be satisfied: For every n consecutive numbers on the circle write their sum on the blackboard. Then any two of written on the blackboard 2n numbers differ not more than by 1 . For example, choose n = 3 . On the left you can see an example of a valid arrangement: 1 + 4 + 5 = 10 , 4 + 5 + 2 = 11 , 5 + 2 + 3 = 10 , 2 + 3 + 6 = 11 , 3 + 6 + 1 = 10 , 6 + 1 + 4 = 11 , any two numbers differ by at most 1 . On the right you can see an invalid arrangement: for example, 5 + 1 + 6 = 12 , and 3 + 2 + 4 = 9 , 9 and 12 differ more than by 1 . The first and the only line contain one integer n ( 1 <= n <= 10^5 ). If there is no solution, output "NO" in the first line. If there is a solution, output "YES" in the first line. In the second line output 2n numbers -- numbers from 1 to 2n in the order they will stay in the circle. Each number should appear only once. If there are several solutions, you can output any of them. Example from the statement is shown for the first example. It can be proved that there is no solution in the second example. '...

Tutorials

69158

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
59011490 iica A Aug. 18, 2019, 2 p.m. OK D TESTS 22 62 11878400 1300
59067265 eugalt A Aug. 19, 2019, 2:34 a.m. OK GNU C11 TESTS 22 46 0 1300
59350053 vjudge1 A Aug. 23, 2019, 11:26 a.m. OK GNU C11 TESTS 22 358 0 1300
59770902 vjudge4 A Aug. 30, 2019, 7:54 p.m. OK GNU C11 TESTS 22 358 0 1300
59922041 KhaWareZmI A Sept. 3, 2019, 12:04 a.m. OK GNU C11 TESTS 22 373 0 1300
59358767 vjudge1 A Aug. 23, 2019, 2:28 p.m. OK GNU C11 TESTS 22 373 0 1300
59427515 buddy_1 A Aug. 25, 2019, 3:56 a.m. OK GNU C11 TESTS 22 373 0 1300
59429600 navyasree.8.2001 A Aug. 25, 2019, 5:27 a.m. OK GNU C11 TESTS 22 374 0 1300
59348375 vjudge4 A Aug. 23, 2019, 10:45 a.m. OK GNU C11 TESTS 22 374 0 1300
60938025 nikhilreddy123 A Sept. 20, 2019, 4:03 p.m. OK GNU C11 TESTS 22 655 0 1300
59604266 vjudge4 A Aug. 28, 2019, 7:58 a.m. OK GNU C11 TESTS 22 655 819200 1300
59004691 _wxw A Aug. 18, 2019, 1:50 p.m. OK GNU C++11 TESTS 22 30 819200 1300
59091226 chhokmah A Aug. 19, 2019, 12:48 p.m. OK GNU C++11 TESTS 22 30 20889600 1300
59126740 vjudge3 A Aug. 20, 2019, 9:23 a.m. OK GNU C++11 TESTS 22 31 614400 1300
69936531 luogu_bot3 A Feb. 1, 2020, 4:07 a.m. OK GNU C++11 TESTS 22 31 614400 1300
59208945 ExtraDevil A Aug. 21, 2019, 7:54 a.m. OK GNU C++11 TESTS 22 31 614400 1300
59334970 LJC00118 A Aug. 23, 2019, 4:02 a.m. OK GNU C++11 TESTS 22 31 819200 1300
59213262 luogu_bot1 A Aug. 21, 2019, 9:14 a.m. OK GNU C++11 TESTS 22 31 819200 1300
68329759 luogu_bot1 A Jan. 6, 2020, 6:16 p.m. OK GNU C++11 TESTS 22 31 819200 1300
60516302 memset0c A Sept. 14, 2019, 6:45 a.m. OK GNU C++11 TESTS 22 31 819200 1300
59118818 luogu_bot4 A Aug. 20, 2019, 3:31 a.m. OK GNU C++11 TESTS 22 31 819200 1300
59067249 infinis A Aug. 19, 2019, 2:33 a.m. OK GNU C++14 TESTS 22 31 0 1300
68389923 1213James A Jan. 8, 2020, 8:07 a.m. OK GNU C++14 TESTS 22 31 0 1300
61257231 redocyz A Sept. 25, 2019, 10:32 a.m. OK GNU C++14 TESTS 22 31 0 1300
59911214 1704050_Musfequa A Sept. 2, 2019, 5:19 p.m. OK GNU C++14 TESTS 22 31 0 1300
59049199 gmfabat A Aug. 18, 2019, 4:52 p.m. OK GNU C++14 TESTS 22 31 0 1300
59048165 I_love_you_my_girl A Aug. 18, 2019, 4:40 p.m. OK GNU C++14 TESTS 22 31 0 1300
59015613 JamsRamen A Aug. 18, 2019, 2:09 p.m. OK GNU C++14 TESTS 22 31 0 1300
59012401 antguz A Aug. 18, 2019, 2:02 p.m. OK GNU C++14 TESTS 22 31 0 1300
59838543 Owen_codeisking A Sept. 1, 2019, 5:59 a.m. OK GNU C++14 TESTS 22 31 819200 1300
60959010 damon2598 A Sept. 21, 2019, 4:28 a.m. OK GNU C++14 TESTS 22 31 819200 1300
59003852 TrivialMan A Aug. 18, 2019, 1:49 p.m. OK GNU C++17 TESTS 22 30 0 1300
59004656 marX A Aug. 18, 2019, 1:50 p.m. OK GNU C++17 TESTS 22 30 819200 1300
59013394 howsiwei A Aug. 18, 2019, 2:04 p.m. OK GNU C++17 TESTS 22 31 0 1300
59359923 Ashik1704026 A Aug. 23, 2019, 2:53 p.m. OK GNU C++17 TESTS 22 31 0 1300
60016483 MathBoy A Sept. 4, 2019, 11:44 a.m. OK GNU C++17 TESTS 22 31 0 1300
69876004 rokaf2020 A Jan. 31, 2020, 4:03 a.m. OK GNU C++17 TESTS 22 31 0 1300
59002817 saba2000 A Aug. 18, 2019, 1:48 p.m. OK GNU C++17 TESTS 22 31 0 1300
59634671 SaeedIT A Aug. 28, 2019, 7:59 p.m. OK GNU C++17 TESTS 22 31 819200 1300
63658896 Felix555 A Oct. 28, 2019, 1:31 p.m. OK GNU C++17 TESTS 22 31 819200 1300
68060233 rterte A Jan. 2, 2020, 3:01 a.m. OK GNU C++17 TESTS 22 31 819200 1300
59334637 khochapak A Aug. 23, 2019, 3:47 a.m. OK Go TESTS 22 46 4505600 1300
59060040 Kaa A Aug. 18, 2019, 9 p.m. OK Haskell TESTS 22 62 5324800 1300
63654113 KulikAlex A Oct. 28, 2019, 12:13 p.m. OK Java 11 TESTS 22 202 0 1300
66606396 pmlalpurwala A Dec. 10, 2019, 6:43 p.m. OK Java 11 TESTS 22 872 0 1300
59372247 ISSAM_LAKOUAM A Aug. 23, 2019, 7:38 p.m. OK Java 8 TESTS 22 124 0 1300
62966896 GreatWhite A Oct. 20, 2019, 5:09 a.m. OK Java 8 TESTS 22 124 0 1300
59112858 Taran_1407 A Aug. 19, 2019, 10:26 p.m. OK Java 8 TESTS 22 124 0 1300
59107120 Sehnsucht A Aug. 19, 2019, 6:31 p.m. OK Java 8 TESTS 22 124 0 1300
59060632 Derino A Aug. 18, 2019, 9:24 p.m. OK Java 8 TESTS 22 124 2560000 1300
59004651 AkshajK A Aug. 18, 2019, 1:50 p.m. OK Java 8 TESTS 22 124 3481600 1300
63385837 rterte A Oct. 25, 2019, 1:45 p.m. OK Java 8 TESTS 22 139 0 1300
59952930 JatinYadav A Sept. 3, 2019, 3:06 p.m. OK Java 8 TESTS 22 139 0 1300
59677080 heff10 A Aug. 29, 2019, 6:37 p.m. OK Java 8 TESTS 22 139 0 1300
59108183 Jetch A Aug. 19, 2019, 7 p.m. OK Java 8 TESTS 22 139 0 1300
59567304 vjudge5 A Aug. 27, 2019, 11:14 a.m. OK Kotlin TESTS 22 171 5427200 1300
59378763 eater A Aug. 24, 2019, 1:04 a.m. OK Kotlin TESTS 22 187 11059200 1300
59348201 darnley A Aug. 23, 2019, 10:41 a.m. OK Kotlin TESTS 22 202 10854400 1300
59072486 camypaper A Aug. 19, 2019, 5:33 a.m. OK Mono C# TESTS 22 78 11571200 1300
59420578 sid0adams A Aug. 24, 2019, 8:47 p.m. OK Mono C# TESTS 22 93 11571200 1300
59023286 kuuso A Aug. 18, 2019, 2:27 p.m. OK Mono C# TESTS 22 109 11571200 1300
59214959 vjudge1 A Aug. 21, 2019, 9:53 a.m. OK MS C++ TESTS 22 46 1638400 1300
59116323 vjudge3 A Aug. 20, 2019, 1:54 a.m. OK MS C++ TESTS 22 61 819200 1300
59114867 vjudge4 A Aug. 20, 2019, 12:47 a.m. OK MS C++ TESTS 22 61 1638400 1300
59007372 math957963 A Aug. 18, 2019, 1:54 p.m. OK MS C++ TESTS 22 93 1740800 1300
59011080 BaturaDima A Aug. 18, 2019, 2 p.m. OK MS C++ TESTS 22 108 819200 1300
68111053 vjudge4 A Jan. 3, 2020, 9:33 a.m. OK MS C++ TESTS 22 108 1228800 1300
59194620 vjudge2 A Aug. 21, 2019, 12:38 a.m. OK MS C++ TESTS 22 109 409600 1300
59978358 DM1 A Sept. 4, 2019, 7:05 a.m. OK MS C++ TESTS 22 109 819200 1300
59977808 DM1 A Sept. 4, 2019, 6:51 a.m. OK MS C++ TESTS 22 109 2764800 1300
60875064 vjudge4 A Sept. 19, 2019, 3:37 p.m. OK MS C++ TESTS 22 109 7987200 1300
63267724 pichulia A Oct. 24, 2019, 1:38 a.m. OK MS C++ 2017 TESTS 22 46 819200 1300
63551813 sky666 c_r_u_s_h CapNemo A Oct. 27, 2019, 11:52 a.m. OK MS C++ 2017 TESTS 22 61 0 1300
59597243 Antorni A Aug. 28, 2019, 2:55 a.m. OK MS C++ 2017 TESTS 22 62 819200 1300
59548809 guoriyue A Aug. 27, 2019, 1:01 a.m. OK MS C++ 2017 TESTS 22 62 819200 1300
68728713 AleksanderBalobanov A Jan. 13, 2020, 6:59 p.m. OK MS C++ 2017 TESTS 22 62 1228800 1300
65262754 MRamanauskas A Nov. 17, 2019, 3:36 p.m. OK MS C++ 2017 TESTS 22 109 0 1300
59568816 vjudge3 A Aug. 27, 2019, 11:47 a.m. OK MS C++ 2017 TESTS 22 109 819200 1300
63547958 sky666 c_r_u_s_h CapNemo A Oct. 27, 2019, 10:59 a.m. OK MS C++ 2017 TESTS 22 124 0 1300
59113477 GTrigger A Aug. 19, 2019, 11:12 p.m. OK MS C++ 2017 TESTS 22 124 0 1300
65915574 shelter A Nov. 28, 2019, 2:26 p.m. OK MS C++ 2017 TESTS 22 124 307200 1300
59054655 mayakin A Aug. 18, 2019, 6:28 p.m. OK PHP TESTS 22 62 26828800 1300
59004785 astrom.lars A Aug. 18, 2019, 1:51 p.m. OK PyPy 2 TESTS 22 139 8089600 1300
60822709 Zysonic A Sept. 19, 2019, 1:36 a.m. OK PyPy 2 TESTS 22 140 10547200 1300
59007273 exoji2e A Aug. 18, 2019, 1:54 p.m. OK PyPy 2 TESTS 22 186 11468800 1300
60819447 Artino A Sept. 18, 2019, 10:39 p.m. OK PyPy 3 TESTS 22 202 13721600 1300
59375135 secondsheep A Aug. 23, 2019, 9:15 p.m. OK PyPy 3 TESTS 22 218 18432000 1300
59114682 swapnil2597 A Aug. 20, 2019, 12:36 a.m. OK PyPy 3 TESTS 22 233 19353600 1300
60819421 Artino A Sept. 18, 2019, 10:38 p.m. OK PyPy 3 TESTS 22 234 13721600 1300
59055513 BenL A Aug. 18, 2019, 6:45 p.m. OK PyPy 3 TESTS 22 249 11571200 1300
65686202 daleks A Nov. 24, 2019, 11:42 p.m. OK PyPy 3 TESTS 22 249 12288000 1300
59007282 CHelle A Aug. 18, 2019, 1:54 p.m. OK PyPy 3 TESTS 22 249 12492800 1300
59430923 AuserC A Aug. 25, 2019, 6:13 a.m. OK PyPy 3 TESTS 22 249 17408000 1300
60129367 kchau A Sept. 5, 2019, 4:44 p.m. OK PyPy 3 TESTS 22 249 17612800 1300
64300905 dipendrathapa044 A Nov. 5, 2019, 10:01 a.m. OK PyPy 3 TESTS 22 249 17715200 1300
60390439 AryanSM A Sept. 11, 2019, 1:06 p.m. OK Python 2 TESTS 22 249 1638400 1300
59055674 ReaLNero A Aug. 18, 2019, 6:48 p.m. OK Python 2 TESTS 22 265 1638400 1300
59019109 nwi A Aug. 18, 2019, 2:16 p.m. OK Python 2 TESTS 22 280 0 1300
69738497 soumyasarkar1998 A Jan. 29, 2020, 2:42 p.m. OK Python 2 TESTS 22 280 6553600 1300
60819523 Artino A Sept. 18, 2019, 10:44 p.m. OK Python 2 TESTS 22 311 5222400 1300
60822731 Xdynix A Sept. 19, 2019, 1:37 a.m. OK Python 2 TESTS 22 311 7065600 1300
60819596 Artino A Sept. 18, 2019, 10:48 p.m. OK Python 2 TESTS 22 311 7065600 1300
60819585 Artino A Sept. 18, 2019, 10:47 p.m. OK Python 2 TESTS 22 311 7065600 1300
60819562 Artino A Sept. 18, 2019, 10:46 p.m. OK Python 2 TESTS 22 327 5120000 1300
59262915 KhanhNe A Aug. 22, 2019, 9:21 a.m. OK Python 3 TESTS 22 202 14028800 1300
59119701 nealzane A Aug. 20, 2019, 4:13 a.m. OK Python 3 TESTS 22 217 14643200 1300
60640539 fuu2202 A Sept. 15, 2019, 3:16 p.m. OK Python 3 TESTS 22 233 11673600 1300
61326499 UR5ANO A Sept. 26, 2019, 1:52 p.m. OK Python 3 TESTS 22 233 15462400 1300
59189674 _Arion_ A Aug. 20, 2019, 8:15 p.m. OK Python 3 TESTS 22 374 9113600 1300
59240162 Rahul_Rajput A Aug. 21, 2019, 7:16 p.m. OK Python 3 TESTS 22 436 6758400 1300
59100890 LintuStorm A Aug. 19, 2019, 4:01 p.m. OK Python 3 TESTS 22 451 6553600 1300
59067197 eugalt A Aug. 19, 2019, 2:32 a.m. OK Python 3 TESTS 22 451 7884800 1300
59538835 Ritik._.garg A Aug. 26, 2019, 6:01 p.m. OK Python 3 TESTS 22 452 7475200 1300
59057375 TolimanStaR A Aug. 18, 2019, 7:31 p.m. OK Python 3 TESTS 22 452 8396800 1300
59065207 nemi_zzz A Aug. 19, 2019, 1:26 a.m. OK Ruby TESTS 22 124 5939200 1300
59499120 sansen A Aug. 26, 2019, 1:26 a.m. OK Rust TESTS 22 31 4198400 1300
59007263 EbTech A Aug. 18, 2019, 1:54 p.m. OK Rust TESTS 22 46 0 1300
59403889 ValenKof A Aug. 24, 2019, 1:10 p.m. OK Rust TESTS 22 46 1433600 1300
60502961 tpoeiras A Sept. 13, 2019, 7:40 p.m. OK Rust TESTS 22 62 0 1300
59011806 limed A Aug. 18, 2019, 2:01 p.m. OK Scala TESTS 22 514 5427200 1300

remove filters

Back to search problems