Codeforces Round 430 (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
842 Codeforces Round 430 (Div. 2) FINISHED False 7200 233506524 Aug. 29, 2017, 3:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 438 ) E Nikita and game PROGRAMMING binary search dfs and similar divide and conquer graphs trees 3000

B'Nikita plays a new computer game. There are m levels in this game. In the beginning of each level a new class appears in the game; this class is a child-class of the class yi (and yi is called parent-class for this new class). Thus, the classes form a tree. Initially there is only one class with index 1. Changing the class to its neighbour (child-class or parent-class) in the tree costs 1 coin. You can not change the class back. The cost of changing the class a to the class b is equal to the total cost of class changes on the path from a to b in the class tree. Suppose that at i -th level the maximum cost of changing one class to another is x. For each level output the number of classes such that for each of these classes there exists some other class y, and the distance from this class to y is exactly x. First line contains one integer number m -- number of queries (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x893 xc2 xb7105). Next m lines contain description of queries. i -th line (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m) describes the i -th level and contains an integer yi -- the index of the parent-class of class with index i xe2 x80 x89+ xe2 x80 x891 (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89yi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89i). Suppose that at i -th level the maximum cost of changing one class to another is x. For each level output the number of classes such that for each of these classes there exists some other class y, and the distance from this class to y is exactly x. '...

Tutorials

Tutorial Codeforces Round #430 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
30304128 Feeey E Sept. 13, 2017, 10:29 a.m. OK GNU C++ TESTS 70 264 36147200 3000
30304083 Feeey E Sept. 13, 2017, 10:27 a.m. OK GNU C++ TESTS 70 265 36147200 3000
29946973 zx2003 E Aug. 31, 2017, 2:31 p.m. OK GNU C++ TESTS 70 265 146841600 3000
36645557 mengbierr E March 26, 2018, 2:37 p.m. OK GNU C++ TESTS 70 295 44441600 3000
35039272 ivanilos E Feb. 8, 2018, 12:13 a.m. OK GNU C++ TESTS 70 343 36966400 3000
29958057 spiderbatman E Aug. 31, 2017, 7:48 p.m. OK GNU C++ TESTS 70 514 60006400 3000
30965489 KrK E Oct. 3, 2017, 11:13 a.m. OK GNU C++ TESTS 70 623 46182400 3000
29974469 pparwal12 E Sept. 1, 2017, 1:10 p.m. OK GNU C++ TESTS 70 1154 150323200 3000
29974451 pparwal12 E Sept. 1, 2017, 1:08 p.m. OK GNU C++ TESTS 70 1185 218828800 3000
29917387 FoolMike E Aug. 30, 2017, 12:43 p.m. OK GNU C++ TESTS 70 1793 170905600 3000
50587309 luogu_bot4 E Feb. 28, 2019, 4:53 a.m. OK GNU C++11 TESTS 70 140 26419200 3000
68611275 luogu_bot1 E Jan. 11, 2020, 3:47 p.m. OK GNU C++11 TESTS 70 155 26419200 3000
55446005 luogu_bot4 E June 11, 2019, 1:34 p.m. OK GNU C++11 TESTS 70 170 26316800 3000
38575307 skylee E May 24, 2018, 2:52 a.m. OK GNU C++11 TESTS 70 171 26316800 3000
62113959 zhoushouchen E Oct. 8, 2019, 12:55 p.m. OK GNU C++11 TESTS 70 171 27648000 3000
61901099 zhoushouchen E Oct. 5, 2019, 8:36 a.m. OK GNU C++11 TESTS 70 171 27648000 3000
45059891 xsc E Oct. 29, 2018, 2:20 p.m. OK GNU C++11 TESTS 70 171 27648000 3000
38574748 skylee E May 24, 2018, 1:57 a.m. OK GNU C++11 TESTS 70 186 26521600 3000
66045415 luogu_bot2 E Nov. 30, 2019, 2:52 p.m. OK GNU C++11 TESTS 70 187 26316800 3000
38575287 skylee E May 24, 2018, 2:51 a.m. OK GNU C++11 TESTS 70 187 26521600 3000
40980214 ReaLNero1 E July 30, 2018, 5:25 p.m. OK GNU C++14 TESTS 70 109 43315200 3000
36047649 Marco_L_T E March 7, 2018, 2:23 p.m. OK GNU C++14 TESTS 70 109 45158400 3000
69470675 CaprYang E Jan. 24, 2020, 2:26 p.m. OK GNU C++14 TESTS 70 249 28057600 3000
29901696 please_delete_account E Aug. 29, 2017, 7:53 p.m. OK GNU C++14 TESTS 70 249 30310400 3000
29966324 jufusong E Sept. 1, 2017, 7:42 a.m. OK GNU C++14 TESTS 70 249 132915200 3000
29901727 please_delete_account E Aug. 29, 2017, 7:55 p.m. OK GNU C++14 TESTS 70 264 30310400 3000
38575329 skylee E May 24, 2018, 2:53 a.m. OK GNU C++14 TESTS 70 265 26419200 3000
60066933 yqtwrzw E Sept. 5, 2019, 9:29 a.m. OK GNU C++14 TESTS 70 265 30105600 3000
29894566 natsugiri E Aug. 29, 2017, 4:48 p.m. OK GNU C++14 TESTS 69 265 61747200 3000
56379990 walht E July 1, 2019, 8:04 a.m. OK GNU C++14 TESTS 70 280 36249600 3000
53941580 just_soso E May 10, 2019, 3:28 a.m. OK GNU C++17 TESTS 70 218 28979200 3000
56641072 vjudge3 E July 7, 2019, 1:47 a.m. OK GNU C++17 TESTS 70 280 30105600 3000
56308899 vjudge1 E June 30, 2019, 1:38 p.m. OK GNU C++17 TESTS 70 295 27955200 3000
53904806 just_soso E May 9, 2019, 12:11 p.m. OK GNU C++17 TESTS 70 311 36147200 3000
56719960 vjudge4 E July 8, 2019, 4:19 p.m. OK GNU C++17 TESTS 70 327 45977600 3000
37564759 Kerim.K E April 24, 2018, 6:18 a.m. OK GNU C++17 TESTS 70 483 61235200 3000
57862151 walnutwaldo20 E July 27, 2019, 6:25 p.m. OK GNU C++17 TESTS 70 529 49254400 3000
39858950 Ali_Pi E July 2, 2018, 6:38 a.m. OK GNU C++17 TESTS 70 1388 27955200 3000
48777976 tri E Jan. 23, 2019, 5:25 a.m. OK Java 8 TESTS 70 467 40448000 3000
30484551 Sandip_Jana E Sept. 18, 2017, 8:56 p.m. OK Java 8 TESTS 70 967 61952000 3000
29886798 uwi E Aug. 29, 2017, 4:03 p.m. OK Java 8 TESTS 69 1091 36147200 3000
29996851 pitfall E Sept. 1, 2017, 8:22 p.m. OK Java 8 TESTS 70 1091 212377600 3000

remove filters

Back to search problems