Codeforces Round 494 (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
1003 Codeforces Round 494 (Div. 3) FINISHED False 7200 206551463 July 3, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2765 ) E Tree Constructing PROGRAMMING constructive algorithms graphs 2200

B'You are given three integers n , d and k . Your task is to construct an undirected tree on n vertices with diameter d and degree of each vertex at most k , or say that it is impossible. An undirected tree is a connected undirected graph with n - 1 edges. Diameter of a tree is the maximum length of a simple path (a path in which each vertex appears at most once) between all pairs of vertices of this tree. Degree of a vertex is the number of edges incident to this vertex (i.e. for a vertex u it is the number of edges (u, v) that belong to the tree, where v is any other vertex of a tree). The first line of the input contains three integers n , d and k ( 1 <= n, d, k <= 4 cdot 10^5 ). If there is no tree satisfying the conditions above, print only one word "NO" (without quotes). Otherwise in the first line print "YES" (without quotes), and then print n - 1 lines describing edges of a tree satisfying the conditions above. Vertices of the tree must be numbered from 1 to n . You can print edges and vertices connected by an edge in any order. If there are multiple answers, print any of them.1 '...

Tutorials

60417

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
39925183 Mr.Universe E July 3, 2018, 4:24 p.m. OK GNU C++ TESTS 59 1216 43724800 2200
39927125 abhishekk781 E July 3, 2018, 4:32 p.m. OK GNU C++ TESTS 59 1247 12902400 2200
39924513 hkbishwa E July 3, 2018, 4:21 p.m. OK GNU C++11 TESTS 59 156 15974400 2200
39919143 ladyjy E July 3, 2018, 3:56 p.m. OK GNU C++11 TESTS 59 217 15360000 2200
39920705 sudoBug E July 3, 2018, 4:03 p.m. OK GNU C++11 TESTS 59 421 8704000 2200
39917808 Subaru E July 3, 2018, 3:51 p.m. OK GNU C++11 TESTS 59 452 14336000 2200
39925403 Yash23 E July 3, 2018, 4:25 p.m. OK GNU C++11 TESTS 59 482 24268800 2200
39926556 dahao E July 3, 2018, 4:30 p.m. OK GNU C++11 TESTS 59 483 33484800 2200
39926899 Andres_Alumets E July 3, 2018, 4:31 p.m. OK GNU C++11 TESTS 59 514 23449600 2200
39912621 CelesteLight E July 3, 2018, 3:30 p.m. OK GNU C++11 TESTS 59 1200 6348800 2200
39921234 huangkui123 E July 3, 2018, 4:06 p.m. OK GNU C++11 TESTS 59 1216 5120000 2200
39916485 modestas_ E July 3, 2018, 3:45 p.m. OK GNU C++14 TESTS 59 140 9830400 2200
39917335 CrownJJ E July 3, 2018, 3:49 p.m. OK GNU C++14 TESTS 59 155 6348800 2200
39926717 Arslan94 E July 3, 2018, 4:30 p.m. OK GNU C++14 TESTS 59 155 24064000 2200
39917540 PerfectPan325 E July 3, 2018, 3:50 p.m. OK GNU C++14 TESTS 59 171 13004800 2200
39908097 peanutpedo20 E July 3, 2018, 3:14 p.m. OK GNU C++14 TESTS 59 186 17100800 2200
39924193 Mr.HP E July 3, 2018, 4:19 p.m. OK GNU C++14 TESTS 59 187 9420800 2200
39921620 Passioncoder E July 3, 2018, 4:08 p.m. OK GNU C++14 TESTS 59 187 13824000 2200
39923509 Bnahmad15 E July 3, 2018, 4:16 p.m. OK GNU C++14 TESTS 59 202 18022400 2200
39925337 ec2017.1 E July 3, 2018, 4:24 p.m. OK GNU C++14 TESTS 59 265 24780800 2200
39925687 YuGo E July 3, 2018, 4:26 p.m. OK GNU C++14 TESTS 59 296 83456000 2200

remove filters

Back to search problems