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 |
---|---|---|---|---|---|---|
1193 | CEOI 2019 day 2 online mirror (unrated, IOI format) | FINISHED | False | 18000 | 173138087 | July 28, 2019, 8:05 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 451 ) | B | Magic Tree | PROGRAMMING | *special data structures dp trees |
B'We have a magic tree: a rooted tree on n vertices. The vertices are numbered 1 through n . Vertex 1 is the root. The magic tree gives us magic fruit. The fruit only grows in vertices of the tree other than the root. Each vertex contains at most one piece of fruit. It is now day 0 and no fruit is ripe yet. Each fruit will only be ripe for a single day. For each fruit, we are given the vertex v_j where it grows, the day d_j on which it will be ripe, and the amount w_j of magic juice we can extract from it if we harvest it when it is ripe. The fruits have to be harvested by cutting some branches of the tree. On each day, you may cut as many branches of the tree as you like. The parts of the tree you cut off will fall to the ground and you can collect all the ripe fruits they contain. All fruits that fall to the ground when they are not ripe are discarded and no magic juice is collected from them. Formally, on each day, you may erase some edges of the tree. Whenever you do so, the tree will split into multiple connected components. You then erase all components that do not contain the root and you harvest all ripe fruits those components contained. Given is a description of the tree together with the locations, ripening days and juiciness of all m fruits. Calculate the maximum total amount of magic juice we can harvest from the tree. The first line contains three space-separated integers n ( 2 <= n <= 100,000 ), m ( 1 <= m <= n-1 ) and k ( 1 <= k <= 100,000 ) xe2 x80 x93 the number of vertices, the number of fruits, and the maximum day on which a fruit may become ripe. The following n-1 lines contain the integers p_2, ... , p_n , one per line. For each i (from 2 to n , inclusive), vertex p_i ( 1 <= q p_i <= i-1 ) is the parent of vertex i . Each of the last m lines describes one fruit. The j -th of these lines has the form " v_j '... |
T |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
57978601 | Rose_max | B | July 30, 2019, 8:32 a.m. | OK | GNU C++11 | TESTS | 52 | 108 | 21708800 | ||
57956380 | KMAASZRAA | B | July 29, 2019, 6:57 p.m. | OK | GNU C++11 | TESTS | 52 | 124 | 19763200 | ||
64467208 | foreverlasting | B | Nov. 7, 2019, 12:03 p.m. | OK | GNU C++11 | TESTS | 52 | 124 | 20172800 | ||
66443447 | lx_zjk | B | Dec. 7, 2019, 8:45 a.m. | OK | GNU C++11 | TESTS | 52 | 139 | 67686400 | ||
57926908 | ralismark | B | July 29, 2019, 7:25 a.m. | OK | GNU C++11 | TESTS | 52 | 140 | 22220800 | ||
57918798 | Cu_Y_Es | B | July 29, 2019, 3:15 a.m. | OK | GNU C++11 | TESTS | 52 | 140 | 24473600 | ||
57916385 | KLL | B | July 29, 2019, 1:40 a.m. | OK | GNU C++11 | TESTS | 52 | 140 | 49664000 | ||
57912228 | eriksuenderhauf | B | July 28, 2019, 9:11 p.m. | OK | GNU C++11 | TESTS | 52 | 155 | 26316800 | ||
57912156 | eriksuenderhauf | B | July 28, 2019, 9:06 p.m. | OK | GNU C++11 | TESTS | 52 | 155 | 29491200 | ||
57885601 | TLE | B | July 28, 2019, 9:43 a.m. | OK | GNU C++11 | TESTS | 52 | 156 | 49766400 | ||
64468493 | Minamoto | B | Nov. 7, 2019, 12:24 p.m. | OK | GNU C++14 | TESTS | 52 | 156 | 22732800 | ||
57936869 | SongC | B | July 29, 2019, 11:07 a.m. | OK | GNU C++14 | TESTS | 52 | 171 | 17612800 | ||
61787845 | lqs2015 | B | Oct. 3, 2019, 2:58 p.m. | OK | GNU C++14 | TESTS | 52 | 171 | 20684800 | ||
58004128 | lolicon234 | B | July 30, 2019, 3 p.m. | OK | GNU C++14 | TESTS | 52 | 171 | 21606400 | ||
58003489 | _user090203 | B | July 30, 2019, 2:59 p.m. | OK | GNU C++14 | TESTS | 52 | 171 | 21606400 | ||
57899691 | XarrisApoLemeso | B | July 28, 2019, 3:08 p.m. | OK | GNU C++14 | TESTS | 52 | 171 | 22220800 | ||
58125762 | WLZ | B | Aug. 1, 2019, 12:33 p.m. | OK | GNU C++14 | TESTS | 52 | 171 | 22425600 | ||
70183775 | stefdasca | B | Feb. 3, 2020, 8:47 p.m. | OK | GNU C++14 | TESTS | 52 | 171 | 22630400 | ||
57917526 | ..vince | B | July 29, 2019, 2:28 a.m. | OK | GNU C++14 | TESTS | 52 | 171 | 24883200 | ||
58682503 | MrDecomposition | B | Aug. 12, 2019, 7:48 p.m. | OK | GNU C++14 | TESTS | 52 | 171 | 82739200 | ||
62460386 | nickluo | B | Oct. 13, 2019, 8:02 a.m. | OK | GNU C++17 | TESTS | 52 | 140 | 23040000 | ||
58210139 | flashmt | B | Aug. 3, 2019, 8:32 a.m. | OK | GNU C++17 | TESTS | 52 | 140 | 23347200 | ||
67979761 | Georgy.B | B | Dec. 30, 2019, 6:37 p.m. | OK | GNU C++17 | TESTS | 52 | 140 | 23654400 | ||
64463433 | TheWayISteppedOutTheCar | B | Nov. 7, 2019, 11:06 a.m. | OK | GNU C++17 | TESTS | 52 | 140 | 1017548800 | ||
57901701 | user202729_ | B | July 28, 2019, 3:56 p.m. | OK | GNU C++17 | TESTS | 52 | 155 | 20684800 | ||
57936607 | MAMBA | B | July 29, 2019, 11:01 a.m. | OK | GNU C++17 | TESTS | 52 | 155 | 22323200 | ||
58080220 | keko37 | B | July 31, 2019, 1:40 p.m. | OK | GNU C++17 | TESTS | 52 | 155 | 23347200 | ||
57884730 | dacin21 | B | July 28, 2019, 9:19 a.m. | OK | GNU C++17 | TESTS | 52 | 156 | 17100800 | ||
57889967 | Plurm | B | July 28, 2019, 11:27 a.m. | OK | GNU C++17 | TESTS | 52 | 156 | 21094400 | ||
57923719 | artsin666 | B | July 29, 2019, 6:16 a.m. | OK | GNU C++17 | TESTS | 52 | 156 | 22937600 | ||
58658320 | EmilConst | B | Aug. 12, 2019, 9:57 a.m. | OK | MS C++ 2017 | TESTS | 52 | 389 | 22528000 | ||
57897834 | TOXait | B | July 28, 2019, 2:21 p.m. | OK | MS C++ 2017 | TESTS | 52 | 592 | 185344000 |
Back to search problems