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 |
|---|---|---|---|---|---|---|
| 955 | Codeforces Round 471 (Div. 2) | FINISHED | False | 9000 | 254582723 | March 23, 2018, 4:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 102 ) | E | Icicles | PROGRAMMING | 2900 |
Andrew's favourite Krakozyabra has recenly fled away and now he's eager to bring it back! At the moment the refugee is inside an icy cave with n icicles dangling from the ceiling located in integer coordinates numbered from 1 to n . The distance between floor and the i -th icicle is equal to a i . Andrew is free to choose an arbitrary integer point T in range from 1 to n inclusive and at time instant 0 launch a sound wave spreading into both sides (left and right) at the speed of one point per second. Any icicle touched by the wave starts falling at the same speed (that means that in a second the distance from floor to icicle decreases by one but cannot become less that zero). While distance from icicle to floor is more than zero, it is considered passable; as soon as it becomes zero, the icicle blocks the path and prohibits passing. Krakozyabra is initially (i.e. at time instant 0 ) is located at point and starts running in the right direction at the speed of one point per second. You can assume that events in a single second happen in the following order: first Krakozyabra changes its position, and only then the sound spreads and icicles fall; in particular, that means that if Krakozyabra is currently at point and the falling (i.e. already touched by the sound wave) icicle at point i is 1 point from the floor, then Krakozyabra will pass it and find itself at and only after that the icicle will finally fall and block the path. Krakozyabra is considered entrapped if there are fallen (i.e. with a i = 0 ) icicles both to the left and to the right of its current position. Help Andrew find the minimum possible time it takes to entrap Krakozyabra by choosing the optimal value of T or report that this mission is impossible. The first line contains the number of icicles n (2 ≤ n ≤ 10 5 ) . The next line contains n space-separated numbers a i (1 ≤ a i ≤ 10 5 ) — the distances from floor to icicles. Print an only integer — the minimum time it takes to entrap Krakoz |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 36670235 | bestFy | E | March 27, 2018, 2:03 p.m. | OK | GNU C++ | TESTS | 100 | 93 | 34713600 | 2900 | |
| 36657207 | zyyorz | E | March 27, 2018, 2:34 a.m. | OK | GNU C++ | TESTS | 100 | 249 | 27136000 | 2900 | |
| 36647106 | guille | E | March 26, 2018, 3:38 p.m. | OK | GNU C++ | TESTS | 100 | 326 | 44339200 | 2900 | |
| 40932599 | ReaLNero1 | E | July 30, 2018, 1:54 a.m. | OK | GNU C++11 | TESTS | 100 | 62 | 25702400 | 2900 | |
| 36552751 | 08163268 | E | March 23, 2018, 6:56 p.m. | OK | GNU C++11 | TESTS | 100 | 62 | 29184000 | 2900 | |
| 37672478 | krijgertje | E | April 27, 2018, 9:32 p.m. | OK | GNU C++11 | TESTS | 100 | 78 | 25292800 | 2900 | |
| 37658288 | LucasS | E | April 27, 2018, 11:14 a.m. | OK | GNU C++11 | TESTS | 100 | 93 | 8806400 | 2900 | |
| 57870129 | lopare | E | July 28, 2019, 1:01 a.m. | OK | GNU C++11 | TESTS | 100 | 93 | 24883200 | 2900 | |
| 37121876 | Nidhoggsun | E | April 9, 2018, 12:42 p.m. | OK | GNU C++11 | TESTS | 100 | 93 | 28364800 | 2900 | |
| 37121522 | zhouyuyang | E | April 9, 2018, 12:27 p.m. | OK | GNU C++11 | TESTS | 100 | 93 | 28364800 | 2900 | |
| 36714087 | perchema | E | March 29, 2018, 9:15 a.m. | OK | GNU C++11 | TESTS | 100 | 109 | 7782400 | 2900 | |
| 57740552 | py_ultron | E | July 25, 2019, 11:20 a.m. | OK | GNU C++11 | TESTS | 100 | 109 | 24883200 | 2900 | |
| 36977526 | danya090699 | E | April 4, 2018, 5:08 p.m. | OK | GNU C++11 | TESTS | 100 | 124 | 10342400 | 2900 | |
| 36566380 | lnzva | E | March 24, 2018, 7:23 a.m. | OK | GNU C++14 | TESTS | 100 | 109 | 22425600 | 2900 | |
| 37475881 | MohamedMagdy | E | April 20, 2018, 2:21 a.m. | OK | GNU C++14 | TESTS | 100 | 109 | 28262400 | 2900 | |
| 36638216 | Kerim.K | E | March 26, 2018, 10:14 a.m. | OK | GNU C++14 | TESTS | 100 | 124 | 8806400 | 2900 | |
| 36578307 | Farhod_Farmon | E | March 24, 2018, 3:01 p.m. | OK | GNU C++14 | TESTS | 100 | 124 | 8908800 | 2900 | |
| 36670211 | bestFy | E | March 27, 2018, 2:02 p.m. | OK | GNU C++14 | TESTS | 100 | 124 | 34508800 | 2900 | |
| 36603507 | dai | E | March 24, 2018, 8:16 p.m. | OK | GNU C++14 | TESTS | 100 | 139 | 81510400 | 2900 | |
| 36726064 | 1756500824 | E | March 29, 2018, 4:09 p.m. | OK | GNU C++14 | TESTS | 100 | 140 | 28467200 | 2900 | |
| 36555135 | SherlockyHolmes | E | March 23, 2018, 8:21 p.m. | OK | GNU C++14 | TESTS | 100 | 171 | 13414400 | 2900 | |
| 36626277 | Filyan | E | March 25, 2018, 7:39 p.m. | OK | GNU C++14 | TESTS | 100 | 171 | 25088000 | 2900 | |
| 36550349 | chemthan | E | March 23, 2018, 6:29 p.m. | OK | GNU C++14 | TESTS | 100 | 187 | 6963200 | 2900 | |
| 46131735 | Benq | E | Nov. 24, 2018, 1:46 a.m. | OK | GNU C++17 | TESTS | 100 | 93 | 20275200 | 2900 | |
| 36607823 | ditoly | E | March 25, 2018, 7:01 a.m. | OK | GNU C++17 | TESTS | 100 | 234 | 8499200 | 2900 | |
| 62589854 | dorijanlendvaj | E | Oct. 14, 2019, 8:29 p.m. | OK | GNU C++17 | TESTS | 100 | 717 | 2560000 | 2900 | |
| 37498513 | watermoo | E | April 20, 2018, 9:36 p.m. | OK | GNU C++17 | TESTS | 100 | 2293 | 7270400 | 2900 | |
| 37110572 | kost | E | April 8, 2018, 10:46 p.m. | OK | Haskell | TESTS | 100 | 748 | 179507200 | 2900 |
Back to search problems