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 |
|---|---|---|---|---|---|---|
| ( 270 ) | D | Landmarks | PROGRAMMING | data structures dp | 3000 |
We have an old building with n + 2 columns in a row. These columns support the ceiling. These columns are located in points with coordinates 0 = x 0 < x 1 < ... < x n < x n + 1 . The leftmost and the rightmost columns are special, we will call them bearing , the other columns are ordinary . For each column we know its durability d i . Let's consider an ordinary column with coordinate x . Let's assume that the coordinate of the closest to it column to the left (bearing or ordinary) is a and the coordinate of the closest to it column to the right (also, bearing or ordinary) is b . In this task let's assume that this column supports the segment of the ceiling from point to point (here both fractions are considered as real division). If the length of the segment of the ceiling supported by the column exceeds d i , then the column cannot support it and it crashes after a while, and after that the load is being redistributeed between the neighbouring columns according to the same principle. Thus, ordinary columns will be crashing for some time until the process stops at some state. One can prove that the set of the remaining columns doesn't depend on the order in which columns crash. If there are only two bearing columns left in the end, then we assume that the whole construction crashes under the weight of the roof. But if at least one ordinary column stays in addition to the bearing ones, then the building doesn't crash. To make the building stronger, we can add one extra ordinary column of arbitrary durability d ' at any (not necessarily integer) point 0 < x ' < x n + 1 . If point x ' is already occupied by an ordinary column, it is replaced by a new one. Your task is to find out: what minimal durability can the added column have so that the building doesn't crash? The first line contains integer n ( 1 ≤ n ≤ 10 5 ) — the number of ordinary columns. The second line contains n + 2 integers x 0 , x 1 , ..., x n , x n + 1 ( x 0 = 0 , x i < x i + 1 for 0 ≤ i ≤ n , |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 10925344 | zeye | D | April 29, 2015, 6:14 a.m. | OK | GNU C++ | TESTS | 28 | 30 | 50278400 | 3000 | |
| 34502542 | Scut82 | D | Jan. 24, 2018, 3:51 a.m. | OK | GNU C++ | TESTS | 28 | 31 | 5632000 | 3000 | |
| 34502263 | Scut82 | D | Jan. 24, 2018, 3:23 a.m. | OK | GNU C++ | TESTS | 28 | 31 | 5632000 | 3000 | |
| 34502513 | Scut82 | D | Jan. 24, 2018, 3:48 a.m. | OK | GNU C++ | TESTS | 28 | 31 | 5734400 | 3000 | |
| 13907228 | 130705009 | D | Oct. 28, 2015, 1:29 a.m. | OK | GNU C++ | TESTS | 28 | 46 | 1843200 | 3000 | |
| 11582019 | wwt15 | D | June 14, 2015, 1:20 p.m. | OK | GNU C++ | TESTS | 28 | 46 | 2662400 | 3000 | |
| 40986790 | ReaLNero1 | D | July 30, 2018, 8:45 p.m. | OK | GNU C++ | TESTS | 28 | 46 | 3584000 | 3000 | |
| 10833461 | nblt | D | April 23, 2015, 10:12 a.m. | OK | GNU C++ | TESTS | 28 | 46 | 4505600 | 3000 | |
| 35886290 | ______u______ | D | March 3, 2018, 1:43 p.m. | OK | GNU C++ | TESTS | 28 | 46 | 4710400 | 3000 | |
| 35885993 | ______n______ | D | March 3, 2018, 1:38 p.m. | OK | GNU C++ | TESTS | 28 | 46 | 4710400 | 3000 | |
| 54444821 | Isonan | D | May 21, 2019, 10:44 a.m. | OK | GNU C++11 | TESTS | 28 | 46 | 1843200 | 3000 | |
| 15143440 | HappyNewYearMike | D | Dec. 31, 2015, 11:18 p.m. | OK | GNU C++11 | TESTS | 28 | 46 | 2048000 | 3000 | |
| 13765875 | wyxourlove | D | Oct. 21, 2015, 6:10 a.m. | OK | GNU C++11 | TESTS | 28 | 46 | 3072000 | 3000 | |
| 10836414 | krijgertje | D | April 23, 2015, 2:02 p.m. | OK | GNU C++11 | TESTS | 28 | 46 | 4096000 | 3000 | |
| 11037887 | sancho | D | May 8, 2015, 4:12 a.m. | OK | GNU C++11 | TESTS | 28 | 46 | 16793600 | 3000 | |
| 11037898 | sancho | D | May 8, 2015, 4:13 a.m. | OK | GNU C++11 | TESTS | 28 | 46 | 16896000 | 3000 | |
| 26711571 | Charles_Han | D | April 28, 2017, 1:51 a.m. | OK | GNU C++11 | TESTS | 28 | 46 | 62976000 | 3000 | |
| 11679983 | Murtazo.Ali | D | June 20, 2015, 9:34 a.m. | OK | GNU C++11 | TESTS | 28 | 61 | 2048000 | 3000 | |
| 22388921 | geniucos | D | Nov. 21, 2016, 5:15 p.m. | OK | GNU C++11 | TESTS | 28 | 62 | 3174400 | 3000 | |
| 22388887 | geniucos | D | Nov. 21, 2016, 5:13 p.m. | OK | GNU C++11 | TESTS | 28 | 62 | 3993600 | 3000 | |
| 23493992 | Ali.Pi | D | Jan. 2, 2017, 6:32 a.m. | OK | GNU C++14 | TESTS | 28 | 78 | 28160000 | 3000 | |
| 65915479 | sdcgvhgj | D | Nov. 28, 2019, 2:24 p.m. | OK | GNU C++14 | TESTS | 28 | 109 | 13824000 | 3000 | |
| 33066558 | aytel | D | Dec. 9, 2017, 6:26 p.m. | OK | GNU C++14 | TESTS | 28 | 249 | 90009600 | 3000 | |
| 60051003 | Benq | D | Sept. 5, 2019, 12:30 a.m. | OK | GNU C++17 | TESTS | 28 | 62 | 4403200 | 3000 | |
| 60141033 | saketh | D | Sept. 5, 2019, 8:15 p.m. | OK | GNU C++17 | TESTS | 28 | 77 | 6860800 | 3000 | |
| 64129345 | ruo | D | Nov. 3, 2019, 6:16 a.m. | OK | GNU C++17 | TESTS | 28 | 78 | 5734400 | 3000 | |
| 45880662 | _Ore_ | D | Nov. 17, 2018, 1:49 p.m. | OK | GNU C++17 | TESTS | 28 | 93 | 12800000 | 3000 | |
| 50293621 | antontrygubO_o | D | Feb. 21, 2019, 6:56 p.m. | OK | GNU C++17 | TESTS | 28 | 685 | 8806400 | 3000 | |
| 19526666 | AsadoFamiliar | D | July 30, 2016, 9:13 p.m. | OK | Java 8 | TESTS | 28 | 529 | 4300800 | 3000 | |
| 19526618 | martins | D | July 30, 2016, 9:08 p.m. | OK | Java 8 | TESTS | 28 | 529 | 4300800 | 3000 | |
| 19551435 | martins | D | Aug. 1, 2016, 6 a.m. | OK | Java 8 | TESTS | 28 | 545 | 4300800 | 3000 | |
| 10853525 | Manul | D | April 24, 2015, 9:47 p.m. | OK | MS C++ | TESTS | 28 | 62 | 11161600 | 3000 |
Back to search problems