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 |
|---|---|---|---|---|---|---|
| 533 | VK Cup 2015 - Round 2 (unofficial online mirror, Div. 1 only) | FINISHED | False | 9000 | 347119223 | April 17, 2015, 4 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 485 ) | A | Berland Miners | PROGRAMMING | binary search data structures dfs and similar greedy trees | 3000 |
The biggest gold mine in Berland consists of n caves, connected by n - 1 transitions. The entrance to the mine leads to the cave number 1 , it is possible to go from it to any remaining cave of the mine by moving along the transitions. The mine is being developed by the InMine Inc., k miners work for it. Each day the corporation sorts miners into caves so that each cave has at most one miner working there. For each cave we know the height of its ceiling h i in meters, and for each miner we know his height s j , also in meters. If a miner's height doesn't exceed the height of the cave ceiling where he is, then he can stand there comfortably, otherwise, he has to stoop and that makes him unhappy. Unfortunately, miners typically go on strike in Berland, so InMine makes all the possible effort to make miners happy about their work conditions. To ensure that no miner goes on strike, you need make sure that no miner has to stoop at any moment on his way from the entrance to the mine to his cave (in particular, he must be able to stand comfortably in the cave where he works). To reach this goal, you can choose exactly one cave and increase the height of its ceiling by several meters. However enlarging a cave is an expensive and complex procedure. That's why InMine Inc. asks you either to determine the minimum number of meters you should raise the ceiling of some cave so that it is be possible to sort the miners into the caves and keep all miners happy with their working conditions or to determine that it is impossible to achieve by raising ceiling in exactly one cave. The first line contains integer n ( 1 ≤ n ≤ 5·10 5 ) — the number of caves in the mine. Then follows a line consisting of n positive integers h 1 , h 2 , ..., h n ( 1 ≤ h i ≤ 10 9 ), where h i is the height of the ceiling in the i -th cave. Next n - 1 lines contain the descriptions of transitions between the caves. Each line has the form a i , b i ( 1 ≤ a i , b i ≤ n , a i ≠ b i ), where a i and b i |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 28293684 | tlzmybm | A | July 5, 2017, 4:10 a.m. | OK | GNU C++ | TESTS | 40 | 186 | 89497600 | 3000 | |
| 28304626 | zhan8855 | A | July 5, 2017, 1:10 p.m. | OK | GNU C++ | TESTS | 40 | 218 | 42086400 | 3000 | |
| 28211769 | vjudge2 | A | July 2, 2017, 1:58 p.m. | OK | GNU C++ | TESTS | 40 | 218 | 42086400 | 3000 | |
| 13907249 | 130705009 | A | Oct. 28, 2015, 1:34 a.m. | OK | GNU C++ | TESTS | 40 | 218 | 43827200 | 3000 | |
| 11378310 | Dylans | A | June 1, 2015, 12:45 p.m. | OK | GNU C++ | TESTS | 40 | 218 | 43827200 | 3000 | |
| 15914544 | not_bot_but_POT | A | Feb. 9, 2016, 1:47 p.m. | OK | GNU C++ | TESTS | 40 | 233 | 43827200 | 3000 | |
| 35886267 | ______u______ | A | March 3, 2018, 1:43 p.m. | OK | GNU C++ | TESTS | 40 | 233 | 45875200 | 3000 | |
| 35885976 | ______n______ | A | March 3, 2018, 1:38 p.m. | OK | GNU C++ | TESTS | 40 | 233 | 45875200 | 3000 | |
| 35885302 | _____k_____ | A | March 3, 2018, 1:27 p.m. | OK | GNU C++ | TESTS | 40 | 233 | 45875200 | 3000 | |
| 35885007 | _____i_____ | A | March 3, 2018, 1:21 p.m. | OK | GNU C++ | TESTS | 40 | 233 | 45875200 | 3000 | |
| 57359199 | yuzhechuan | A | July 20, 2019, 7:14 a.m. | OK | GNU C++11 | TESTS | 40 | 171 | 67891200 | 3000 | |
| 57886089 | lopare | A | July 28, 2019, 9:58 a.m. | OK | GNU C++11 | TESTS | 40 | 202 | 43827200 | 3000 | |
| 17165445 | freebsdx | A | April 5, 2016, 2:11 a.m. | OK | GNU C++11 | TESTS | 40 | 233 | 45875200 | 3000 | |
| 41277436 | AzraelDeath | A | Aug. 6, 2018, 1:59 p.m. | OK | GNU C++11 | TESTS | 40 | 373 | 46080000 | 3000 | |
| 10833748 | krijgertje | A | April 23, 2015, 10:46 a.m. | OK | GNU C++11 | TESTS | 40 | 405 | 44032000 | 3000 | |
| 40823890 | zhouyuyang | A | July 27, 2018, 1:54 a.m. | OK | GNU C++11 | TESTS | 40 | 452 | 44032000 | 3000 | |
| 51430502 | ff_666 | A | March 17, 2019, 11:27 p.m. | OK | GNU C++11 | TESTS | 40 | 467 | 81100800 | 3000 | |
| 51430547 | ff_666 | A | March 17, 2019, 11:30 p.m. | OK | GNU C++11 | TESTS | 40 | 483 | 81100800 | 3000 | |
| 11679973 | Murtazo.Ali | A | June 20, 2015, 9:33 a.m. | OK | GNU C++11 | TESTS | 40 | 498 | 30310400 | 3000 | |
| 52293351 | IIIOOOIII | A | April 4, 2019, 4:16 a.m. | OK | GNU C++11 | TESTS | 40 | 530 | 75776000 | 3000 | |
| 59836399 | emoairx | A | Sept. 1, 2019, 4:28 a.m. | OK | GNU C++14 | TESTS | 40 | 858 | 40140800 | 3000 | |
| 51329067 | ZigZagK | A | March 15, 2019, 11:23 a.m. | OK | GNU C++14 | TESTS | 40 | 904 | 78131200 | 3000 | |
| 42273789 | MAMBA | A | Aug. 30, 2018, 9:58 a.m. | OK | GNU C++14 | TESTS | 40 | 1231 | 57651200 | 3000 | |
| 41260790 | khsoo01 | A | Aug. 6, 2018, 2:33 a.m. | OK | GNU C++14 | TESTS | 40 | 1231 | 76902400 | 3000 | |
| 42273432 | MAMBA | A | Aug. 30, 2018, 9:46 a.m. | OK | GNU C++14 | TESTS | 40 | 1341 | 80281600 | 3000 | |
| 41153469 | MAMBA | A | Aug. 3, 2018, 10:27 a.m. | OK | GNU C++14 | TESTS | 40 | 1481 | 57548800 | 3000 | |
| 39790942 | golden_deathadder | A | June 30, 2018, 7:38 a.m. | OK | GNU C++14 | TESTS | 40 | 1496 | 57548800 | 3000 | |
| 39790932 | golden_deathadder | A | June 30, 2018, 7:38 a.m. | OK | GNU C++14 | TESTS | 40 | 1590 | 80281600 | 3000 | |
| 39937863 | AryanSM | A | July 3, 2018, 11:23 p.m. | OK | GNU C++14 | TESTS | 40 | 1606 | 90521600 | 3000 | |
| 42270819 | MAMBA | A | Aug. 30, 2018, 8:20 a.m. | OK | GNU C++14 | TESTS | 40 | 1637 | 80281600 | 3000 | |
| 41260125 | ainta | A | Aug. 6, 2018, 1:57 a.m. | OK | GNU C++17 | TESTS | 40 | 1169 | 124825600 | 3000 | |
| 60285480 | Benq | A | Sept. 9, 2019, 1:52 a.m. | OK | GNU C++17 | TESTS | 40 | 1247 | 80691200 | 3000 | |
| 67267765 | vjudge3 | A | Dec. 20, 2019, 6:53 a.m. | OK | GNU C++17 | TESTS | 40 | 1357 | 57958400 | 3000 | |
| 52745869 | Rose_max | A | April 14, 2019, 11:38 a.m. | OK | GNU C++17 | TESTS | 40 | 1388 | 108134400 | 3000 | |
| 50293355 | kefaa2 | A | Feb. 21, 2019, 6:47 p.m. | OK | GNU C++17 | TESTS | 40 | 1574 | 80076800 | 3000 | |
| 51431129 | LTL_td | A | March 18, 2019, 12:21 a.m. | OK | GNU C++17 | TESTS | 40 | 1653 | 60006400 | 3000 | |
| 42273308 | MAMBA | A | Aug. 30, 2018, 9:42 a.m. | OK | GNU C++17 | TESTS | 40 | 1731 | 80281600 | 3000 | |
| 69641191 | AliShahali1382 | A | Jan. 27, 2020, 8:56 p.m. | OK | GNU C++17 | TESTS | 40 | 1809 | 91750400 | 3000 | |
| 69641067 | AliShahali1382 | A | Jan. 27, 2020, 8:53 p.m. | OK | GNU C++17 | TESTS | 40 | 1840 | 91750400 | 3000 | |
| 69641143 | AliShahali1382 | A | Jan. 27, 2020, 8:55 p.m. | OK | GNU C++17 | TESTS | 40 | 1886 | 91852800 | 3000 | |
| 11081807 | mkirsche | A | May 12, 2015, 8:50 p.m. | OK | Java 7 | TESTS | 40 | 2074 | 199987200 | 3000 | |
| 10762428 | Milanin | A | April 17, 2015, 10:56 p.m. | OK | MS C++ | TESTS | 40 | 935 | 42188800 | 3000 |
Back to search problems