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
( 3388 ) F2 Spanning Tree with One Fixed Degree PROGRAMMING constructive algorithms dfs and similar ds graphs greedy 2200

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 degree of the first vertex (vertex with label 1 on it) is equal to D (or say that there are no such spanning trees). Recall that the degree of a vertex is the number of edges incident to it. The first line contains three integers n , m and D ( 2 <= n <= 2 cdot 10^5 , n - 1 <= m <= min(2 cdot 10^5, frac{n(n-1)}{2}), 1 <= D < n ) -- the number of vertices, the number of edges and required degree of the first vertex, 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. If there is no spanning tree satisfying the condition from the problem statement, print "NO" in the first line. Otherwise print "YES" in the first line and then print n-1 lines describing the edges of a spanning tree such that the degree of the first vertex (vertex with label 1 on it) is equal to D . 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. The picture corresponding to the first and second examples: The picture corresponding to the third example: '...

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
54493650 Denor F2 May 22, 2019, 4:36 p.m. OK Delphi TESTS 107 186 82124800 2200
56951804 JackF F2 July 13, 2019, 2:33 a.m. OK FPC TESTS 107 670 15052800 2200
54419949 rainboy F2 May 20, 2019, 2:51 p.m. OK GNU C11 TESTS 107 717 3379200 2200
51254624 xiezichen F2 March 13, 2019, 10:39 a.m. OK GNU C++11 TESTS 107 78 9932800 2200
52733170 vjudge5 F2 April 14, 2019, 5:07 a.m. OK GNU C++11 TESTS 107 93 14233600 2200
52994350 xielinhan F2 April 19, 2019, 2:23 a.m. OK GNU C++11 TESTS 107 93 14233600 2200
56777524 nwpu2018302329 F2 July 10, 2019, 3:43 a.m. OK GNU C++11 TESTS 107 109 9113600 2200
51941029 woshimolei F2 March 28, 2019, 2:29 p.m. OK GNU C++11 TESTS 107 124 5222400 2200
60529015 Liah F2 Sept. 14, 2019, 11:34 a.m. OK GNU C++11 TESTS 107 124 5222400 2200
51446821 yaoling1997 F2 March 18, 2019, 12:53 p.m. OK GNU C++11 TESTS 107 124 7782400 2200
52955548 bitetheDDDDt F2 April 18, 2019, 1:37 p.m. OK GNU C++11 TESTS 107 124 11161600 2200
51118698 swust5120175184 F2 March 10, 2019, 8:11 a.m. OK GNU C++11 TESTS 107 124 13312000 2200
52821743 tyzc F2 April 16, 2019, 12:17 p.m. OK GNU C++11 TESTS 107 124 14438400 2200
51115167 tokitsukaze F2 March 10, 2019, 6:35 a.m. OK GNU C++14 TESTS 107 109 21094400 2200
51330595 Samaritan123 F2 March 15, 2019, noon OK GNU C++14 TESTS 107 139 5939200 2200
60894427 imulan F2 Sept. 19, 2019, 6:09 p.m. OK GNU C++14 TESTS 107 139 7065600 2200
51092056 gsoares F2 March 9, 2019, 2:41 p.m. OK GNU C++14 TESTS 107 140 6553600 2200
52593918 Koo_ F2 April 11, 2019, 7:42 a.m. OK GNU C++14 TESTS 107 140 8704000 2200
51472549 zzxzzx F2 March 19, 2019, 7:29 a.m. OK GNU C++14 TESTS 107 155 5529600 2200
51950646 Aleks5d F2 March 28, 2019, 7:56 p.m. OK GNU C++14 TESTS 107 155 7680000 2200
51860302 opooopooo F2 March 26, 2019, 12:52 p.m. OK GNU C++14 TESTS 107 155 7782400 2200
59825903 MaGaroo F2 Aug. 31, 2019, 7:29 p.m. OK GNU C++14 TESTS 107 155 7987200 2200
51243421 alurquiza F2 March 13, 2019, 1:53 a.m. OK GNU C++14 TESTS 107 156 7884800 2200
51564871 kessido F2 March 20, 2019, 9:20 a.m. OK GNU C++17 TESTS 107 109 9113600 2200
51105915 .tx F2 March 9, 2019, 10:26 p.m. OK GNU C++17 TESTS 107 109 24166400 2200
51105902 .tx F2 March 9, 2019, 10:25 p.m. OK GNU C++17 TESTS 107 109 28979200 2200
51131807 648771054 F2 March 10, 2019, 2:02 p.m. OK GNU C++17 TESTS 107 140 3993600 2200
51429058 lys1280023 F2 March 17, 2019, 9:38 p.m. OK GNU C++17 TESTS 107 140 4198400 2200
52420379 oToToT F2 April 6, 2019, 4:50 p.m. OK GNU C++17 TESTS 107 140 8294400 2200
54470635 zstu-mile F2 May 22, 2019, 5:12 a.m. OK GNU C++17 TESTS 107 140 10444800 2200
52770896 henu-wxj F2 April 15, 2019, 8:44 a.m. OK GNU C++17 TESTS 107 140 11571200 2200
64065663 vjudge5 F2 Nov. 2, 2019, 5:40 a.m. OK GNU C++17 TESTS 107 140 11980800 2200
52806651 ken_love_rin F2 April 16, 2019, 5:17 a.m. OK GNU C++17 TESTS 107 140 12492800 2200
51087137 Anonymous F2 March 9, 2019, 1:29 p.m. OK Java 8 TESTS 107 202 4198400 2200
51309753 karamkontar F2 March 14, 2019, 6:41 p.m. OK Java 8 TESTS 107 342 20787200 2200
56747015 abdomisan F2 July 9, 2019, 10:13 a.m. OK Java 8 TESTS 107 373 41062400 2200
51112532 amolpratap007 F2 March 10, 2019, 5:19 a.m. OK Java 8 TESTS 107 389 41267200 2200
60660086 gamesterrex F2 Sept. 16, 2019, 4:01 a.m. OK Java 8 TESTS 107 420 62771200 2200
59537922 beginner1010 F2 Aug. 26, 2019, 5:40 p.m. OK Java 8 TESTS 107 421 55705600 2200
69938281 luchy0120 F2 Feb. 1, 2020, 5:06 a.m. OK Java 8 TESTS 107 436 54681600 2200
69938074 luchy0120 F2 Feb. 1, 2020, 5 a.m. OK Java 8 TESTS 107 452 50892800 2200
51269378 polyakoff F2 March 13, 2019, 5:13 p.m. OK Java 8 TESTS 107 467 33484800 2200
51196125 mashinist F2 March 11, 2019, 7:11 p.m. OK Java 8 TESTS 107 483 29798400 2200
51389940 Mosyagin F2 March 16, 2019, 9:29 p.m. OK Mono C# TESTS 107 577 44134400 2200
58701424 ZSTU-2018329621261 F2 Aug. 13, 2019, 7:57 a.m. OK MS C++ 2017 TESTS 107 467 29491200 2200
53729448 moreda F2 May 4, 2019, 6:24 a.m. OK MS C++ 2017 TESTS 107 483 10342400 2200
51887769 yomyom0824 F2 March 27, 2019, 7:24 a.m. OK MS C++ 2017 TESTS 107 499 16896000 2200
51887806 yomyom0824 F2 March 27, 2019, 7:25 a.m. OK MS C++ 2017 TESTS 107 514 16896000 2200
51887335 yomyom0824 F2 March 27, 2019, 7:09 a.m. OK MS C++ 2017 TESTS 107 530 16281600 2200
51887560 yomyom0824 F2 March 27, 2019, 7:17 a.m. OK MS C++ 2017 TESTS 107 545 17715200 2200
51304778 The_Lost_Desu F2 March 14, 2019, 4:15 p.m. OK MS C++ 2017 TESTS 107 577 12697600 2200
53107575 SendThemToHell F2 April 21, 2019, 9:31 p.m. OK MS C++ 2017 TESTS 107 623 24985600 2200
51163057 gatsko F2 March 11, 2019, 1:13 p.m. OK PyPy 2 TESTS 107 888 141926400 2200
51974151 yumtam F2 March 29, 2019, 1:41 p.m. OK PyPy 3 TESTS 107 780 39321600 2200
51658348 ien49fh F2 March 21, 2019, 11:58 p.m. OK PyPy 3 TESTS 107 873 75571200 2200
51658181 ien49fh F2 March 21, 2019, 11:45 p.m. OK PyPy 3 TESTS 107 935 75366400 2200
52754210 rookzeno F2 April 14, 2019, 3:47 p.m. OK PyPy 3 TESTS 107 982 59801600 2200
51098144 mikelopster F2 March 9, 2019, 5:33 p.m. OK PyPy 3 TESTS 107 1996 38092800 2200
51318106 fffeelipe F2 March 15, 2019, 3 a.m. OK PyPy 3 TESTS 107 2339 85196800 2200
51617424 ravitejadonthu1 F2 March 21, 2019, 12:58 p.m. OK Python 3 TESTS 107 1856 42905600 2200
51318301 fffeelipe F2 March 15, 2019, 3:16 a.m. OK Python 3 TESTS 107 2215 54476800 2200
51429970 jonbonto F2 March 17, 2019, 10:39 p.m. OK Python 3 TESTS 107 2573 50483200 2200
65326930 sansen F2 Nov. 19, 2019, 2:29 a.m. OK Rust TESTS 107 109 15667200 2200
55406319 kobae964 F2 June 10, 2019, 4:45 p.m. OK Rust TESTS 107 280 21094400 2200
51367027 yakamoto F2 March 16, 2019, 10:10 a.m. OK Scala TESTS 107 686 26624000 2200

remove filters

Back to search problems