Codeforces Round 520 (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
1062 Codeforces Round 520 (Div. 2) FINISHED False 7200 189613499 Nov. 14, 2018, 3:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1799 ) E Company PROGRAMMING binary search data structures dfs and similar greedy trees 2300

B"The company X has n employees numbered from 1 through n . Each employee u has a direct boss p_u ( 1 <= p_u <= n ), except for the employee 1 who has no boss. It is guaranteed, that values p_i form a tree. Employee u is said to be in charge of employee v if u is the direct boss of v or there is an employee w such that w is in charge of v and u is the direct boss of w . Also, any employee is considered to be in charge of himself. In addition, for each employee u we define it's level lv(u) as follow: In the near future, there are q possible plans for the company to operate. The i -th plan consists of two integers l_i and r_i , meaning that all the employees in the range [l_i, r_i] , and only they, are involved in this plan. To operate the plan smoothly, there must be a project manager who is an employee in charge of all the involved employees. To be precise, if an employee u is chosen as the project manager for the i -th plan then for every employee v in [l_i, r_i] , u must be in charge of v . Note, that u is not necessary in the range [l_i, r_i] . Also, u is always chosen in such a way that lv(u) is as large as possible (the higher the level is, the lower the salary that the company has to pay the employee). Before any plan is operated, the company has JATC take a look at their plans. After a glance, he tells the company that for every plan, it's possible to reduce the number of the involved employees exactly by one without affecting the plan. Being greedy, the company asks JATC which employee they should kick out of the plan so that the level of the project manager required is as large as possible. JATC has already figured out the answer and challenges you to do the same. The first line contains two integers n and q ( 2 <= n <= 100 ,000 , 1 l"...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
55869819 pxv E June 21, 2019, 2:05 p.m. OK GNU C++11 TESTS 54 93 22425600 2300
45756664 bestFy E Nov. 15, 2018, 6:23 a.m. OK GNU C++11 TESTS 54 109 14028800 2300
45773432 __Darkmoon E Nov. 15, 2018, 3:43 p.m. OK GNU C++11 TESTS 54 124 18432000 2300
45731475 Winniechen E Nov. 14, 2018, 4:46 p.m. OK GNU C++11 TESTS 54 124 23244800 2300
45883643 11235813213455 E Nov. 17, 2018, 2:58 p.m. OK GNU C++11 TESTS 54 124 38092800 2300
45744016 nikolapesic2802 E Nov. 14, 2018, 7:23 p.m. OK GNU C++11 TESTS 54 140 18329600 2300
45733014 _AxclbkJ_ E Nov. 14, 2018, 4:54 p.m. OK GNU C++11 TESTS 54 140 24473600 2300
45733982 HatanoKokoro E Nov. 14, 2018, 5 p.m. OK GNU C++11 TESTS 54 140 24883200 2300
48986483 luogu_bot1 E Jan. 26, 2019, 12:31 p.m. OK GNU C++11 TESTS 54 140 27852800 2300
53728359 SoiMae E May 4, 2019, 5:53 a.m. OK GNU C++11 TESTS 54 140 48844800 2300
45742540 wleung_bvg E Nov. 14, 2018, 7:01 p.m. OK GNU C++14 TESTS 54 108 38604800 2300
45742376 wleung_bvg E Nov. 14, 2018, 6:59 p.m. OK GNU C++14 TESTS 54 109 39116800 2300
45758508 waynetuinfor E Nov. 15, 2018, 7:38 a.m. OK GNU C++14 TESTS 54 140 107212800 2300
45971390 deepwork E Nov. 19, 2018, 4:06 p.m. OK GNU C++14 TESTS 54 155 38297600 2300
45735831 AAmeow E Nov. 14, 2018, 5:10 p.m. OK GNU C++14 TESTS 54 156 19148800 2300
45758591 waynetuinfor E Nov. 15, 2018, 7:40 a.m. OK GNU C++14 TESTS 54 156 105574400 2300
45758568 waynetuinfor E Nov. 15, 2018, 7:40 a.m. OK GNU C++14 TESTS 54 156 105574400 2300
46309200 Nick_Brain E Nov. 28, 2018, 12:12 p.m. OK GNU C++14 TESTS 54 156 130764800 2300
45963791 Devil E Nov. 19, 2018, 12:55 p.m. OK GNU C++14 TESTS 54 171 21196800 2300
47898857 am1tbh47 E Jan. 4, 2019, 12:45 p.m. OK GNU C++14 TESTS 54 171 25907200 2300
45738595 IgorSmirnov E Nov. 14, 2018, 5:25 p.m. OK GNU C++17 TESTS 54 124 30105600 2300
45751629 Juaanma E Nov. 15, 2018, 1:48 a.m. OK GNU C++17 TESTS 54 124 122777600 2300
45756372 Momentum E Nov. 15, 2018, 6:11 a.m. OK GNU C++17 TESTS 54 140 42086400 2300
45768767 47th-draganov E Nov. 15, 2018, 1:27 p.m. OK GNU C++17 TESTS 54 155 94720000 2300
45779463 BuckWheat E Nov. 15, 2018, 7:16 p.m. OK GNU C++17 TESTS 54 156 22835200 2300
45779379 BuckWheat E Nov. 15, 2018, 7:14 p.m. OK GNU C++17 TESTS 54 170 23654400 2300
45742230 E-Maxon E Nov. 14, 2018, 6:57 p.m. OK GNU C++17 TESTS 54 170 41164800 2300
45779580 BuckWheat E Nov. 15, 2018, 7:19 p.m. OK GNU C++17 TESTS 54 171 22528000 2300
45863386 201612201402013 E Nov. 17, 2018, 6:53 a.m. OK GNU C++17 TESTS 54 171 23244800 2300
45779356 BuckWheat E Nov. 15, 2018, 7:13 p.m. OK GNU C++17 TESTS 54 171 23449600 2300
47321820 donli E Dec. 21, 2018, 8:13 a.m. OK Java 8 TESTS 54 374 41779200 2300
45741936 guptautkarsh028 E Nov. 14, 2018, 6:54 p.m. OK Java 8 TESTS 54 499 65331200 2300
46786903 spar5h E Dec. 9, 2018, 7:01 a.m. OK Java 8 TESTS 54 514 47923200 2300
45775758 apurvaj E Nov. 15, 2018, 4:58 p.m. OK Java 8 TESTS 54 529 55603200 2300
45979854 BiIIy E Nov. 19, 2018, 9:46 p.m. OK Java 8 TESTS 54 530 85196800 2300
46219052 boltUsain E Nov. 25, 2018, 5:43 p.m. OK Java 8 TESTS 54 561 40448000 2300
45983907 BiIIy E Nov. 20, 2018, 4:37 a.m. OK Java 8 TESTS 54 576 83660800 2300
49956196 mikkk E Feb. 15, 2019, 4:08 p.m. OK Java 8 TESTS 54 639 68915200 2300
49956266 mikkk E Feb. 15, 2019, 4:10 p.m. OK Java 8 TESTS 54 639 68915200 2300
45911453 wadissimo E Nov. 18, 2018, 11:42 a.m. OK Java 8 TESTS 54 655 95846400 2300
47841495 omikad E Jan. 2, 2019, 12:14 p.m. OK Mono C# TESTS 54 717 34713600 2300
45760186 r57shell E Nov. 15, 2018, 8:37 a.m. OK MS C++ TESTS 54 234 40448000 2300
45774588 yakamoto E Nov. 15, 2018, 4:21 p.m. OK Scala TESTS 54 1731 21504000 2300

remove filters

Back to search problems