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 |
|---|---|---|---|---|---|---|
| 2055 | Codeforces Round 996 (Div. 2) | FINISHED | False | 7200 | 39713123 | Jan. 12, 2025, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 4351 ) | D | Scarecrow | PROGRAMMING | binary search greedy |
A crow is sitting at position (0) of the number line. There are (n) scarecrows positioned at integer coordinates (a_1, a_2, \ldots, a_n) along the number line. These scarecrows have been enchanted, allowing them to move left and right at a speed of (1) unit per second. The crow is afraid of scarecrows and wants to stay at least a distance of (k) ahead of the nearest scarecrow positioned at or before it. To do so, the crow uses its teleportation ability as follows: Let (x) be the current position of the crow, and let (y) be the largest position of a scarecrow such that (y \le x). If (x - y < k), meaning the scarecrow is too close, the crow will instantly teleport to position (y + k). This teleportation happens instantly and continuously. The crow will keep checking for scarecrows positioned at or to the left of him and teleport whenever one gets too close (which could happen at non-integral times). Note that besides this teleportation ability, the crow will not move on its own. Your task is to determine the minimum time required to make the crow teleport to a position greater than or equal to (\ell), assuming the scarecrows move optimally to allow the crow to reach its goal. For convenience, you are asked to output twice the minimum time needed for the crow to reach the target position (\ell). It can be proven that this value will always be an integer. Note that the scarecrows can start, stop, or change direction at any time (possibly at non-integral times). Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 10^4)). The description of the test cases follows. The first line of each test case contains three integers (n, k, \ell) ((1 \leq n \leq 2 \cdot 10^5), (1 \leq k \leq \ell \leq 10^8)) — the number of scarecrows, the teleportation distance, and the target position of the crow, respectively. The second line of each test case contains |
| Codeforces Round 996 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 300742628 | iceylemon157 | D | Jan. 12, 2025, 4:26 p.m. | OK | C# 10 | TESTS | 30 | 140 | 20480000 | ||
| 300782540 | Subingbupt | D | Jan. 13, 2025, 3:40 a.m. | OK | C++17 (GCC 7-32) | TESTS | 30 | 92 | 102400 | ||
| 300750235 | niter | D | Jan. 12, 2025, 5:39 p.m. | OK | C++17 (GCC 7-32) | TESTS | 30 | 92 | 102400 | ||
| 300790371 | shubham_07 | D | Jan. 13, 2025, 5:26 a.m. | OK | C++17 (GCC 7-32) | TESTS | 30 | 93 | 0 | ||
| 300785393 | ak728 | D | Jan. 13, 2025, 4:21 a.m. | OK | C++17 (GCC 7-32) | TESTS | 30 | 93 | 0 | ||
| 300772073 | anuraganand | D | Jan. 12, 2025, 10:59 p.m. | OK | C++17 (GCC 7-32) | TESTS | 30 | 93 | 0 | ||
| 300758590 | ThanhABC | D | Jan. 12, 2025, 6:43 p.m. | OK | C++17 (GCC 7-32) | TESTS | 30 | 93 | 0 | ||
| 300793005 | berojgar1905 | D | Jan. 13, 2025, 5:55 a.m. | OK | C++17 (GCC 7-32) | TESTS | 30 | 93 | 102400 | ||
| 300789656 | timelimited | D | Jan. 13, 2025, 5:17 a.m. | OK | C++17 (GCC 7-32) | TESTS | 30 | 93 | 102400 | ||
| 300788582 | Pumkinhead_Me | D | Jan. 13, 2025, 5:05 a.m. | OK | C++17 (GCC 7-32) | TESTS | 30 | 93 | 102400 | ||
| 300787497 | faiz | D | Jan. 13, 2025, 4:51 a.m. | OK | C++17 (GCC 7-32) | TESTS | 30 | 93 | 102400 | ||
| 300774860 | www_bilibili_com | D | Jan. 13, 2025, 12:54 a.m. | OK | C++20 (GCC 13-64) | TESTS | 30 | 62 | 921600 | ||
| 300784414 | 4.5Tatami | D | Jan. 13, 2025, 4:07 a.m. | OK | C++20 (GCC 13-64) | TESTS | 30 | 77 | 0 | ||
| 300770145 | itsarankit | D | Jan. 12, 2025, 9:55 p.m. | OK | C++20 (GCC 13-64) | TESTS | 30 | 77 | 0 | ||
| 300761307 | Mohamed308 | D | Jan. 12, 2025, 7:14 p.m. | OK | C++20 (GCC 13-64) | TESTS | 30 | 77 | 0 | ||
| 300794259 | EkkoTM | D | Jan. 13, 2025, 6:07 a.m. | OK | C++20 (GCC 13-64) | TESTS | 30 | 77 | 102400 | ||
| 300794230 | EkkoTM | D | Jan. 13, 2025, 6:07 a.m. | OK | C++20 (GCC 13-64) | TESTS | 30 | 77 | 102400 | ||
| 300793913 | EkkoTM | D | Jan. 13, 2025, 6:03 a.m. | OK | C++20 (GCC 13-64) | TESTS | 30 | 77 | 102400 | ||
| 300789649 | ikunnnna | D | Jan. 13, 2025, 5:17 a.m. | OK | C++20 (GCC 13-64) | TESTS | 30 | 77 | 102400 | ||
| 300782336 | YJWYYDS | D | Jan. 13, 2025, 3:36 a.m. | OK | C++20 (GCC 13-64) | TESTS | 30 | 77 | 102400 | ||
| 300777224 | chenliyuan | D | Jan. 13, 2025, 1:58 a.m. | OK | C++20 (GCC 13-64) | TESTS | 30 | 77 | 102400 | ||
| 300790883 | arikrrr77 | D | Jan. 13, 2025, 5:33 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 30 | 77 | 102400 | ||
| 300786802 | Garvit_Goyal | D | Jan. 13, 2025, 4:40 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 30 | 77 | 102400 | ||
| 300779171 | n685 | D | Jan. 13, 2025, 2:42 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 30 | 77 | 102400 | ||
| 300777108 | lasbase | D | Jan. 13, 2025, 1:55 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 30 | 77 | 102400 | ||
| 300775967 | ywxk | D | Jan. 13, 2025, 1:27 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 30 | 77 | 102400 | ||
| 300774876 | kimo | D | Jan. 13, 2025, 12:54 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 30 | 77 | 102400 | ||
| 300771114 | Zeyush | D | Jan. 12, 2025, 10:25 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 30 | 77 | 102400 | ||
| 300768464 | belgianbot | D | Jan. 12, 2025, 9:12 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 30 | 77 | 102400 | ||
| 300744670 | pc19937 | D | Jan. 12, 2025, 4:30 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 30 | 77 | 102400 | ||
| 300739232 | Nhihsgqghcv | D | Jan. 12, 2025, 4:18 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 30 | 77 | 1638400 | ||
| 300772530 | rainboy | D | Jan. 12, 2025, 11:17 p.m. | OK | GNU C11 | TESTS | 30 | 93 | 921600 | ||
| 300754966 | yash22101 | D | Jan. 12, 2025, 6:08 p.m. | OK | GNU C11 | TESTS | 30 | 93 | 1740800 | ||
| 300792496 | METASEKOIA | D | Jan. 13, 2025, 5:50 a.m. | OK | Go | TESTS | 30 | 140 | 3788800 | ||
| 300758166 | akshatsaxena552004.ss | D | Jan. 12, 2025, 6:39 p.m. | OK | Java 21 | TESTS | 30 | 296 | 819200 | ||
| 300756109 | Lilypad | D | Jan. 12, 2025, 6:19 p.m. | OK | Java 21 | TESTS | 30 | 312 | 716800 | ||
| 300767594 | polsage | D | Jan. 12, 2025, 8:51 p.m. | OK | Java 21 | TESTS | 30 | 312 | 1945600 | ||
| 300750712 | coderr112 | D | Jan. 12, 2025, 5:40 p.m. | OK | Java 21 | TESTS | 30 | 327 | 1126400 | ||
| 300757684 | PlayDate | D | Jan. 12, 2025, 6:33 p.m. | OK | Java 21 | TESTS | 30 | 328 | 1843200 | ||
| 300752006 | sahasrad | D | Jan. 12, 2025, 5:47 p.m. | OK | Java 21 | TESTS | 30 | 343 | 1945600 | ||
| 300775483 | testtest111ksjfrdvn | D | Jan. 13, 2025, 1:13 a.m. | OK | Java 21 | TESTS | 30 | 358 | 2867200 | ||
| 300768745 | testtest111ksjfrdvn | D | Jan. 12, 2025, 9:19 p.m. | OK | Java 21 | TESTS | 30 | 358 | 2969600 | ||
| 300775573 | testtest111ksjfrdvn | D | Jan. 13, 2025, 1:15 a.m. | OK | Java 21 | TESTS | 30 | 359 | 2867200 | ||
| 300772166 | testtest111ksjfrdvn | D | Jan. 12, 2025, 11:03 p.m. | OK | Java 21 | TESTS | 30 | 359 | 3788800 | ||
| 300750112 | RockStar_14 | D | Jan. 12, 2025, 5:39 p.m. | OK | Java 8 | TESTS | 30 | 171 | 0 | ||
| 300745153 | 1091857051 | D | Jan. 12, 2025, 4:31 p.m. | OK | Java 8 | TESTS | 30 | 218 | 4915200 | ||
| 300780080 | InfinityX | D | Jan. 13, 2025, 3 a.m. | OK | Java 8 | TESTS | 30 | 234 | 4198400 | ||
| 300791817 | Vaibhav_Domadia | D | Jan. 13, 2025, 5:42 a.m. | OK | Kotlin 1.9 | TESTS | 30 | 312 | 16486400 | ||
| 300791643 | The_Bharadwaj | D | Jan. 13, 2025, 5:40 a.m. | OK | Node.js | TESTS | 30 | 312 | 19046400 | ||
| 300750278 | sushmanth.dampur8780 | D | Jan. 12, 2025, 5:39 p.m. | OK | PyPy 3-64 | TESTS | 30 | 140 | 28262400 | ||
| 300773884 | sygi | D | Jan. 13, 2025, 12:15 a.m. | OK | PyPy 3-64 | TESTS | 30 | 156 | 29900800 | ||
| 300776059 | nather73 | D | Jan. 13, 2025, 1:30 a.m. | OK | PyPy 3-64 | TESTS | 30 | 171 | 27955200 | ||
| 300769655 | ossau | D | Jan. 12, 2025, 9:42 p.m. | OK | PyPy 3-64 | TESTS | 30 | 171 | 30310400 | ||
| 300786394 | ketuOP | D | Jan. 13, 2025, 4:35 a.m. | OK | PyPy 3-64 | TESTS | 30 | 186 | 27136000 | ||
| 300745261 | FTGUPP | D | Jan. 12, 2025, 4:31 p.m. | OK | PyPy 3-64 | TESTS | 30 | 186 | 27238400 | ||
| 300792585 | Charles_LHN | D | Jan. 13, 2025, 5:50 a.m. | OK | PyPy 3-64 | TESTS | 30 | 187 | 27033600 | ||
| 300742914 | ThatOnePythonUser | D | Jan. 12, 2025, 4:26 p.m. | OK | PyPy 3-64 | TESTS | 30 | 187 | 28057600 | ||
| 300773840 | sygi | D | Jan. 13, 2025, 12:13 a.m. | OK | PyPy 3-64 | TESTS | 30 | 187 | 29593600 | ||
| 300742361 | DeadMan69 | D | Jan. 12, 2025, 4:25 p.m. | OK | PyPy 3-64 | TESTS | 30 | 187 | 30412800 | ||
| 300790946 | DeterminedSage | D | Jan. 13, 2025, 5:33 a.m. | OK | Python 3 | TESTS | 30 | 217 | 28057600 | ||
| 300791409 | DeterminedSage | D | Jan. 13, 2025, 5:38 a.m. | OK | Python 3 | TESTS | 30 | 218 | 27340800 | ||
| 300750319 | ielenik | D | Jan. 12, 2025, 5:39 p.m. | OK | Python 3 | TESTS | 30 | 265 | 25702400 | ||
| 300753531 | the_mmed | D | Jan. 12, 2025, 5:57 p.m. | OK | Rust 2021 | TESTS | 30 | 93 | 11878400 |
Back to search problems