Codeforces Round 599 (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
1242 Codeforces Round 599 (Div. 1) FINISHED False 7200 164386487 Nov. 6, 2019, 3:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 7851 ) B 0-1 MST PROGRAMMING dfs and similar ds graphs sortings 1900

B"Ujan has a lot of useless stuff in his drawers, a considerable part of which are his math notebooks: it is time to sort them out. This time he found an old dusty graph theory notebook with a description of a graph. It is an undirected weighted graph on n vertices. It is a complete graph: each pair of vertices is connected by an edge. The weight of each edge is either 0 or 1 ; exactly m edges have weight 1 , and all others have weight 0 . Since Ujan doesn't really want to organize his notes, he decided to find the weight of the minimum spanning tree of the graph. (The weight of a spanning tree is the sum of all its edges.) Can you find the answer for Ujan so he stops procrastinating? The first line of the input contains two integers n and m ( 1 <= q n <= q 10^5 , 0 <= q m <= q min( frac{n(n-1)}{2},10^5) ), the number of vertices and the number of edges of weight 1 in the graph. The i -th of the next m lines contains two integers a_i and b_i ( 1 <= q a_i, b_i <= q n , a_i neq b_i ), the endpoints of the i -th edge of weight 1 . It is guaranteed that no edge appears twice in the input. Output a single integer, the weight of the minimum spanning tree of the graph. The graph from the first sample is shown below. Dashed edges have weight 0 , other edges have weight 1 . One of the minimum spanning trees is highlighted in orange and has total weight 2 . In the second sample, all edges have weight 0 so any spanning tree has total weight 0 . "...

Tutorials

Codeforces Round #599 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
64388785 Gassa B Nov. 6, 2019, 3:38 p.m. OK D TESTS 85 187 36454400 1900
64399369 hos.lyric B Nov. 6, 2019, 4:06 p.m. OK D TESTS 85 295 22425600 1900
64423261 physics0523 B Nov. 6, 2019, 6:22 p.m. OK GNU C11 TESTS 85 124 11571200 1900
64435308 dysyn1314 B Nov. 7, 2019, 12:51 a.m. OK GNU C++11 TESTS 86 31 3072000 1900
66146123 vrsashly B Dec. 1, 2019, 4:39 p.m. OK GNU C++11 TESTS 88 31 3584000 1900
64439303 luogu_bot2 B Nov. 7, 2019, 3:19 a.m. OK GNU C++11 TESTS 86 46 2662400 1900
64451666 pkh68 B Nov. 7, 2019, 7:18 a.m. OK GNU C++11 TESTS 86 46 2662400 1900
64592587 Q612 B Nov. 9, 2019, 3:19 p.m. OK GNU C++11 TESTS 88 46 3072000 1900
64469833 FALLEN_GEMINI B Nov. 7, 2019, 12:46 p.m. OK GNU C++11 TESTS 86 46 3379200 1900
64567228 chenmingyu B Nov. 9, 2019, 8:03 a.m. OK GNU C++11 TESTS 88 46 3481600 1900
65445150 Imperfect B Nov. 20, 2019, 3:42 p.m. OK GNU C++11 TESTS 88 46 3584000 1900
65023766 M_sea B Nov. 15, 2019, 6:37 a.m. OK GNU C++11 TESTS 88 46 3584000 1900
68978767 The_Crossing B Jan. 17, 2020, 9:52 a.m. OK GNU C++11 TESTS 88 46 3584000 1900
64627022 BeNoble B Nov. 10, 2019, 8:52 a.m. OK GNU C++14 TESTS 88 31 6144000 1900
64441340 huyvp B Nov. 7, 2019, 4:30 a.m. OK GNU C++14 TESTS 86 62 3788800 1900
66393755 xuziling B Dec. 6, 2019, 10:02 a.m. OK GNU C++14 TESTS 88 62 6144000 1900
64476137 Ruxandra985 B Nov. 7, 2019, 2:26 p.m. OK GNU C++14 TESTS 86 62 8192000 1900
64421571 tokitsukaze B Nov. 6, 2019, 5:58 p.m. OK GNU C++14 TESTS 85 62 8704000 1900
64474066 ywsama B Nov. 7, 2019, 1:52 p.m. OK GNU C++14 TESTS 86 62 54272000 1900
65165197 sdnr1 B Nov. 16, 2019, 1:01 p.m. OK GNU C++14 TESTS 88 77 3379200 1900
64426509 MiricaMatei B Nov. 6, 2019, 7:22 p.m. OK GNU C++14 TESTS 85 77 4710400 1900
64426384 MiricaMatei B Nov. 6, 2019, 7:20 p.m. OK GNU C++14 TESTS 85 77 4915200 1900
64389618 New_God B Nov. 6, 2019, 3:40 p.m. OK GNU C++14 TESTS 85 77 5017600 1900
66363670 wzz-huchi B Dec. 5, 2019, 6:39 p.m. OK GNU C++17 TESTS 88 62 3481600 1900
66253165 VioletSaber B Dec. 4, 2019, 3:56 a.m. OK GNU C++17 TESTS 88 62 3891200 1900
66185378 SheepRanger B Dec. 2, 2019, 2:16 p.m. OK GNU C++17 TESTS 88 62 5529600 1900
65446803 vjudge4 B Nov. 20, 2019, 4:18 p.m. OK GNU C++17 TESTS 88 62 5734400 1900
65327241 RedStar_13 B Nov. 19, 2019, 2:48 a.m. OK GNU C++17 TESTS 88 62 5939200 1900
64442572 GusMG B Nov. 7, 2019, 5:07 a.m. OK GNU C++17 TESTS 86 62 5939200 1900
65569046 vjudge2 B Nov. 23, 2019, 7:09 a.m. OK GNU C++17 TESTS 88 62 6553600 1900
64443966 Dongyu1997 B Nov. 7, 2019, 5:45 a.m. OK GNU C++17 TESTS 86 62 6553600 1900
65464294 vjudge1 B Nov. 21, 2019, 4:53 a.m. OK GNU C++17 TESTS 88 62 6963200 1900
65525713 vjudge5 B Nov. 22, 2019, 10:18 a.m. OK GNU C++17 TESTS 88 62 6963200 1900
64441005 Garett B Nov. 7, 2019, 4:19 a.m. OK Java 11 TESTS 86 217 0 1900
64432558 sarthakmanna B Nov. 6, 2019, 10:19 p.m. OK Java 11 TESTS 85 763 32051200 1900
64432580 sarthakmanna B Nov. 6, 2019, 10:20 p.m. OK Java 11 TESTS 85 779 32051200 1900
64450340 In_The_Name_Of_Love B Nov. 7, 2019, 6:50 a.m. OK Java 8 TESTS 86 140 0 1900
64379971 uwi B Nov. 6, 2019, 3:19 p.m. OK Java 8 TESTS 85 156 0 1900
64383093 Taran_1407 B Nov. 6, 2019, 3:25 p.m. OK Java 8 TESTS 85 187 0 1900
64714863 beroul B Nov. 11, 2019, 9:04 p.m. OK Java 8 TESTS 88 202 19148800 1900
64436280 cwise B Nov. 7, 2019, 1:31 a.m. OK Java 8 TESTS 86 217 48640000 1900
64395165 fetetriste B Nov. 6, 2019, 3:54 p.m. OK Java 8 TESTS 85 264 2560000 1900
64400419 DarLam B Nov. 6, 2019, 4:09 p.m. OK Java 8 TESTS 85 264 5836800 1900
67462138 manish_98 B Dec. 23, 2019, 9:36 a.m. OK Java 8 TESTS 88 296 36147200 1900
64470839 chojh1222 B Nov. 7, 2019, 1:02 p.m. OK Java 8 TESTS 86 327 17100800 1900
66608952 Ahmad B Dec. 10, 2019, 8:06 p.m. OK Java 8 TESTS 88 327 18124800 1900
64498721 Spheniscine B Nov. 8, 2019, 2:34 a.m. OK Kotlin TESTS 88 234 716800 1900
64387553 Tlatoani B Nov. 6, 2019, 3:35 p.m. OK Kotlin TESTS 85 779 32665600 1900
64402633 Yupiteru B Nov. 6, 2019, 4:16 p.m. OK Mono C# TESTS 85 234 171622400 1900
64398404 keymoon B Nov. 6, 2019, 4:03 p.m. OK Mono C# TESTS 85 265 25190400 1900
66256729 camypaper B Dec. 4, 2019, 6:22 a.m. OK Mono C# TESTS 88 390 18944000 1900
66637186 vjudge1 B Dec. 11, 2019, 1:22 p.m. OK MS C++ TESTS 88 171 16281600 1900
64404284 tarattata1 B Nov. 6, 2019, 4:21 p.m. OK MS C++ TESTS 85 187 14540800 1900
69688790 vjudge5 B Jan. 28, 2020, 5:55 p.m. OK MS C++ TESTS 88 561 211660800 1900
64444192 taekop B Nov. 7, 2019, 5:51 a.m. OK MS C++ 2017 TESTS 86 109 3584000 1900
64578227 Miris B Nov. 9, 2019, 11:21 a.m. OK MS C++ 2017 TESTS 88 155 10649600 1900
65596910 vjudge5 B Nov. 23, 2019, 4:16 p.m. OK MS C++ 2017 TESTS 88 155 15769600 1900
65427561 vjudge3 B Nov. 20, 2019, 11:09 a.m. OK MS C++ 2017 TESTS 88 171 15769600 1900
65427377 BambooCertain B Nov. 20, 2019, 11:06 a.m. OK MS C++ 2017 TESTS 88 202 15769600 1900
64415965 AlexanderL B Nov. 6, 2019, 4:59 p.m. OK MS C++ 2017 TESTS 85 217 4710400 1900
65763613 EgorShibaev B Nov. 26, 2019, 4:55 p.m. OK MS C++ 2017 TESTS 88 233 6963200 1900
64456197 MIG29 B Nov. 7, 2019, 8:48 a.m. OK MS C++ 2017 TESTS 86 233 8601600 1900
68462772 beemax B Jan. 9, 2020, 6:46 p.m. OK MS C++ 2017 TESTS 88 234 28774400 1900
68090828 MT_07 B Jan. 2, 2020, 6:05 p.m. OK MS C++ 2017 TESTS 88 249 11673600 1900
69518970 anshuman16423 B Jan. 25, 2020, 12:52 p.m. OK PyPy 2 TESTS 88 451 41062400 1900
64387104 alexwice B Nov. 6, 2019, 3:34 p.m. OK PyPy 2 TESTS 85 514 23654400 1900
64530770 meooow B Nov. 8, 2019, 3:21 p.m. OK PyPy 3 TESTS 88 374 20070400 1900
66367210 hatake_ B Dec. 5, 2019, 7:56 p.m. OK PyPy 3 TESTS 88 389 19353600 1900
64483943 rmyak B Nov. 7, 2019, 5 p.m. OK PyPy 3 TESTS 86 420 33996800 1900
67177902 wishcode B Dec. 18, 2019, 8:19 p.m. OK PyPy 3 TESTS 88 452 18432000 1900
64414831 titia B Nov. 6, 2019, 4:56 p.m. OK PyPy 3 TESTS 85 452 32460800 1900
67177008 shelam B Dec. 18, 2019, 7:50 p.m. OK PyPy 3 TESTS 88 514 17100800 1900
64414198 Kiri8128 B Nov. 6, 2019, 4:54 p.m. OK PyPy 3 TESTS 85 530 28672000 1900
65466759 ratatat B Nov. 21, 2019, 6:25 a.m. OK PyPy 3 TESTS 88 904 34918400 1900
64531140 meooow B Nov. 8, 2019, 3:28 p.m. OK PyPy 3 TESTS 88 951 19968000 1900
67929362 codershuvo B Dec. 29, 2019, 5:12 p.m. OK PyPy 3 TESTS 88 951 21299200 1900
64423730 nwi B Nov. 6, 2019, 6:31 p.m. OK Python 2 TESTS 85 358 30105600 1900
65577763 vishnutheerthep B Nov. 23, 2019, 9:59 a.m. OK Python 3 TESTS 88 888 8294400 1900
64791794 sansen B Nov. 13, 2019, 11:28 a.m. OK Rust TESTS 88 61 6963200 1900
64791734 sansen B Nov. 13, 2019, 11:27 a.m. OK Rust TESTS 88 61 6963200 1900
64792169 sansen B Nov. 13, 2019, 11:37 a.m. OK Rust TESTS 88 62 12595200 1900
64404158 yoshrc B Nov. 6, 2019, 4:21 p.m. OK Rust TESTS 85 140 12595200 1900
68042582 gearjack B Jan. 1, 2020, 2:58 p.m. OK Rust TESTS 88 171 14848000 1900

remove filters

Back to search problems