Codeforces Round 544 (Div. 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
1133 Codeforces Round 544 (Div. 3) FINISHED False 7200 179852099 March 7, 2019, 3:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 7888 ) F1 Spanning Tree with Maximum Degree PROGRAMMING graphs 1600

B"You are given an undirected unweighted connected graph consisting of n vertices and m edges. It is guaranteed that there are no self-loops or multiple edges in the given graph. Your task is to find any spanning tree of this graph such that the maximum degree over all vertices is maximum possible. Recall that the degree of a vertex is the number of edges incident to it. The first line contains two integers n and m ( 2 <= n <= 2 cdot 10^5 , n - 1 <= m <= min(2 cdot 10^5, frac{n(n-1)}{2}) ) -- the number of vertices and edges, respectively. The following m lines denote edges: edge i is represented by a pair of integers v_i , u_i ( 1 <= v_i, u_i <= n , u_i ne v_i ), which are the indices of vertices connected by the edge. There are no loops or multiple edges in the given graph, i. xe2 x80 x89e. for each pair ( v_i, u_i ) there are no other pairs ( v_i, u_i ) or ( u_i, v_i ) in the list of edges, and for each pair (v_i, u_i) the condition v_i ne u_i is satisfied. Print n-1 lines describing the edges of a spanning tree such that the maximum degree over all vertices is maximum possible. Make sure that the edges of the printed spanning tree form some subset of the input edges (order doesn't matter and edge (v, u) is considered the same as the edge (u, v) ). If there are multiple possible answers, print any of them. Picture corresponding to the first example: In this example the number of edges of spanning tree incident to the vertex 3 is 3 . It is the maximum degree over all vertices of the spanning tree. It is easy to see that we cannot obtain a better answer. Picture corresponding to the second example: In this example the number of edges of spanning tree incident to the vertex 1 is 3 . It is the maximum degree over all vertices of the spanning tree. It is easy to see that we cannot obtain a better answer. Picture corresponding to "...

Tutorials

Codeforces Round #544 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
51616870 KingsNeverDie F1 March 21, 2019, 12:46 p.m. OK Clang++17 Diagnostics TESTS 29 1013 36044800 1600
54491611 Denor F1 May 22, 2019, 3:42 p.m. OK Delphi TESTS 29 1356 10137600 1600
52291278 omlgg jamienguyen d4rkn19ht F1 April 4, 2019, 1:59 a.m. OK FPC TESTS 29 701 3174400 1600
54420168 rainboy F1 May 20, 2019, 2:57 p.m. OK GNU C11 TESTS 29 810 3379200 1600
58558387 vjudge2 F1 Aug. 11, 2019, 4 a.m. OK GNU C++11 TESTS 29 78 13209600 1600
58564411 luogu_bot5 F1 Aug. 11, 2019, 7:17 a.m. OK GNU C++11 TESTS 29 93 6758400 1600
58988570 luogu_bot5 F1 Aug. 18, 2019, 8:13 a.m. OK GNU C++11 TESTS 29 93 7680000 1600
59123324 luogu_bot4 F1 Aug. 20, 2019, 7:03 a.m. OK GNU C++11 TESTS 29 93 11264000 1600
58556794 vjudge1 F1 Aug. 11, 2019, 2:32 a.m. OK GNU C++11 TESTS 29 93 17305600 1600
59123917 devout F1 Aug. 20, 2019, 7:26 a.m. OK GNU C++11 TESTS 29 93 18124800 1600
59333632 PoTAto0O1 F1 Aug. 23, 2019, 3:03 a.m. OK GNU C++11 TESTS 29 108 7680000 1600
58562905 luogu_bot1 F1 Aug. 11, 2019, 6:37 a.m. OK GNU C++11 TESTS 29 108 17305600 1600
59124032 luogu_bot3 F1 Aug. 20, 2019, 7:31 a.m. OK GNU C++11 TESTS 29 108 18124800 1600
59193940 luogu_bot1 F1 Aug. 20, 2019, 11:59 p.m. OK GNU C++11 TESTS 29 108 18124800 1600
54057880 swqeaaa F1 May 13, 2019, 9:26 a.m. OK GNU C++14 TESTS 29 140 5632000 1600
61814391 vjudge3 F1 Oct. 4, 2019, 1:23 a.m. OK GNU C++14 TESTS 29 140 7987200 1600
51219383 Heltion F1 March 12, 2019, 11:53 a.m. OK GNU C++14 TESTS 29 155 3891200 1600
54519287 MieLLO F1 May 23, 2019, 11:35 a.m. OK GNU C++14 TESTS 29 155 4812800 1600
58559212 vjudge1 F1 Aug. 11, 2019, 4:39 a.m. OK GNU C++14 TESTS 29 155 5836800 1600
51100429 tbzard F1 March 9, 2019, 6:41 p.m. OK GNU C++14 TESTS 29 155 6348800 1600
51087921 cuiaoxiang F1 March 9, 2019, 1:43 p.m. OK GNU C++14 TESTS 29 155 6451200 1600
61757591 Carits F1 Oct. 3, 2019, 6:05 a.m. OK GNU C++14 TESTS 29 155 7987200 1600
51262346 rezaulhsagar F1 March 13, 2019, 1:52 p.m. OK GNU C++14 TESTS 29 156 6963200 1600
61817042 vjudge2 F1 Oct. 4, 2019, 1:29 a.m. OK GNU C++14 TESTS 29 171 5632000 1600
51564152 kessido F1 March 20, 2019, 9:04 a.m. OK GNU C++17 TESTS 29 109 3174400 1600
51563377 kessido F1 March 20, 2019, 8:48 a.m. OK GNU C++17 TESTS 29 109 7168000 1600
51564210 kessido F1 March 20, 2019, 9:05 a.m. OK GNU C++17 TESTS 29 124 3174400 1600
51563571 kessido F1 March 20, 2019, 8:52 a.m. OK GNU C++17 TESTS 29 124 7168000 1600
51231719 hansc0320 F1 March 12, 2019, 4:35 p.m. OK GNU C++17 TESTS 29 140 4608000 1600
51105784 .tx F1 March 9, 2019, 10:17 p.m. OK GNU C++17 TESTS 29 140 8396800 1600
51110017 yoshinoz F1 March 10, 2019, 3:33 a.m. OK GNU C++17 TESTS 29 155 6553600 1600
51406589 qpzm F1 March 17, 2019, 10:10 a.m. OK GNU C++17 TESTS 29 155 7168000 1600
51134034 ILLLZKQF F1 March 10, 2019, 3:06 p.m. OK GNU C++17 TESTS 29 155 8806400 1600
52767098 Hugh_Locke F1 April 15, 2019, 5:07 a.m. OK GNU C++17 TESTS 29 156 6348800 1600
64606293 sushant_verma F1 Nov. 9, 2019, 8:53 p.m. OK Java 11 TESTS 29 2012 33484800 1600
68030247 zhanyi_xiaolu F1 Jan. 1, 2020, 8:49 a.m. OK Java 11 TESTS 29 2214 42291200 1600
54976772 cribabby F1 June 2, 2019, 11:13 a.m. OK Java 8 TESTS 29 249 22425600 1600
51307457 karamkontar F1 March 14, 2019, 5:32 p.m. OK Java 8 TESTS 29 265 14950400 1600
51905001 Whiplash99 F1 March 27, 2019, 3:05 p.m. OK Java 8 TESTS 29 311 14643200 1600
51608594 slatkar1903 F1 March 21, 2019, 8:58 a.m. OK Java 8 TESTS 29 342 17408000 1600
51252105 xodiac F1 March 13, 2019, 9:16 a.m. OK Java 8 TESTS 29 405 38195200 1600
69938603 luchy0120 F1 Feb. 1, 2020, 5:13 a.m. OK Java 8 TESTS 29 436 41369600 1600
51367240 solarbeam F1 March 16, 2019, 10:16 a.m. OK Java 8 TESTS 29 498 41164800 1600
55979017 Lior F1 June 23, 2019, 7:29 p.m. OK Java 8 TESTS 29 499 39628800 1600
63946020 Agnimandur F1 Oct. 31, 2019, 6:59 p.m. OK Java 8 TESTS 29 499 40243200 1600
51158786 Jarik F1 March 11, 2019, 11:24 a.m. OK Java 8 TESTS 29 514 33792000 1600
51567486 Killer45 F1 March 20, 2019, 10:19 a.m. OK Kotlin TESTS 29 623 59904000 1600
56408983 sashamc F1 July 1, 2019, 9:32 p.m. OK Kotlin TESTS 29 2386 73420800 1600
51120369 Mosyagin F1 March 10, 2019, 8:57 a.m. OK Mono C# TESTS 29 529 35430400 1600
52635728 denisdenisdenis F1 April 12, 2019, 9:54 a.m. OK Mono C# TESTS 29 1122 21299200 1600
51820184 NEvOl F1 March 25, 2019, 11:39 a.m. OK Mono C# TESTS 29 1419 34918400 1600
51204877 qcwlmqy F1 March 12, 2019, 3:52 a.m. OK MS C++ TESTS 29 139 3891200 1600
54453096 scorpiowf F1 May 21, 2019, 2:30 p.m. OK MS C++ TESTS 29 139 3993600 1600
61761314 vjudge2 F1 Oct. 3, 2019, 7:11 a.m. OK MS C++ TESTS 29 139 6041600 1600
52068246 vjudge1 F1 March 31, 2019, 6:36 a.m. OK MS C++ TESTS 29 187 8908800 1600
52068147 ACM_Dragon F1 March 31, 2019, 6:34 a.m. OK MS C++ TESTS 29 187 8908800 1600
51093898 hyacinthusorientalis F1 March 9, 2019, 3:28 p.m. OK MS C++ TESTS 29 187 10342400 1600
51212210 vjudge1 F1 March 12, 2019, 8:34 a.m. OK MS C++ TESTS 29 202 9932800 1600
52067268 vjudge3 F1 March 31, 2019, 6:07 a.m. OK MS C++ TESTS 29 217 8908800 1600
51575510 vjudge5 F1 March 20, 2019, 12:49 p.m. OK MS C++ TESTS 29 217 8908800 1600
52467888 vjudge3 F1 April 7, 2019, 4:46 p.m. OK MS C++ TESTS 29 420 169369600 1600
53033056 zzq233 F1 April 20, 2019, 3:39 a.m. OK MS C++ 2017 TESTS 29 234 7372800 1600
58693642 ZSTU-2018329621261 F1 Aug. 13, 2019, 4:54 a.m. OK MS C++ 2017 TESTS 29 265 7372800 1600
53727989 moreda F1 May 4, 2019, 5:42 a.m. OK MS C++ 2017 TESTS 29 561 7987200 1600
51534967 Husne_Matar F1 March 19, 2019, 4:55 p.m. OK MS C++ 2017 TESTS 29 592 7987200 1600
51825451 yomyom0824 F1 March 25, 2019, 1:48 p.m. OK MS C++ 2017 TESTS 29 592 11776000 1600
55919169 Skeef79 F1 June 22, 2019, 6:45 a.m. OK MS C++ 2017 TESTS 29 623 7168000 1600
51143902 Boryan07 F1 March 10, 2019, 9:31 p.m. OK MS C++ 2017 TESTS 29 639 7987200 1600
51593987 Still_Theory F1 March 20, 2019, 8:24 p.m. OK MS C++ 2017 TESTS 29 639 11366400 1600
53107413 SendThemToHell F1 April 21, 2019, 9:21 p.m. OK MS C++ 2017 TESTS 29 982 24473600 1600
51474417 lechinhin F1 March 19, 2019, 8:32 a.m. OK MS C++ 2017 TESTS 29 1232 10137600 1600
51161628 gatsko F1 March 11, 2019, 12:38 p.m. OK PyPy 2 TESTS 29 639 77516800 1600
51428100 vjudge2 F1 March 17, 2019, 8:47 p.m. OK PyPy 2 TESTS 29 2605 111616000 1600
51826740 Leendertz F1 March 25, 2019, 2:17 p.m. OK PyPy 3 TESTS 29 654 45056000 1600
51824040 Leendertz F1 March 25, 2019, 1:18 p.m. OK PyPy 3 TESTS 29 717 32358400 1600
51416580 yfo F1 March 17, 2019, 2:19 p.m. OK PyPy 3 TESTS 29 763 34099200 1600
51416554 yfo F1 March 17, 2019, 2:19 p.m. OK PyPy 3 TESTS 29 935 29900800 1600
51086308 III_Wolverine_III F1 March 9, 2019, 1:10 p.m. OK PyPy 3 TESTS 29 936 43417600 1600
52745453 rookzeno F1 April 14, 2019, 11:25 a.m. OK PyPy 3 TESTS 29 997 45260800 1600
51657740 ien49fh F1 March 21, 2019, 11:12 p.m. OK PyPy 3 TESTS 29 1122 72704000 1600
60193210 nagato1208 F1 Sept. 6, 2019, 11:08 p.m. OK PyPy 3 TESTS 29 2121 45056000 1600
62889811 vjudge2 F1 Oct. 18, 2019, 7:54 p.m. OK PyPy 3 TESTS 29 2136 29081600 1600
51820571 Leendertz F1 March 25, 2019, 11:51 a.m. OK PyPy 3 TESTS 29 2152 35532800 1600
55073374 shubhankarsharma00 F1 June 4, 2019, 7:23 a.m. OK Python 2 TESTS 29 1247 36864000 1600
51152555 Uranux F1 March 11, 2019, 8:47 a.m. OK Python 2 TESTS 29 1357 40038400 1600
54844923 musayime F1 May 30, 2019, 1:24 p.m. OK Python 2 TESTS 29 1388 40038400 1600
51428085 odraude F1 March 17, 2019, 8:46 p.m. OK Python 2 TESTS 29 1715 79974400 1600
51428133 vjudge4 F1 March 17, 2019, 8:49 p.m. OK Python 2 TESTS 29 1824 79974400 1600
51577788 allonsy_kim F1 March 20, 2019, 1:30 p.m. OK Python 2 TESTS 29 2714 33689600 1600
51826791 Leendertz F1 March 25, 2019, 2:18 p.m. OK Python 3 TESTS 29 1232 36864000 1600
54062211 gaidash F1 May 13, 2019, 11:45 a.m. OK Python 3 TESTS 29 1325 20070400 1600
56683639 vjudge5 F1 July 7, 2019, 8:18 p.m. OK Python 3 TESTS 29 1450 20377600 1600
53458851 ayejayys F1 April 28, 2019, 5:45 a.m. OK Python 3 TESTS 29 1528 35123200 1600
51086284 III_Wolverine_III F1 March 9, 2019, 1:09 p.m. OK Python 3 TESTS 29 1574 36044800 1600
56606427 brosucks F1 July 6, 2019, 4:58 a.m. OK Python 3 TESTS 29 1699 21094400 1600
51166466 Orion F1 March 11, 2019, 2:28 p.m. OK Python 3 TESTS 29 1716 30924800 1600
51086232 III_Wolverine_III F1 March 9, 2019, 1:09 p.m. OK Python 3 TESTS 29 1716 36044800 1600
51820727 Leendertz F1 March 25, 2019, 11:55 a.m. OK Python 3 TESTS 29 1730 25600000 1600
56434367 PlusZero F1 July 2, 2019, 1:29 p.m. OK Python 3 TESTS 29 1731 35942400 1600
55405991 kobae964 F1 June 10, 2019, 4:34 p.m. OK Rust TESTS 29 249 13414400 1600
51336626 yakamoto F1 March 15, 2019, 2:28 p.m. OK Scala TESTS 29 701 17510400 1600

remove filters

Back to search problems