Codeforces Round 572 (Div. 2)

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
1189 Codeforces Round 572 (Div. 2) FINISHED False 7200 175100087 July 5, 2019, 3:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 14477 ) B Number Circle PROGRAMMING greedy math sortings 1100

B'You are given n numbers a_1, a_2, ldots, a_n . Is it possible to arrange them in a circle in such a way that every number is strictly less than the sum of its neighbors? For example, for the array [1, 4, 5, 6, 7, 8] , the arrangement on the left is valid, while arrangement on the right is not, as 5 ge 4 + 1 and 8> 1 + 6 . The first line contains a single integer n ( 3 <= n <= 10^5 ) -- the number of numbers. The second line contains n integers a_1, a_2, ldots, a_n ( 1 <= q a_i <= 10^9 ) -- the numbers. The given numbers are not necessarily distinct (i.e. duplicates are allowed). 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 n numbers -- elements of the array in the order they will stay in the circle. The first and the last element you output are considered neighbors in the circle. If there are multiple solutions, output any of them. You can print the circle starting with any element. One of the possible arrangements is shown in the first example: 4< 2 + 3 ; 2 < 4 + 3 ; 3< 4 + 2 . One of the possible arrangements is shown in the second example. No matter how we arrange 13, 8, 5 in a circle in the third example, 13 will have 8 and 5 as neighbors, but 13 ge 8 + 5 . There is no solution in the fourth example. '...

Tutorials

Editorial of Codeforces Round #572

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
56627754 arounderstands B July 6, 2019, 2:47 p.m. OK Clang++17 Diagnostics TESTS 27 156 0 1100
56655813 COFEEBrian B July 7, 2019, 8:37 a.m. OK Clang++17 Diagnostics TESTS 27 156 0 1100
56655391 COFEEBrian B July 7, 2019, 8:33 a.m. OK Clang++17 Diagnostics TESTS 27 187 15360000 1100
57552994 bilotiavaibhav B July 22, 2019, 6:19 p.m. OK Clang++17 Diagnostics TESTS 40 904 819200 1100
56609679 szfck B July 6, 2019, 6:41 a.m. OK Clang++17 Diagnostics TESTS 27 935 1024000 1100
56628412 iica B July 6, 2019, 3:03 p.m. OK D TESTS 27 93 22528000 1100
56576459 2548631 B July 5, 2019, 3:50 p.m. OK FPC TESTS 27 343 409600 1100
56852180 Zeatea B July 11, 2019, 4:17 p.m. OK FPC TESTS 38 998 1740800 1100
56581459 rudro1152 B July 5, 2019, 4:12 p.m. OK GNU C11 TESTS 27 342 819200 1100
56756121 ktk54x B July 9, 2019, 1:59 p.m. OK GNU C11 TESTS 27 373 409600 1100
56754731 Stream_Cipher B July 9, 2019, 1:24 p.m. OK GNU C11 TESTS 27 373 409600 1100
56727676 kaiboy B July 8, 2019, 9:04 p.m. OK GNU C11 TESTS 27 373 409600 1100
56683979 You_Know_Who B July 7, 2019, 8:32 p.m. OK GNU C11 TESTS 27 373 409600 1100
56580754 W_A_S_I_F B July 5, 2019, 4:08 p.m. OK GNU C11 TESTS 27 373 409600 1100
56631584 mudabbirul.ayon B July 6, 2019, 4:38 p.m. OK GNU C11 TESTS 27 373 819200 1100
57265597 SRAGON B July 18, 2019, 7:02 a.m. OK GNU C11 TESTS 40 374 409600 1100
56598315 rainboy B July 5, 2019, 9:02 p.m. OK GNU C11 TESTS 27 374 409600 1100
56815981 tiwari.rahul1998 B July 10, 2019, 7:11 p.m. OK GNU C11 TESTS 27 374 409600 1100
56600578 luogu_bot2 B July 5, 2019, 11:39 p.m. OK GNU C++11 TESTS 27 31 409600 1100
56614678 FFjet B July 6, 2019, 9:03 a.m. OK GNU C++11 TESTS 27 31 819200 1100
56604304 chenyewei_1234 B July 6, 2019, 3:16 a.m. OK GNU C++11 TESTS 27 31 2355200 1100
56772641 jinzhao B July 9, 2019, 11:41 p.m. OK GNU C++11 TESTS 27 46 204800 1100
56702771 nuccbh B July 8, 2019, 9:54 a.m. OK GNU C++11 TESTS 27 46 204800 1100
56672180 nowhere B July 7, 2019, 1:38 p.m. OK GNU C++11 TESTS 27 46 204800 1100
56625030 Frame233 B July 6, 2019, 1:27 p.m. OK GNU C++11 TESTS 27 46 204800 1100
56875466 MN2016 B July 12, 2019, 8:08 a.m. OK GNU C++11 TESTS 38 46 204800 1100
56879416 luogu_bot4 B July 12, 2019, 9:41 a.m. OK GNU C++11 TESTS 38 46 204800 1100
57458010 luogu_bot1 B July 21, 2019, 12:23 p.m. OK GNU C++11 TESTS 40 46 204800 1100
56723070 harrypotterfan264 B July 8, 2019, 5:54 p.m. OK GNU C++14 TESTS 27 31 921600 1100
69632847 Sankalan7 B Jan. 27, 2020, 5:41 p.m. OK GNU C++14 TESTS 40 46 409600 1100
69895760 MajorHawk B Jan. 31, 2020, 11:40 a.m. OK GNU C++14 TESTS 40 46 409600 1100
56853829 anthony1314 B July 11, 2019, 5:12 p.m. OK GNU C++14 TESTS 38 46 409600 1100
56881890 Mem4ik B July 12, 2019, 10:49 a.m. OK GNU C++14 TESTS 38 46 409600 1100
56976573 Sumer_Light B July 13, 2019, 12:26 p.m. OK GNU C++14 TESTS 38 46 409600 1100
58239844 am1tbh47 B Aug. 3, 2019, 11:06 p.m. OK GNU C++14 TESTS 40 46 409600 1100
56822701 CodingKnight B July 11, 2019, 1:58 a.m. OK GNU C++14 TESTS 32 46 409600 1100
56818127 SaYami B July 10, 2019, 8:42 p.m. OK GNU C++14 TESTS 32 46 409600 1100
56762411 zer-0-ne B July 9, 2019, 4:31 p.m. OK GNU C++14 TESTS 27 46 409600 1100
57093203 lesskreker B July 15, 2019, 11:25 a.m. OK GNU C++17 TESTS 38 31 1536000 1100
68063968 angrysqrt3 B Jan. 2, 2020, 6:29 a.m. OK GNU C++17 TESTS 40 46 409600 1100
69495410 JLU_GLHF B Jan. 25, 2020, 3:30 a.m. OK GNU C++17 TESTS 40 46 409600 1100
58210807 zhangya B Aug. 3, 2019, 8:44 a.m. OK GNU C++17 TESTS 40 46 409600 1100
57061209 vjudge1 B July 14, 2019, 6:04 p.m. OK GNU C++17 TESTS 38 46 409600 1100
56987916 Nabeel_Ghallawenji B July 13, 2019, 4:41 p.m. OK GNU C++17 TESTS 38 46 409600 1100
56823111 CodingKnight B July 11, 2019, 2:15 a.m. OK GNU C++17 TESTS 32 46 409600 1100
56717153 khairul82 B July 8, 2019, 3:07 p.m. OK GNU C++17 TESTS 27 46 409600 1100
56699654 Kurisuzzz B July 8, 2019, 8:34 a.m. OK GNU C++17 TESTS 27 46 409600 1100
56691632 i_lower B July 8, 2019, 4:22 a.m. OK GNU C++17 TESTS 27 46 409600 1100
59770146 WintersCurse B Aug. 30, 2019, 7:36 p.m. OK Go TESTS 40 77 5324800 1100
59549248 sighduck B Aug. 27, 2019, 1:29 a.m. OK Go TESTS 40 109 0 1100
56755519 Miron95 B July 9, 2019, 1:42 p.m. OK Go TESTS 27 124 0 1100
56778046 efimmanevich B July 10, 2019, 4:14 a.m. OK Go TESTS 27 140 0 1100
56624980 viniichuk B July 6, 2019, 1:26 p.m. OK Go TESTS 27 373 4505600 1100
56624907 viniichuk B July 6, 2019, 1:24 p.m. OK Go TESTS 27 373 4505600 1100
57938778 GKArnd B July 29, 2019, 11:48 a.m. OK Haskell TESTS 40 389 25292800 1100
56625330 ZZYSonny B July 6, 2019, 1:36 p.m. OK Haskell TESTS 27 390 25292800 1100
56614103 bouncypi B July 6, 2019, 8:47 a.m. OK Haskell TESTS 27 390 25292800 1100
65765835 Anonymous B Nov. 26, 2019, 5:54 p.m. OK Java 11 TESTS 40 233 0 1100
68997647 machhra B Jan. 17, 2020, 6:05 p.m. OK Java 11 TESTS 40 264 0 1100
64658153 zekigurbuz B Nov. 10, 2019, 7:56 p.m. OK Java 11 TESTS 40 872 0 1100
56817705 mbfeci B July 10, 2019, 8:22 p.m. OK Java 8 TESTS 27 124 0 1100
56743986 Ad-007 B July 9, 2019, 8:51 a.m. OK Java 8 TESTS 27 139 0 1100
56708072 romit17 B July 8, 2019, 11:47 a.m. OK Java 8 TESTS 27 139 0 1100
56637989 Xylenox B July 6, 2019, 9:31 p.m. OK Java 8 TESTS 27 139 0 1100
56631588 Ziklon B July 6, 2019, 4:39 p.m. OK Java 8 TESTS 27 139 0 1100
56626468 di_halt B July 6, 2019, 2:10 p.m. OK Java 8 TESTS 27 139 0 1100
56609225 serafimkoo B July 6, 2019, 6:29 a.m. OK Java 8 TESTS 27 139 0 1100
56582358 dsh_bc B July 5, 2019, 4:16 p.m. OK Java 8 TESTS 27 139 0 1100
56575745 elkadymohammed01 B July 5, 2019, 3:47 p.m. OK Java 8 TESTS 27 139 0 1100
56715756 darshan287 B July 8, 2019, 2:35 p.m. OK Java 8 TESTS 27 140 0 1100
57247974 HossamHoussien B July 17, 2019, 8:31 p.m. OK JavaScript TESTS 40 124 20275200 1100
56860924 kuzAnatoliy B July 11, 2019, 10:12 p.m. OK JavaScript TESTS 38 124 24473600 1100
56581668 mongolrgata B July 5, 2019, 4:13 p.m. OK JavaScript TESTS 27 187 27545600 1100
56612160 I.A.K.O.V B July 6, 2019, 7:51 a.m. OK Kotlin TESTS 27 140 0 1100
56617540 amirrr B July 6, 2019, 10:26 a.m. OK Kotlin TESTS 27 187 6041600 1100
56869441 Lovinix B July 12, 2019, 5:38 a.m. OK Kotlin TESTS 38 234 6963200 1100
56580381 Zanmato B July 5, 2019, 4:07 p.m. OK Kotlin TESTS 27 343 6553600 1100
56733428 Spheniscine B July 9, 2019, 3:18 a.m. OK Kotlin TESTS 27 358 7168000 1100
56589416 sashamc B July 5, 2019, 4:58 p.m. OK Kotlin TESTS 27 358 8294400 1100
56575772 Yoshinaz B July 5, 2019, 3:48 p.m. OK Kotlin TESTS 27 624 1024000 1100
56681460 akdsfiqewori B July 7, 2019, 6:44 p.m. OK Kotlin TESTS 27 702 6451200 1100
56607142 og.kostya B July 6, 2019, 5:26 a.m. OK Mono C# TESTS 27 78 3276800 1100
58668226 Batsila B Aug. 12, 2019, 1:22 p.m. OK Mono C# TESTS 40 109 28467200 1100
56574898 Jarjar314 B July 5, 2019, 3:44 p.m. OK Mono C# TESTS 27 124 25088000 1100
57364793 NEvOl B July 20, 2019, 8:52 a.m. OK Mono C# TESTS 40 124 25600000 1100
57364874 NEvOl B July 20, 2019, 8:54 a.m. OK Mono C# TESTS 40 124 25600000 1100
56818742 zazak B July 10, 2019, 9:15 p.m. OK Mono C# TESTS 32 124 26521600 1100
56575257 Giangvp B July 5, 2019, 3:46 p.m. OK Mono C# TESTS 27 139 19968000 1100
56701469 treasuryonly B July 8, 2019, 9:16 a.m. OK Mono C# TESTS 27 140 19968000 1100
56576152 fr0st B July 5, 2019, 3:49 p.m. OK Mono C# TESTS 27 156 29286400 1100
56585254 Yupiteru B July 5, 2019, 4:32 p.m. OK Mono C# TESTS 27 171 33792000 1100
56672887 vjudge2 B July 7, 2019, 1:58 p.m. OK MS C++ TESTS 27 46 409600 1100
56664770 vjudge5 B July 7, 2019, 10:55 a.m. OK MS C++ TESTS 27 46 409600 1100
65154694 vjudge3 B Nov. 16, 2019, 8:52 a.m. OK MS C++ TESTS 40 46 409600 1100
56710565 vjudge4 B July 8, 2019, 12:36 p.m. OK MS C++ TESTS 27 46 409600 1100
57001262 S.K B July 14, 2019, 3:47 a.m. OK MS C++ TESTS 38 46 819200 1100
56887026 vjudge1 B July 12, 2019, 1:04 p.m. OK MS C++ TESTS 38 46 819200 1100
56715043 vjudge3 B July 8, 2019, 2:19 p.m. OK MS C++ TESTS 27 46 819200 1100
56884501 vjudge3 B July 12, 2019, noon OK MS C++ TESTS 38 46 1228800 1100
69080146 rures B Jan. 19, 2020, 6:01 a.m. OK MS C++ TESTS 40 61 409600 1100
65336525 vjudge1 B Nov. 19, 2019, 9:08 a.m. OK MS C++ TESTS 40 61 409600 1100
56623962 pmitkov B July 6, 2019, 1 p.m. OK MS C++ 2017 TESTS 27 62 409600 1100
56599010 petko_mitkov B July 5, 2019, 9:35 p.m. OK MS C++ 2017 TESTS 27 77 409600 1100
65165876 vjudge4 B Nov. 16, 2019, 1:15 p.m. OK MS C++ 2017 TESTS 40 77 409600 1100
56574103 C20191522 B July 5, 2019, 3:42 p.m. OK MS C++ 2017 TESTS 27 77 819200 1100
57017278 suancaiyu B July 14, 2019, 12:14 p.m. OK MS C++ 2017 TESTS 38 77 819200 1100
58846231 JeongWooOh B Aug. 15, 2019, 5:28 a.m. OK MS C++ 2017 TESTS 40 77 819200 1100
65148868 vjudge1 B Nov. 16, 2019, 6:42 a.m. OK MS C++ 2017 TESTS 40 77 1024000 1100
56577280 llolitay B July 5, 2019, 3:53 p.m. OK MS C++ 2017 TESTS 27 77 1228800 1100
56577122 2018030401051 B July 5, 2019, 3:53 p.m. OK MS C++ 2017 TESTS 27 77 3993600 1100
65261412 Lucrezia B Nov. 17, 2019, 3:10 p.m. OK MS C++ 2017 TESTS 40 78 409600 1100
56788997 mojocerob B July 10, 2019, 9:42 a.m. OK Node.js TESTS 27 280 19046400 1100
56715171 lostamok B July 8, 2019, 2:22 p.m. OK PHP TESTS 27 140 7987200 1100
56595327 mayakin B July 5, 2019, 7:06 p.m. OK PHP TESTS 27 155 7987200 1100
56715092 lostamok B July 8, 2019, 2:20 p.m. OK PHP TESTS 27 171 7987200 1100
56751371 giorgi_giunashvili B July 9, 2019, 12:03 p.m. OK PHP TESTS 27 421 7987200 1100
56580953 batyrbek.zhunis B July 5, 2019, 4:09 p.m. OK PHP TESTS 27 421 8089600 1100
56672835 NUMAMSA B July 7, 2019, 1:57 p.m. OK PHP TESTS 27 452 7987200 1100
57335660 jolt.tks B July 19, 2019, 3:58 p.m. OK PyPy 2 TESTS 40 171 9625600 1100
56605364 vjudge3 B July 6, 2019, 4:08 a.m. OK PyPy 2 TESTS 27 171 10035200 1100
59073104 yumtam B Aug. 19, 2019, 5:51 a.m. OK PyPy 2 TESTS 40 171 10854400 1100
56688378 frostD B July 8, 2019, 1:41 a.m. OK PyPy 2 TESTS 27 187 11776000 1100
57148697 -Morass- B July 16, 2019, 1:55 p.m. OK PyPy 2 TESTS 40 280 10547200 1100
56599335 atarw B July 5, 2019, 9:55 p.m. OK PyPy 2 TESTS 27 701 11059200 1100
57099303 swapnil2597 B July 15, 2019, 1:14 p.m. OK PyPy 3 TESTS 38 280 15257600 1100
69880571 vjudge5 B Jan. 31, 2020, 6:11 a.m. OK PyPy 3 TESTS 40 280 15769600 1100
56576387 anyut511 B July 5, 2019, 3:50 p.m. OK PyPy 3 TESTS 27 295 13721600 1100
57644011 mathayus.1729 B July 24, 2019, 1:36 p.m. OK PyPy 3 TESTS 40 295 15155200 1100
56578646 Yocho B July 5, 2019, 3:59 p.m. OK PyPy 3 TESTS 27 296 16076800 1100
56585144 Black_Fregat B July 5, 2019, 4:32 p.m. OK PyPy 3 TESTS 27 296 16179200 1100
56777604 picroft B July 10, 2019, 3:47 a.m. OK PyPy 3 TESTS 27 311 11366400 1100
68107010 _viru_ B Jan. 3, 2020, 7:38 a.m. OK PyPy 3 TESTS 40 311 11980800 1100
69252682 Anuranjan_Pandey B Jan. 21, 2020, 2:44 p.m. OK PyPy 3 TESTS 40 311 12902400 1100
56585385 plourde27 B July 5, 2019, 4:33 p.m. OK PyPy 3 TESTS 27 311 13414400 1100
56683519 carvajal B July 7, 2019, 8:12 p.m. OK Python 2 TESTS 27 280 5836800 1100
56793405 biltharesatyendra B July 10, 2019, 11:33 a.m. OK Python 2 TESTS 27 296 5836800 1100
56577930 ashu249 B July 5, 2019, 3:56 p.m. OK Python 2 TESTS 27 311 5632000 1100
56695509 CuteTN B July 8, 2019, 6:48 a.m. OK Python 2 TESTS 27 312 5632000 1100
56784862 SoSooding B July 10, 2019, 7:55 a.m. OK Python 2 TESTS 27 326 5632000 1100
56577915 GuLguy B July 5, 2019, 3:56 p.m. OK Python 2 TESTS 27 342 5632000 1100
56811745 teegaar B July 10, 2019, 4:33 p.m. OK Python 2 TESTS 27 342 9113600 1100
56578232 phoenix28 B July 5, 2019, 3:57 p.m. OK Python 2 TESTS 27 358 5632000 1100
56574586 daniel.carlos B July 5, 2019, 3:43 p.m. OK Python 2 TESTS 27 374 5836800 1100
56616330 m1ckyro5a B July 6, 2019, 9:49 a.m. OK Python 3 TESTS 27 156 8806400 1100
57019393 orazbek B July 14, 2019, 1:15 p.m. OK Python 3 TESTS 38 171 8806400 1100
56624578 pratikg1999 B July 6, 2019, 1:16 p.m. OK Python 3 TESTS 27 171 8806400 1100
56598596 strangerBoy B July 5, 2019, 9:15 p.m. OK Python 3 TESTS 27 186 8396800 1100
56605537 nealzane B July 6, 2019, 4:19 a.m. OK Python 3 TESTS 27 186 9523200 1100
56634955 Addarsh B July 6, 2019, 6:49 p.m. OK Python 3 TESTS 27 186 12492800 1100
56590435 kp_2141 B July 5, 2019, 5:03 p.m. OK Python 3 TESTS 27 187 8806400 1100
58322501 vjudge1 B Aug. 5, 2019, 6:27 a.m. OK Python 3 TESTS 40 187 10752000 1100
56585020 codershuvo B July 5, 2019, 4:31 p.m. OK Python 3 TESTS 27 202 8601600 1100
56767294 tanish36 B July 9, 2019, 7:07 p.m. OK Python 3 TESTS 27 202 8806400 1100
56626083 majali B July 6, 2019, 1:58 p.m. OK Ruby TESTS 27 186 19148800 1100
57923750 Raphael98 B July 29, 2019, 6:17 a.m. OK Ruby TESTS 40 264 17100800 1100
56579233 frozenlib B July 5, 2019, 4:01 p.m. OK Rust TESTS 27 46 2355200 1100
56576968 Peaupote B July 5, 2019, 3:52 p.m. OK Rust TESTS 27 46 6860800 1100

remove filters

Back to search problems