Codeforces Round 589 (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
1228 Codeforces Round 589 (Div. 2) FINISHED False 7200 162060899 Sept. 29, 2019, 1:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5230 ) D Complete Tripartite PROGRAMMING brute force constructive algorithms graphs hashing implementation 1800

B'You have a simple undirected graph consisting of n vertices and m edges. The graph doesn 't contain self-loops, there is at most one edge between a pair of vertices. The given graph can be disconnected. Let 's make a definition. Let v_1 and v_2 be two some nonempty subsets of vertices that do not intersect. Let f(v_{1}, v_{2}) be true if and only if all the conditions are satisfied: Create three vertex sets ( v_{1} , v_{2} , v_{3} ) which satisfy the conditions below; Is it possible to create such three vertex sets? If it 's possible, print matching vertex set for each vertex. The first line contains two integers n and m ( 3 <= n <= 10^{5} , 0 <= m <= text{min}(3 cdot 10^{5}, frac{n(n-1)}{2}) ) -- the number of vertices and edges in the graph. The i -th of the next m lines contains two integers a_{i} and b_{i} ( 1 <= a_{i} lt b_{i} <= n ) -- it means there is an edge between a_{i} and b_{i} . The graph doesn 't contain self-loops, there is at most one edge between a pair of vertices. The given graph can be disconnected. If the answer exists, print n integers. i -th integer means the vertex set number (from 1 to 3 ) of i -th vertex. Otherwise, print -1 . If there are multiple answers, print any. In the first example, if v_{1} = { 1 } , v_{2} = { 2, 3 } , and v_{3} = { 4, 5, 6 } then vertex sets will satisfy all conditions. But you can assign vertices to vertex sets in a different way; Other answers like "2 3 3 1 1 1" will be accepted as well. In the second example, it 's impossible to make such vertex sets. '...

Tutorials

70162

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
61791414 sash0 D Oct. 3, 2019, 4 p.m. OK D TESTS 53 327 17817600 1800
66244742 quevangel D Dec. 3, 2019, 7:52 p.m. OK D TESTS 53 467 53657600 1800
61506681 rr_ D Sept. 29, 2019, 3 p.m. OK D TESTS 47 546 36864000 1800
61568852 ruban D Sept. 30, 2019, 5:57 p.m. OK Delphi TESTS 52 155 217702400 1800
61533192 YOK D Sept. 30, 2019, 4:45 a.m. OK GNU C11 TESTS 52 358 6041600 1800
61532631 vikr_182 D Sept. 30, 2019, 4:21 a.m. OK GNU C11 TESTS 52 390 190054400 1800
61502165 Chipe1 D Sept. 29, 2019, 2:41 p.m. OK GNU C11 TESTS 47 405 7680000 1800
61537183 chenyewei_1234 D Sept. 30, 2019, 7:01 a.m. OK GNU C++11 TESTS 52 46 5836800 1800
64192825 jangjie D Nov. 4, 2019, 8:27 a.m. OK GNU C++11 TESTS 53 46 5836800 1800
61529227 lobserver D Sept. 30, 2019, 1:42 a.m. OK GNU C++11 TESTS 51 46 6041600 1800
61528643 Llf0703 D Sept. 30, 2019, 1:12 a.m. OK GNU C++11 TESTS 51 46 6144000 1800
61495964 pureness D Sept. 29, 2019, 2:14 p.m. OK GNU C++11 TESTS 47 46 6144000 1800
61528740 Llf0703 D Sept. 30, 2019, 1:17 a.m. OK GNU C++11 TESTS 51 46 6144000 1800
61762760 MrJoker D Oct. 3, 2019, 7:39 a.m. OK GNU C++11 TESTS 53 46 6553600 1800
61499269 guyan D Sept. 29, 2019, 2:28 p.m. OK GNU C++11 TESTS 47 46 6553600 1800
61826316 ReaLNero1 D Oct. 4, 2019, 4:55 a.m. OK GNU C++11 TESTS 53 46 7987200 1800
62034301 renbohan D Oct. 7, 2019, 2:54 a.m. OK GNU C++11 TESTS 53 46 8192000 1800
62404389 idxcalcal D Oct. 12, 2019, 8:29 a.m. OK GNU C++14 TESTS 53 62 11980800 1800
61500497 KbMu D Sept. 29, 2019, 2:33 p.m. OK GNU C++14 TESTS 47 108 10854400 1800
61505764 Stu.yxr D Sept. 29, 2019, 2:56 p.m. OK GNU C++14 TESTS 47 109 5734400 1800
61527369 Gene_Liu D Sept. 30, 2019, 12:03 a.m. OK GNU C++14 TESTS 50 109 6860800 1800
62116504 vjudge5 D Oct. 8, 2019, 1:31 p.m. OK GNU C++14 TESTS 53 109 7372800 1800
61535939 guozixin D Sept. 30, 2019, 6:21 a.m. OK GNU C++14 TESTS 52 109 7577600 1800
61517261 ydk1104 D Sept. 29, 2019, 5:57 p.m. OK GNU C++14 TESTS 50 109 8192000 1800
61496947 Linkus D Sept. 29, 2019, 2:18 p.m. OK GNU C++14 TESTS 47 109 10137600 1800
61497340 handsomeIvan D Sept. 29, 2019, 2:20 p.m. OK GNU C++14 TESTS 47 109 12083200 1800
61749931 AiteYx D Oct. 3, 2019, 2:45 a.m. OK GNU C++14 TESTS 52 109 13107200 1800
61551243 luogu_bot2 D Sept. 30, 2019, 12:31 p.m. OK GNU C++17 TESTS 52 62 14745600 1800
61543366 tomjobs D Sept. 30, 2019, 9:32 a.m. OK GNU C++17 TESTS 52 93 13107200 1800
61539251 SuperSuck D Sept. 30, 2019, 8:01 a.m. OK GNU C++17 TESTS 52 93 13516800 1800
61528736 619492520 D Sept. 30, 2019, 1:17 a.m. OK GNU C++17 TESTS 51 93 14028800 1800
61915803 Evlpsrfc D Oct. 5, 2019, 12:04 p.m. OK GNU C++17 TESTS 53 108 6246400 1800
61532538 Dillonh_ D Sept. 30, 2019, 4:17 a.m. OK GNU C++17 TESTS 52 109 3174400 1800
62627524 Antetokounmpo D Oct. 15, 2019, 2:29 p.m. OK GNU C++17 TESTS 53 109 3891200 1800
61712207 KKJYOvO D Oct. 2, 2019, 11:42 a.m. OK GNU C++17 TESTS 52 109 4812800 1800
61527728 ddytxdy D Sept. 30, 2019, 12:22 a.m. OK GNU C++17 TESTS 50 109 5632000 1800
61529952 ddytxdy D Sept. 30, 2019, 2:16 a.m. OK GNU C++17 TESTS 51 109 5632000 1800
61517940 reanimatorzon D Sept. 29, 2019, 6:12 p.m. OK Go TESTS 50 62 4505600 1800
62041026 synapse D Oct. 7, 2019, 5:58 a.m. OK Go TESTS 53 327 4608000 1800
61496616 NinjaDoggy D Sept. 29, 2019, 2:17 p.m. OK Java 8 TESTS 47 171 5529600 1800
62678604 shaurya_singh D Oct. 16, 2019, 12:09 p.m. OK Java 8 TESTS 53 202 0 1800
61509055 mikit D Sept. 29, 2019, 3:42 p.m. OK Java 8 TESTS 47 202 0 1800
61506070 aman28rwt D Sept. 29, 2019, 2:58 p.m. OK Java 8 TESTS 47 233 18022400 1800
61731285 icpc_loser D Oct. 2, 2019, 4:50 p.m. OK Java 8 TESTS 52 264 7577600 1800
61523982 bhautik_77 D Sept. 29, 2019, 8:42 p.m. OK Java 8 TESTS 50 296 34304000 1800
61504655 yutake2000 D Sept. 29, 2019, 2:52 p.m. OK Java 8 TESTS 47 326 17408000 1800
61513762 sthfaceless D Sept. 29, 2019, 4:48 p.m. OK Java 8 TESTS 48 374 0 1800
63090747 yaoct D Oct. 21, 2019, 6:20 p.m. OK Java 8 TESTS 53 389 14233600 1800
61517901 karamkontar D Sept. 29, 2019, 6:11 p.m. OK Java 8 TESTS 50 389 15155200 1800
61538195 Spheniscine D Sept. 30, 2019, 7:32 a.m. OK Kotlin TESTS 52 748 67379200 1800
61502590 sekti D Sept. 29, 2019, 2:43 p.m. OK Kotlin TESTS 47 904 15974400 1800
61514808 songsinger D Sept. 29, 2019, 5:09 p.m. OK Kotlin TESTS 48 1434 65433600 1800
61513681 songsinger D Sept. 29, 2019, 4:46 p.m. OK Kotlin TESTS 48 1497 65126400 1800
61513202 songsinger D Sept. 29, 2019, 4:37 p.m. OK Kotlin TESTS 48 1513 65126400 1800
61495850 pavlo.liapota D Sept. 29, 2019, 2:14 p.m. OK Kotlin TESTS 47 1575 105062400 1800
64777896 og.kostya D Nov. 13, 2019, 5:38 a.m. OK Mono C# TESTS 53 155 13516800 1800
62782846 Tan42 D Oct. 17, 2019, 1:23 p.m. OK Mono C# TESTS 53 592 14950400 1800
61907291 eki D Oct. 5, 2019, 10 a.m. OK Mono C# TESTS 53 608 37785600 1800
61505717 River861 D Sept. 29, 2019, 2:56 p.m. OK MS C++ TESTS 47 93 5632000 1800
61947220 vjudge2 D Oct. 6, 2019, 12:55 a.m. OK MS C++ TESTS 53 93 10547200 1800
62460809 vjudge3 D Oct. 13, 2019, 8:10 a.m. OK MS C++ TESTS 53 93 17408000 1800
62060077 vjudge1 D Oct. 7, 2019, 1:22 p.m. OK MS C++ TESTS 53 109 13926400 1800
62043266 vjudge5 D Oct. 7, 2019, 6:40 a.m. OK MS C++ TESTS 53 140 7168000 1800
62412426 vjudge1 D Oct. 12, 2019, 10:45 a.m. OK MS C++ TESTS 53 171 7168000 1800
61498129 tarattata1 D Sept. 29, 2019, 2:23 p.m. OK MS C++ TESTS 47 186 7577600 1800
62394150 vjudge4 D Oct. 12, 2019, 4:32 a.m. OK MS C++ TESTS 53 311 26931200 1800
61696093 shinbeom D Oct. 2, 2019, 7:01 a.m. OK MS C++ 2017 TESTS 52 202 8806400 1800
64729585 catplatypus D Nov. 12, 2019, 7:52 a.m. OK MS C++ 2017 TESTS 53 202 9830400 1800
61510707 j2v D Sept. 29, 2019, 3:58 p.m. OK MS C++ 2017 TESTS 48 217 6758400 1800
61502446 Lelby D Sept. 29, 2019, 2:42 p.m. OK MS C++ 2017 TESTS 47 217 8601600 1800
67020561 catplatypus D Dec. 16, 2019, 12:50 p.m. OK MS C++ 2017 TESTS 53 218 9728000 1800
63119019 shebao D Oct. 22, 2019, 10:32 a.m. OK MS C++ 2017 TESTS 53 233 13516800 1800
61501134 GomBu D Sept. 29, 2019, 2:36 p.m. OK MS C++ 2017 TESTS 47 234 6758400 1800
61509043 pichulia D Sept. 29, 2019, 3:42 p.m. OK MS C++ 2017 TESTS 47 249 7987200 1800
61496693 P___ D Sept. 29, 2019, 2:17 p.m. OK MS C++ 2017 TESTS 47 264 8294400 1800
61497348 youx D Sept. 29, 2019, 2:20 p.m. OK MS C++ 2017 TESTS 47 280 12288000 1800
61496348 pajenegod D Sept. 29, 2019, 2:16 p.m. OK PyPy 2 TESTS 47 343 35942400 1800
61573170 zaceleiseliakai D Sept. 30, 2019, 7:28 p.m. OK PyPy 2 TESTS 52 436 36352000 1800
61572646 zaceleiseliakai D Sept. 30, 2019, 7:15 p.m. OK PyPy 2 TESTS 52 436 44134400 1800
61503598 MVP D Sept. 29, 2019, 2:47 p.m. OK PyPy 2 TESTS 47 482 34304000 1800
61498610 Pyar.Mahobat.Dhoka.Hai D Sept. 29, 2019, 2:25 p.m. OK PyPy 2 TESTS 47 639 61440000 1800
63348790 Kirillov_Alexey D Oct. 24, 2019, 8:33 p.m. OK PyPy 2 TESTS 53 904 32768000 1800
68950555 anshuman16423 D Jan. 16, 2020, 5:48 p.m. OK PyPy 2 TESTS 53 1606 22630400 1800
61571436 zaceleiseliakai D Sept. 30, 2019, 6:49 p.m. OK PyPy 2 TESTS 52 1949 30515200 1800
62352129 O_Ramanujan D Oct. 11, 2019, 9:41 a.m. OK PyPy 3 TESTS 53 686 28672000 1800
61501724 asvasil D Sept. 29, 2019, 2:39 p.m. OK PyPy 3 TESTS 47 716 36147200 1800
61536245 sam997 D Sept. 30, 2019, 6:31 a.m. OK PyPy 3 TESTS 52 779 28467200 1800
61511940 titia D Sept. 29, 2019, 4:15 p.m. OK PyPy 3 TESTS 48 795 35532800 1800
61511858 titia D Sept. 29, 2019, 4:14 p.m. OK PyPy 3 TESTS 48 795 35635200 1800
61504564 nagitaosu D Sept. 29, 2019, 2:52 p.m. OK PyPy 3 TESTS 47 826 29388800 1800
63264632 Kirillov_Alexey D Oct. 23, 2019, 10:46 p.m. OK PyPy 3 TESTS 53 826 39321600 1800
63343942 AnastK D Oct. 24, 2019, 6:33 p.m. OK PyPy 3 TESTS 53 826 42188800 1800
61570986 _Kee D Sept. 30, 2019, 6:40 p.m. OK PyPy 3 TESTS 52 826 48128000 1800
61520476 malylesio D Sept. 29, 2019, 7:26 p.m. OK PyPy 3 TESTS 50 857 32256000 1800
61790841 Venia D Oct. 3, 2019, 3:50 p.m. OK Python 2 TESTS 53 904 22425600 1800
61593958 timaktimak D Oct. 1, 2019, 8:05 a.m. OK Python 2 TESTS 52 951 77107200 1800
61556510 applemelon D Sept. 30, 2019, 2:12 p.m. OK Python 3 TESTS 52 857 20684800 1800
66567787 erickjohnross D Dec. 10, 2019, 12:50 a.m. OK Python 3 TESTS 53 889 43212800 1800
62091185 mmonir D Oct. 8, 2019, 5:45 a.m. OK Python 3 TESTS 53 904 46694400 1800
61504044 Nanored D Sept. 29, 2019, 2:49 p.m. OK Python 3 TESTS 47 982 18227200 1800
68925632 Firepaw D Jan. 16, 2020, 10:18 a.m. OK Python 3 TESTS 53 1014 19865600 1800
61529431 NocturneBflat D Sept. 30, 2019, 1:53 a.m. OK Python 3 TESTS 51 1060 24064000 1800
61498694 Ueki D Sept. 29, 2019, 2:26 p.m. OK Python 3 TESTS 47 1060 44851200 1800
61694862 chowdhuryan1999 D Oct. 2, 2019, 6:43 a.m. OK Python 3 TESTS 52 1107 30003200 1800
61570697 _Kee D Sept. 30, 2019, 6:33 p.m. OK Python 3 TESTS 52 1107 67993600 1800
61790690 Venia D Oct. 3, 2019, 3:47 p.m. OK Python 3 TESTS 53 1122 22528000 1800
62386042 Dawer D Oct. 11, 2019, 9:26 p.m. OK Rust TESTS 53 46 409600 1800
62375341 Dawer D Oct. 11, 2019, 5:04 p.m. OK Rust TESTS 53 62 409600 1800
62329167 Dawer D Oct. 10, 2019, 7:49 p.m. OK Rust TESTS 53 93 6963200 1800
61502967 DragonCoderZ D Sept. 29, 2019, 2:45 p.m. OK Rust TESTS 47 124 12083200 1800
61509074 sansen D Sept. 29, 2019, 3:42 p.m. OK Rust TESTS 47 124 13209600 1800
62328767 Dawer D Oct. 10, 2019, 7:38 p.m. OK Rust TESTS 53 156 32972800 1800
61498550 cympfh D Sept. 29, 2019, 2:25 p.m. OK Rust TESTS 47 327 14848000 1800
61495980 manta1130 D Sept. 29, 2019, 2:14 p.m. OK Rust TESTS 47 343 12390400 1800
61501791 limed D Sept. 29, 2019, 2:39 p.m. OK Scala TESTS 47 811 27750400 1800

remove filters

Back to search problems