Codeforces Round 936 (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
1946 Codeforces Round 936 (Div. 2) FINISHED False 7200 26061863 March 22, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 11459 ) C Tree Cutting PROGRAMMING binary search dp greedy implementation trees

B'You are given a tree with n vertices. Your task is to find the maximum number x such that it is possible to remove exactly k edges from this tree in such a way that the size of each remaining connected component ^{ dagger} is at least x . ^{ dagger} Two vertices v and u are in the same connected component if there exists a sequence of numbers t_1, t_2, ldots, t_k of arbitrary length k , such that t_1 = v , t_k = u , and for each i from 1 to k - 1 , vertices t_i and t_{i+1} are connected by an edge. Each test consists of several sets of input data. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of sets of input data. This is followed by a description of the sets of input data. The first line of each set of input data contains two integers n and k ( 1 <= k < n <= 10^5 ) -- the number of vertices in the tree and the number of edges to be removed. Each of the next n - 1 lines of each set of input data contains two integers v and u ( 1 <= v, u <= n ) -- the next edge of the tree. It is guaranteed that the sum of the values of n for all sets of input data does not exceed 10^5 . For each set of input data, output a single line containing the maximum number x such that it is possible to remove exactly k edges from the tree in such a way that the size of each remaining connected component is at least x . The tree in the first set of input data: After removing the edge 1 -- 3 , the tree will look as follows: The tree has split into two connected components. The first component consists of two vertices: 1 and 2 . The second connected component consists of three vertices: 3, 4 and 5 . In both connected components, there are at least two vertices. It can be shown that the answer 3 is not achievable, so the answer is $$'...

Tutorials

Codeforces Round #936 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
252835087 Arnyev C March 22, 2024, 9:11 p.m. OK C# 10 TESTS 27 124 19251200
252850642 karamkontar C March 23, 2024, 1:55 a.m. OK C# 10 TESTS 27 265 20787200
252814923 Reckt C March 22, 2024, 5:48 p.m. OK C# 10 TESTS 27 311 20172800
252815473 Reckt C March 22, 2024, 5:52 p.m. OK C# 10 TESTS 27 405 20070400
252854768 chrisTris C March 23, 2024, 2:59 a.m. OK C# 10 TESTS 27 436 22630400
252801975 2310040055 C March 22, 2024, 4:23 p.m. OK C# 10 TESTS 27 982 33894400
252867760 domferrel C March 23, 2024, 5:36 a.m. OK C++14 (GCC 6-32) TESTS 27 62 4915200
252853462 K.zimingL C March 23, 2024, 2:39 a.m. OK C++14 (GCC 6-32) TESTS 27 78 4608000
252799911 changinmong10 C March 22, 2024, 4:17 p.m. OK C++14 (GCC 6-32) TESTS 27 78 6553600
252814551 a20031030 C March 22, 2024, 5:45 p.m. OK C++14 (GCC 6-32) TESTS 27 93 8192000
252814913 a20031030 C March 22, 2024, 5:48 p.m. OK C++14 (GCC 6-32) TESTS 27 93 8192000
252853275 2317663977 C March 23, 2024, 2:36 a.m. OK C++14 (GCC 6-32) TESTS 27 93 8601600
252803835 elioing C March 22, 2024, 4:28 p.m. OK C++14 (GCC 6-32) TESTS 27 93 9318400
252826113 vkkr125 C March 22, 2024, 7:33 p.m. OK C++14 (GCC 6-32) TESTS 27 108 4608000
252824975 God-of-Code C March 22, 2024, 7:22 p.m. OK C++14 (GCC 6-32) TESTS 27 108 6553600
252811423 -OverLord- C March 22, 2024, 5:25 p.m. OK C++14 (GCC 6-32) TESTS 27 108 7372800
252849196 drx74642 C March 23, 2024, 1:27 a.m. OK C++17 (GCC 7-32) TESTS 27 62 8499200
252830263 valehagammedov2 C March 22, 2024, 8:18 p.m. OK C++17 (GCC 7-32) TESTS 27 77 4505600
252809537 Gouk_ C March 22, 2024, 5:19 p.m. OK C++17 (GCC 7-32) TESTS 27 77 5836800
252842797 _Al1bi_ C March 22, 2024, 11:12 p.m. OK C++17 (GCC 7-32) TESTS 27 77 6553600
252856489 XY1126 C March 23, 2024, 3:21 a.m. OK C++17 (GCC 7-32) TESTS 27 77 6553600
252859204 Lntano265 C March 23, 2024, 3:55 a.m. OK C++17 (GCC 7-32) TESTS 27 77 6963200
252864131 youessaitch C March 23, 2024, 5:03 a.m. OK C++17 (GCC 7-32) TESTS 27 77 7680000
252812790 Atishay_23 C March 22, 2024, 5:33 p.m. OK C++17 (GCC 7-32) TESTS 27 77 8089600
252804952 AugensternQ723 C March 22, 2024, 4:31 p.m. OK C++17 (GCC 7-32) TESTS 27 77 10956800
252860894 NightSky.Evo C March 23, 2024, 4:19 a.m. OK C++17 (GCC 7-32) TESTS 27 77 14540800
252837713 nuc_lx C March 22, 2024, 9:45 p.m. OK C++20 (GCC 13-64) TESTS 27 62 7065600
252829373 nandhagk1729 C March 22, 2024, 8:08 p.m. OK C++20 (GCC 13-64) TESTS 27 62 7475200
252810585 Nour C March 22, 2024, 5:22 p.m. OK C++20 (GCC 13-64) TESTS 27 62 11673600
252863681 _1000000007 C March 23, 2024, 4:58 a.m. OK C++20 (GCC 13-64) TESTS 27 62 11776000
252800280 mineev.da C March 22, 2024, 4:18 p.m. OK C++20 (GCC 13-64) TESTS 27 77 11878400
252800845 XHYMathematics C March 22, 2024, 4:20 p.m. OK C++20 (GCC 13-64) TESTS 27 78 6144000
252857841 Duanzishou134 C March 23, 2024, 3:38 a.m. OK C++20 (GCC 13-64) TESTS 27 78 9216000
252810611 Palbudir C March 22, 2024, 5:22 p.m. OK C++20 (GCC 13-64) TESTS 27 78 11980800
252837451 M2rider C March 22, 2024, 9:41 p.m. OK C++20 (GCC 13-64) TESTS 27 78 14848000
252811255 marco-vb C March 22, 2024, 5:25 p.m. OK C++20 (GCC 13-64) TESTS 27 93 6758400
252803173 RaghavWadhwa C March 22, 2024, 4:26 p.m. OK C# 8 TESTS 27 1013 35123200
252826967 NenadDapic C March 22, 2024, 7:42 p.m. OK FPC TESTS 27 109 3891200
252824911 nguyenquocthao00 C March 22, 2024, 7:21 p.m. OK Go TESTS 27 171 28160000
252868511 yang_wei C March 23, 2024, 5:42 a.m. OK Java 21 TESTS 27 545 26828800
252810953 gaju_01 C March 22, 2024, 5:23 p.m. OK Java 21 TESTS 27 560 19558400
252822881 dan00ile C March 22, 2024, 7:01 p.m. OK Java 21 TESTS 27 576 26726400
252809479 yadavDipesh C March 22, 2024, 5:18 p.m. OK Java 21 TESTS 27 592 72192000
252815747 Switch9 C March 22, 2024, 5:54 p.m. OK Java 21 TESTS 27 670 29593600
252866283 Siddharth_Singh_here C March 23, 2024, 5:24 a.m. OK Java 21 TESTS 27 701 32870400
252870239 priyaroy3370 C March 23, 2024, 5:56 a.m. OK Java 21 TESTS 27 763 35942400
252855609 codeWithDarshan C March 23, 2024, 3:10 a.m. OK Java 21 TESTS 27 764 36659200
252845710 thebrogrammer C March 23, 2024, 12:11 a.m. OK Java 21 TESTS 27 872 21299200
252854698 Abhinav_16 C March 23, 2024, 2:58 a.m. OK Java 21 TESTS 27 982 28160000
252850875 Xing_ke C March 23, 2024, 1:59 a.m. OK Java 8 TESTS 27 327 2662400
252849942 bcy1235 C March 23, 2024, 1:41 a.m. OK Java 8 TESTS 27 468 8908800
252862802 AgniWarrior_Alt C March 23, 2024, 4:46 a.m. OK Java 8 TESTS 27 560 38604800
252818129 shubham202012 C March 22, 2024, 6:14 p.m. OK Java 8 TESTS 27 654 29900800
252854336 Jha_coder1942 C March 23, 2024, 2:53 a.m. OK Java 8 TESTS 27 686 23244800
252810763 Lakshay429 C March 22, 2024, 5:22 p.m. OK Java 8 TESTS 27 717 29900800
252837767 NerfThis C March 22, 2024, 9:45 p.m. OK Java 8 TESTS 27 779 40960000
252817601 samy10127 C March 22, 2024, 6:10 p.m. OK Java 8 TESTS 27 810 47308800
252824139 formidablechief27 C March 22, 2024, 7:13 p.m. OK Java 8 TESTS 27 1310 109670400
252842721 wbeard01 C March 22, 2024, 11:10 p.m. OK Java 8 TESTS 27 1887 99328000
252802403 Soumyaazw C March 22, 2024, 4:24 p.m. OK PHP TESTS 27 873 84070400
252810419 OLOGY C March 22, 2024, 5:21 p.m. OK PyPy 2 TESTS 27 654 40345600
252810308 OLOGY C March 22, 2024, 5:21 p.m. OK PyPy 2 TESTS 27 1450 62259200
252816679 abhaygupta28 C March 22, 2024, 6:02 p.m. OK PyPy 3 TESTS 27 1933 58572800
252844302 Remineva C March 22, 2024, 11:43 p.m. OK PyPy 3-64 TESTS 27 217 38400000
252866766 cy171 C March 23, 2024, 5:28 a.m. OK PyPy 3-64 TESTS 27 218 33177600
252812630 RobinFromTheHood C March 22, 2024, 5:32 p.m. OK PyPy 3-64 TESTS 27 233 35123200
252844607 Remineva C March 22, 2024, 11:50 p.m. OK PyPy 3-64 TESTS 27 233 37888000
252837412 Nullz C March 22, 2024, 9:40 p.m. OK PyPy 3-64 TESTS 27 249 34508800
252844941 Remineva C March 22, 2024, 11:56 p.m. OK PyPy 3-64 TESTS 27 264 38400000
252805302 qishui7 C March 22, 2024, 4:32 p.m. OK PyPy 3-64 TESTS 27 530 28979200
252809528 CinaDor C March 22, 2024, 5:19 p.m. OK PyPy 3-64 TESTS 27 623 49561600
252816538 kibr C March 22, 2024, 6:01 p.m. OK PyPy 3-64 TESTS 27 655 64819200
252814626 googlweknoall C March 22, 2024, 5:46 p.m. OK PyPy 3-64 TESTS 27 763 39219200
252810452 OLOGY C March 22, 2024, 5:21 p.m. OK Python 2 TESTS 27 2776 29593600
252834626 edugong C March 22, 2024, 9:06 p.m. OK Python 3 TESTS 27 1216 24268800
252841217 math_hater C March 22, 2024, 10:40 p.m. OK Python 3 TESTS 27 2199 164454400
252841482 math_hater C March 22, 2024, 10:45 p.m. OK Python 3 TESTS 27 2261 165478400
252803739 cck111 C March 22, 2024, 4:27 p.m. OK Rust 2021 TESTS 27 62 18329600
252803187 ArnedeB C March 22, 2024, 4:26 p.m. OK Rust 2021 TESTS 27 155 14643200

remove filters

Back to search problems