Codeforces Round 510 (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
1042 Codeforces Round 510 (Div. 2) FINISHED False 7200 194651699 Sept. 17, 2018, 8:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1316 ) F Leaf Sets PROGRAMMING data structures dfs and similar ds graphs greedy sortings trees 2400

B"You are given an undirected tree, consisting of n vertices. The vertex is called a leaf if it has exactly one vertex adjacent to it. The distance between some pair of vertices is the number of edges in the shortest path between them. Let's call some set of leaves beautiful if the maximum distance between any pair of leaves in it is less or equal to k . You want to split all leaves into non-intersecting beautiful sets. What is the minimal number of sets in such a split? The first line contains two integers n and k ( 3 <= n <= 10^6 , 1 <= k <= 10^6 ) -- the number of vertices in the tree and the maximum distance between any pair of leaves in each beautiful set. Each of the next n - 1 lines contains two integers v_i and u_i ( 1 <= v_i, u_i <= n ) -- the description of the i -th edge. It is guaranteed that the given edges form a tree. Print a single integer -- the minimal number of beautiful sets the split can have. Here is the graph for the first example: "...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
42992337 fluffyowl F Sept. 17, 2018, 10:59 a.m. OK D TESTS 60 2261 132403200 2400
62307260 fnoi16wjhui F Oct. 10, 2019, 1:30 p.m. OK GNU C++11 TESTS 60 265 71987200 2400
44751562 ReaLNero1 F Oct. 23, 2018, 8:13 p.m. OK GNU C++11 TESTS 60 280 83456000 2400
43000555 ldy419 F Sept. 17, 2018, 1:41 p.m. OK GNU C++11 TESTS 60 280 88064000 2400
54364490 __23333 F May 19, 2019, 12:49 a.m. OK GNU C++11 TESTS 60 280 116121600 2400
62550863 xgzc F Oct. 14, 2019, 8:33 a.m. OK GNU C++11 TESTS 60 296 71884800 2400
44338241 q234rty F Oct. 15, 2018, 12:18 a.m. OK GNU C++11 TESTS 60 296 83456000 2400
43071243 Milky-Way F Sept. 19, 2018, 9:20 a.m. OK GNU C++11 TESTS 60 311 55910400 2400
43710386 genius77777 F Oct. 3, 2018, 3:09 a.m. OK GNU C++11 TESTS 60 311 75878400 2400
43017458 genius77777 F Sept. 18, 2018, 12:58 a.m. OK GNU C++11 TESTS 60 311 75878400 2400
42996242 Wavator F Sept. 17, 2018, 12:09 p.m. OK GNU C++11 TESTS 60 311 78131200 2400
42984734 yirannn F Sept. 17, 2018, 9:18 a.m. OK GNU C++14 TESTS 60 342 71782400 2400
44186404 teafrogsf F Oct. 12, 2018, 1:19 p.m. OK GNU C++14 TESTS 60 405 112332800 2400
42989554 WG6101N F Sept. 17, 2018, 9:53 a.m. OK GNU C++14 TESTS 60 685 106291200 2400
44901543 lu925871076 F Oct. 26, 2018, 9:19 a.m. OK GNU C++14 TESTS 60 686 128204800 2400
44347275 lunch F Oct. 15, 2018, 8:03 a.m. OK GNU C++14 TESTS 60 701 128716800 2400
42988827 FeatherRising F Sept. 17, 2018, 9:48 a.m. OK GNU C++14 TESTS 60 748 64000000 2400
42992696 wleung_bvg F Sept. 17, 2018, 11:03 a.m. OK GNU C++14 TESTS 60 764 108339200 2400
43166258 Lynstery F Sept. 21, 2018, 5:19 a.m. OK GNU C++14 TESTS 60 779 60006400 2400
62027581 _HossamYehia_ F Oct. 6, 2019, 9:08 p.m. OK GNU C++14 TESTS 60 779 72294400 2400
42996950 nickluo F Sept. 17, 2018, 12:25 p.m. OK GNU C++14 TESTS 60 779 112332800 2400
43365487 q234rty F Sept. 24, 2018, 12:03 p.m. OK GNU C++17 TESTS 60 311 94105600 2400
45117786 xumingyang F Oct. 30, 2018, 11:42 p.m. OK GNU C++17 TESTS 60 436 104345600 2400
52882888 gubeiqg F April 17, 2019, 2:21 a.m. OK GNU C++17 TESTS 60 592 80076800 2400
46390342 vjudge4 F Nov. 30, 2018, 5:16 a.m. OK GNU C++17 TESTS 60 716 100044800 2400
43017951 ghostfly233 F Sept. 18, 2018, 1:39 a.m. OK GNU C++17 TESTS 60 748 96051200 2400
43016590 liushaoqi F Sept. 17, 2018, 11:43 p.m. OK GNU C++17 TESTS 60 779 104243200 2400
67268697 vjudge1 F Dec. 20, 2019, 7:15 a.m. OK GNU C++17 TESTS 60 779 108236800 2400
46405327 Ellenord F Nov. 30, 2018, 2:20 p.m. OK GNU C++17 TESTS 60 795 84275200 2400
43605027 Stone. F Sept. 30, 2018, 11:56 a.m. OK GNU C++17 TESTS 60 810 104243200 2400
43019636 tkj F Sept. 18, 2018, 3:20 a.m. OK GNU C++17 TESTS 60 810 144179200 2400
42996502 StayAwayFromBitches F Sept. 17, 2018, 12:15 p.m. OK Java 8 TESTS 60 857 213708800 2400
44094718 xodiac F Oct. 10, 2018, 10:24 p.m. OK Java 8 TESTS 60 888 268390400 2400
43004043 uwi F Sept. 17, 2018, 3:03 p.m. OK Java 8 TESTS 60 935 78745600 2400
43472189 Ahmad F Sept. 26, 2018, 11:26 p.m. OK Java 8 TESTS 60 1044 79462400 2400
43471905 Ahmad F Sept. 26, 2018, 11:06 p.m. OK Java 8 TESTS 60 1091 79360000 2400
43026153 HardikDobariya F Sept. 18, 2018, 8:49 a.m. OK Java 8 TESTS 60 1154 73420800 2400
45701484 donli F Nov. 14, 2018, 8:35 a.m. OK Java 8 TESTS 60 1185 50483200 2400
43012794 iakovlev.zakhar F Sept. 17, 2018, 7:44 p.m. OK Java 8 TESTS 60 1496 99942400 2400
42986539 uwi F Sept. 17, 2018, 9:30 a.m. OK Java 8 TESTS 60 2043 172953600 2400
47846443 PrakharJain F Jan. 2, 2019, 2:57 p.m. OK Java 8 TESTS 60 2324 247296000 2400
43726905 vjudge2 F Oct. 3, 2018, 12:35 p.m. OK MS C++ TESTS 60 2074 140185600 2400

remove filters

Back to search problems