Educational Codeforces Round 136 (Rated for 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
1739 Educational Codeforces Round 136 (Rated for Div. 2) FINISHED False 7200 67361099 Sept. 29, 2022, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5226 ) D Reset K Edges PROGRAMMING binary search data structures dfs and similar graphs greedy trees

B"You are given a rooted tree, consisting of n vertices. The vertices are numbered from 1 to n , the root is the vertex 1 . You can perform the following operation at most k times: The height of a tree is the maximum depth of its vertices, and the depth of a vertex is the number of edges on the path from the root to it. For example, the depth of vertex 1 is 0 , since it's the root, and the depth of all its children is 1 . What's the smallest height of the tree that can be achieved? The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of testcases. The first line of each testcase contains two integers n and k ( 2 <= n <= 2 cdot 10^5 ; 0 <= k <= n - 1 ) -- the number of vertices in the tree and the maximum number of operations you can perform. The second line contains n-1 integers p_2, p_3, ... , p_n ( 1 <= p_i < i ) -- the parent of the i -th vertex. Vertex 1 is the root. The sum of n over all testcases doesn't exceed 2 cdot 10^5 . For each testcase, print a single integer -- the smallest height of the tree that can achieved by performing at most k operations. "...

Tutorials

Educational Codeforces Round 136 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
174063062 xsdjg D Sept. 30, 2022, 9:38 a.m. OK GNU C++14 TESTS 49 31 1638400
174065398 im0use D Sept. 30, 2022, 10:06 a.m. OK GNU C++14 TESTS 49 46 2355200
174192803 LordWorm D Oct. 1, 2022, 3:03 a.m. OK GNU C++14 TESTS 49 62 1638400
174065198 pengym D Sept. 30, 2022, 10:03 a.m. OK GNU C++14 TESTS 49 62 1638400
174049231 kiyoya_21 D Sept. 30, 2022, 6:55 a.m. OK GNU C++14 TESTS 49 62 1638400
174040828 star_scratcher D Sept. 30, 2022, 4:35 a.m. OK GNU C++14 TESTS 49 62 1638400
174199145 Shangguanyunxiao D Oct. 1, 2022, 4:40 a.m. OK GNU C++14 TESTS 49 77 1638400
174192630 LordWorm D Oct. 1, 2022, 3 a.m. OK GNU C++14 TESTS 49 77 1638400
174053816 glotm D Sept. 30, 2022, 7:54 a.m. OK GNU C++14 TESTS 49 77 1638400
174035218 bnu20DT D Sept. 30, 2022, 2:36 a.m. OK GNU C++14 TESTS 49 77 1638400
174035186 mmsho D Sept. 30, 2022, 2:35 a.m. OK GNU C++17 TESTS 49 62 1638400
173998170 dmenezes D Sept. 29, 2022, 4:42 p.m. OK GNU C++17 TESTS 49 62 1638400
174057090 asadhack D Sept. 30, 2022, 8:34 a.m. OK GNU C++17 TESTS 49 77 1638400
174047579 InariInDream D Sept. 30, 2022, 6:33 a.m. OK GNU C++17 TESTS 49 77 1638400
174029409 RetARDed1111 D Sept. 30, 2022, 12:20 a.m. OK GNU C++17 TESTS 49 77 1638400
174003415 regian0001 D Sept. 29, 2022, 5:21 p.m. OK GNU C++17 TESTS 49 77 1638400
174002537 maomeng D Sept. 29, 2022, 5:13 p.m. OK GNU C++17 TESTS 49 77 1638400
173999132 jtf_shine D Sept. 29, 2022, 4:48 p.m. OK GNU C++17 TESTS 49 77 1638400
173998603 wwwfq D Sept. 29, 2022, 4:45 p.m. OK GNU C++17 TESTS 49 77 1638400
174153862 sigma-yyf D Sept. 30, 2022, 5 p.m. OK GNU C++17 TESTS 49 78 1638400
174035905 xuangou D Sept. 30, 2022, 2:51 a.m. OK GNU C++17 (64) TESTS 49 46 1638400
174035003 muxingchengfeng D Sept. 30, 2022, 2:31 a.m. OK GNU C++17 (64) TESTS 49 46 1638400
173999077 eriksuenderhauf D Sept. 29, 2022, 4:47 p.m. OK GNU C++17 (64) TESTS 49 46 2457600
174002564 joker_pisces D Sept. 29, 2022, 5:13 p.m. OK GNU C++17 (64) TESTS 49 46 6451200
174189832 camc D Oct. 1, 2022, 2:11 a.m. OK GNU C++17 (64) TESTS 49 62 1638400
174049432 wygzgyw D Sept. 30, 2022, 6:58 a.m. OK GNU C++17 (64) TESTS 49 62 1638400
173999065 Superposition D Sept. 29, 2022, 4:47 p.m. OK GNU C++17 (64) TESTS 49 62 3174400
174019011 tricky_hunter D Sept. 29, 2022, 8:28 p.m. OK GNU C++17 (64) TESTS 49 77 1638400
174045334 Lucky7 D Sept. 30, 2022, 6:04 a.m. OK GNU C++17 (64) TESTS 49 93 3993600
174059908 cjnwq D Sept. 30, 2022, 9:04 a.m. OK GNU C++17 (64) TESTS 49 93 9728000
174170809 Dazai_kun D Sept. 30, 2022, 7:30 p.m. OK GNU C++20 (64) TESTS 49 46 1638400
174075254 11_45_14 D Sept. 30, 2022, 12:04 p.m. OK GNU C++20 (64) TESTS 49 46 1638400
174039190 459045 D Sept. 30, 2022, 4:02 a.m. OK GNU C++20 (64) TESTS 49 46 1638400
174036622 sakura_orz D Sept. 30, 2022, 3:07 a.m. OK GNU C++20 (64) TESTS 49 46 1638400
174036193 SummerWind D Sept. 30, 2022, 2:58 a.m. OK GNU C++20 (64) TESTS 49 46 1638400
174031686 UUUnmei D Sept. 30, 2022, 1:18 a.m. OK GNU C++20 (64) TESTS 49 46 1638400
174009760 OceanCat D Sept. 29, 2022, 6:25 p.m. OK GNU C++20 (64) TESTS 49 46 1638400
174002787 BrokenBlade D Sept. 29, 2022, 5:15 p.m. OK GNU C++20 (64) TESTS 49 46 6041600
174016808 shubhamcypher123 D Sept. 29, 2022, 7:54 p.m. OK GNU C++20 (64) TESTS 49 46 6451200
174059297 whitesword D Sept. 30, 2022, 8:59 a.m. OK GNU C++20 (64) TESTS 49 46 7987200
174086392 kencho D Sept. 30, 2022, 2:02 p.m. OK Java 11 TESTS 49 608 14540800
174009884 dusty.and.rusty D Sept. 29, 2022, 6:26 p.m. OK Java 11 TESTS 49 811 30617600
174040321 dzhi D Sept. 30, 2022, 4:25 a.m. OK Java 11 TESTS 49 873 42188800
174011028 dusty.and.rusty D Sept. 29, 2022, 6:40 p.m. OK Java 11 TESTS 49 1138 32563200
174001147 Longgggggggg D Sept. 29, 2022, 5:02 p.m. OK Java 11 TESTS 49 1185 182784000
174071375 AyushS_cg170 D Sept. 30, 2022, 11:21 a.m. OK Java 11 TESTS 49 1263 167014400
174040230 dzhi D Sept. 30, 2022, 4:23 a.m. OK Java 11 TESTS 49 1341 62873600
174200047 blindingbythelights D Oct. 1, 2022, 4:52 a.m. OK Java 11 TESTS 49 1403 142540800
174045044 __Serendipity D Sept. 30, 2022, 6 a.m. OK Java 11 TESTS 49 1419 183808000
174056871 vineet16 D Sept. 30, 2022, 8:31 a.m. OK Java 11 TESTS 49 1465 194355200
174073127 chaojikkz D Sept. 30, 2022, 11:41 a.m. OK Java 17 TESTS 49 1185 115814400
174030045 freehandle D Sept. 30, 2022, 12:39 a.m. OK Java 17 TESTS 49 1575 53862400
174072610 yashpandey73 D Sept. 30, 2022, 11:36 a.m. OK Java 8 TESTS 49 155 2764800
174002269 anonxx5 D Sept. 29, 2022, 5:11 p.m. OK Java 8 TESTS 49 389 45772800
174063647 Mohamed308 D Sept. 30, 2022, 9:45 a.m. OK Java 8 TESTS 49 498 19251200
174063619 GonFreecss2830 D Sept. 30, 2022, 9:44 a.m. OK Java 8 TESTS 49 498 19251200
174071949 cftauros D Sept. 30, 2022, 11:28 a.m. OK Java 8 TESTS 49 670 18432000
174021634 megaspazz D Sept. 29, 2022, 9:15 p.m. OK Java 8 TESTS 49 716 155750400
174021589 megaspazz D Sept. 29, 2022, 9:14 p.m. OK Java 8 TESTS 49 717 155648000
174072112 cftauros D Sept. 30, 2022, 11:30 a.m. OK Java 8 TESTS 49 733 17612800
174072265 cftauros D Sept. 30, 2022, 11:32 a.m. OK Java 8 TESTS 49 748 17612800
174073145 cftauros D Sept. 30, 2022, 11:41 a.m. OK Java 8 TESTS 49 795 18534400
174035018 stopthecount D Sept. 30, 2022, 2:32 a.m. OK Kotlin 1.4 TESTS 49 311 6758400
174034994 stopthecount D Sept. 30, 2022, 2:31 a.m. OK Kotlin 1.4 TESTS 49 311 6758400
174000488 XYShaoKang D Sept. 29, 2022, 4:57 p.m. OK Node.js TESTS 49 1029 95539200
174006039 misorin D Sept. 29, 2022, 5:47 p.m. OK PyPy 3 TESTS 49 202 22528000
174195343 YMSeah D Oct. 1, 2022, 3:44 a.m. OK PyPy 3 TESTS 49 655 45875200
174038239 hxu10 D Sept. 30, 2022, 3:44 a.m. OK PyPy 3 TESTS 49 920 36864000
174080099 pennymagic156 D Sept. 30, 2022, 12:56 p.m. OK PyPy 3 TESTS 49 1045 38400000
174081650 superden85 D Sept. 30, 2022, 1:13 p.m. OK PyPy 3 TESTS 49 1185 30003200
174040328 hxu10 D Sept. 30, 2022, 4:25 a.m. OK PyPy 3 TESTS 49 2682 42905600
174019387 tim_zay D Sept. 29, 2022, 8:33 p.m. OK PyPy 3 TESTS 49 2713 108851200
174019056 tim_zay D Sept. 29, 2022, 8:28 p.m. OK PyPy 3 TESTS 49 2869 109772800
174019321 tim_zay D Sept. 29, 2022, 8:32 p.m. OK PyPy 3 TESTS 49 2917 110080000
174162227 tim_zay D Sept. 30, 2022, 6:17 p.m. OK PyPy 3 TESTS 49 2964 109465600
174011955 samchen123 D Sept. 29, 2022, 6:50 p.m. OK PyPy 3-64 TESTS 49 171 29081600
174026962 biglunchdude D Sept. 29, 2022, 11:16 p.m. OK PyPy 3-64 TESTS 49 186 28262400
174051428 bridgekiller D Sept. 30, 2022, 7:23 a.m. OK PyPy 3-64 TESTS 49 186 28569600
173998149 SophieHatter D Sept. 29, 2022, 4:42 p.m. OK PyPy 3-64 TESTS 49 186 29388800
174003963 Leocosmos D Sept. 29, 2022, 5:26 p.m. OK PyPy 3-64 TESTS 49 186 33894400
174048493 Yansou D Sept. 30, 2022, 6:45 a.m. OK PyPy 3-64 TESTS 49 187 26419200
174047868 InariInDream D Sept. 30, 2022, 6:37 a.m. OK PyPy 3-64 TESTS 49 187 28979200
173999012 Invinc3 D Sept. 29, 2022, 4:47 p.m. OK PyPy 3-64 TESTS 49 202 26828800
174047997 bridgekiller D Sept. 30, 2022, 6:39 a.m. OK PyPy 3-64 TESTS 49 202 28569600
174079045 unknownSolver D Sept. 30, 2022, 12:45 p.m. OK PyPy 3-64 TESTS 49 217 36966400
174079221 pennymagic156 D Sept. 30, 2022, 12:47 p.m. OK Python 3 TESTS 49 3369 45056000
174040825 liut D Sept. 30, 2022, 4:35 a.m. OK Rust 2021 TESTS 49 62 3174400
174051562 Spheniscine D Sept. 30, 2022, 7:25 a.m. OK Rust 2021 TESTS 49 78 3276800

remove filters

Back to search problems