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 |
|---|---|---|---|---|---|---|
| 346 | Codeforces Round 201 (Div. 1) | FINISHED | False | 7200 | 396714623 | Sept. 20, 2013, 3:30 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 293 ) | E | Doodle Jump | PROGRAMMING | math number theory | 3000 |
In Doodle Jump the aim is to guide a four-legged creature called "The Doodler" up a never-ending series of platforms without falling. — Wikipedia. It is a very popular game and xiaodao likes it very much. One day when playing the game she wondered whether there exists a platform that the doodler couldn't reach due to the limits of its jumping ability. Consider the following problem. There are n platforms. The height of the x -th ( 1 ≤ x ≤ n ) platform is a · x mod p , where a and p are positive co-prime integers. The maximum possible height of a Doodler's jump is h . That is, it can jump from height h 1 to height h 2 ( h 1 < h 2 ) if h 2 - h 1 ≤ h . Initially, the Doodler is on the ground, the height of which is 0. The question is whether it can reach the highest platform or not. For example, when a = 7 , n = 4 , p = 12 , h = 2 , the heights of the platforms are 7 , 2 , 9 , 4 as in the picture below. With the first jump the Doodler can jump to the platform at height 2 , with the second one the Doodler can jump to the platform at height 4 , but then it can't jump to any of the higher platforms. So, it can't reach the highest platform. User xiaodao thought about the problem for a long time but didn't solve it, so she asks you for help. Also, she has a lot of instances of the problem. Your task is solve all of these instances. The first line contains an integer t (1 ≤ t ≤ 10 4 ) — the number of problem instances. Each of the next t lines contains four integers a , n , p and h ( 1 ≤ a ≤ 10 9 , 1 ≤ n < p ≤ 10 9 , 0 ≤ h ≤ 10 9 ). It's guaranteed that a and p are co-prime. For each problem instance, if the Doodler can reach the highest platform, output " YES ", otherwise output " NO ". |
| Codeforces Round #201 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 4573853 | DaibaNana | E | Sept. 27, 2013, 2:34 p.m. | OK | FPC | TESTS | 11 | 30 | 0 | 3000 | |
| 4531461 | RoundDog | E | Sept. 21, 2013, 2:21 p.m. | OK | FPC | TESTS | 11 | 92 | 0 | 3000 | |
| 31268620 | Voja03 | E | Oct. 13, 2017, 8:24 a.m. | OK | GNU C | TESTS | 11 | 62 | 0 | 3000 | |
| 31236409 | Voja03 | E | Oct. 12, 2017, 9:14 a.m. | OK | GNU C | TESTS | 11 | 92 | 0 | 3000 | |
| 31236379 | Voja03 | E | Oct. 12, 2017, 9:13 a.m. | OK | GNU C | TESTS | 11 | 92 | 102400 | 3000 | |
| 15141505 | HappyNewYearMike | E | Dec. 31, 2015, 9:34 p.m. | OK | GNU C++ | TESTS | 11 | 30 | 0 | 3000 | |
| 14041581 | 130705009 | E | Nov. 3, 2015, 12:44 p.m. | OK | GNU C++ | TESTS | 11 | 30 | 0 | 3000 | |
| 12215370 | enot110 | E | July 24, 2015, 2:21 p.m. | OK | GNU C++ | TESTS | 11 | 30 | 0 | 3000 | |
| 9497260 | SkyDec | E | Jan. 22, 2015, 1:12 a.m. | OK | GNU C++ | TESTS | 11 | 30 | 0 | 3000 | |
| 9421885 | faebdc | E | Jan. 13, 2015, 7:21 a.m. | OK | GNU C++ | TESTS | 11 | 30 | 0 | 3000 | |
| 9237368 | wwx | E | Dec. 24, 2014, 2:40 a.m. | OK | GNU C++ | TESTS | 11 | 30 | 0 | 3000 | |
| 8977671 | Lazycal | E | Dec. 4, 2014, 6:43 a.m. | OK | GNU C++ | TESTS | 11 | 30 | 0 | 3000 | |
| 8807908 | Aponoia | E | Nov. 23, 2014, 2:02 a.m. | OK | GNU C++ | TESTS | 11 | 30 | 0 | 3000 | |
| 8801308 | abel | E | Nov. 22, 2014, 11:59 a.m. | OK | GNU C++ | TESTS | 11 | 30 | 0 | 3000 | |
| 8546099 | jiry_2 | E | Nov. 4, 2014, 11:53 a.m. | OK | GNU C++ | TESTS | 11 | 30 | 0 | 3000 | |
| 7258037 | contest1234 | E | July 27, 2014, 2:56 p.m. | OK | GNU C++0x | TESTS | 11 | 30 | 0 | 3000 | |
| 5023200 | Archon.JK | E | Nov. 7, 2013, 1:55 p.m. | OK | GNU C++0x | TESTS | 11 | 30 | 0 | 3000 | |
| 5023120 | Archon.JK | E | Nov. 7, 2013, 1:44 p.m. | OK | GNU C++0x | TESTS | 11 | 30 | 0 | 3000 | |
| 4564198 | pompon | E | Sept. 25, 2013, 11:10 p.m. | OK | GNU C++0x | TESTS | 11 | 30 | 0 | 3000 | |
| 9668262 | MamZi | E | Feb. 1, 2015, 5:41 p.m. | OK | GNU C++0x | TESTS | 11 | 248 | 0 | 3000 | |
| 14487028 | HJWJBSR | E | Nov. 26, 2015, 3:13 a.m. | OK | GNU C++11 | TESTS | 11 | 30 | 0 | 3000 | |
| 12229282 | -XraY- | E | July 26, 2015, 7:22 a.m. | OK | GNU C++11 | TESTS | 11 | 30 | 0 | 3000 | |
| 17167696 | yao11617 | E | April 5, 2016, 8:15 a.m. | OK | GNU C++11 | TESTS | 11 | 30 | 1843200 | 3000 | |
| 28035107 | jiazihankk | E | June 25, 2017, 4:03 p.m. | OK | GNU C++11 | TESTS | 11 | 30 | 1945600 | 3000 | |
| 21467695 | alex_Harry | E | Oct. 15, 2016, 9:04 p.m. | OK | GNU C++11 | TESTS | 11 | 30 | 2048000 | 3000 | |
| 21819997 | xwind | E | Oct. 27, 2016, 11:37 a.m. | OK | GNU C++11 | TESTS | 11 | 60 | 0 | 3000 | |
| 15824994 | walkhorse | E | Feb. 5, 2016, 12:40 p.m. | OK | GNU C++11 | TESTS | 11 | 60 | 0 | 3000 | |
| 12403968 | syc1999 | E | Aug. 7, 2015, 2:52 p.m. | OK | GNU C++11 | TESTS | 11 | 60 | 0 | 3000 | |
| 17131816 | freebsdx | E | April 2, 2016, 2:28 p.m. | OK | GNU C++11 | TESTS | 11 | 60 | 2048000 | 3000 | |
| 50817720 | xiaolin3 | E | March 5, 2019, 12:14 p.m. | OK | GNU C++11 | TESTS | 11 | 62 | 0 | 3000 | |
| 50817019 | stepsys | E | March 5, 2019, 11:57 a.m. | OK | GNU C++14 | TESTS | 11 | 60 | 204800 | 3000 | |
| 57946484 | Origenes | E | July 29, 2019, 2:33 p.m. | OK | GNU C++14 | TESTS | 11 | 62 | 0 | 3000 | |
| 47358523 | applese | E | Dec. 22, 2018, 7:29 a.m. | OK | GNU C++14 | TESTS | 11 | 62 | 0 | 3000 | |
| 41448623 | Timsei | E | Aug. 11, 2018, 2:19 a.m. | OK | GNU C++14 | TESTS | 11 | 62 | 0 | 3000 | |
| 26094282 | abczyxb | E | April 3, 2017, 8:20 a.m. | OK | GNU C++14 | TESTS | 11 | 62 | 1945600 | 3000 | |
| 67267221 | ElangBondol | E | Dec. 20, 2019, 6:41 a.m. | OK | GNU C++14 | TESTS | 11 | 92 | 0 | 3000 | |
| 65894656 | davidberard | E | Nov. 28, 2019, 5:28 a.m. | OK | GNU C++14 | TESTS | 11 | 92 | 0 | 3000 | |
| 56459662 | Scut82 | E | July 3, 2019, 6:12 a.m. | OK | GNU C++14 | TESTS | 11 | 92 | 0 | 3000 | |
| 23660857 | Ali.Pi | E | Jan. 9, 2017, 6:30 a.m. | OK | GNU C++14 | TESTS | 11 | 280 | 1945600 | 3000 | |
| 58820222 | Benq | E | Aug. 14, 2019, 1:51 p.m. | OK | GNU C++17 | TESTS | 11 | 62 | 0 | 3000 | |
| 58968827 | 89264270823 | E | Aug. 17, 2019, 7:09 p.m. | OK | GNU C++17 | TESTS | 11 | 92 | 0 | 3000 | |
| 47430968 | FariduN_05 | E | Dec. 23, 2018, 4:14 p.m. | OK | GNU C++17 | TESTS | 11 | 216 | 819200 | 3000 | |
| 47619175 | ONE_DAY_I_WILL | E | Dec. 28, 2018, 12:01 p.m. | OK | GNU C++17 | TESTS | 11 | 218 | 0 | 3000 | |
| 47619158 | ONE_DAY_I_WILL | E | Dec. 28, 2018, 12:01 p.m. | OK | GNU C++17 | TESTS | 11 | 248 | 204800 | 3000 | |
| 7257892 | Tparsa | E | July 27, 2014, 2:34 p.m. | OK | Java 6 | TESTS | 11 | 186 | 0 | 3000 | |
| 4523388 | Petr | E | Sept. 20, 2013, 6:18 p.m. | OK | Java 7 | TESTS | 11 | 186 | 0 | 3000 | |
| 6428921 | URSU | E | April 20, 2014, 11:47 a.m. | OK | Java 7 | TESTS | 11 | 216 | 0 | 3000 | |
| 4537021 | Chromefish | E | Sept. 22, 2013, 1:29 p.m. | OK | MS C++ | TESTS | 11 | 30 | 0 | 3000 | |
| 5838964 | gigenceto.14 | E | Jan. 30, 2014, 2:11 p.m. | OK | MS C++ | TESTS | 11 | 124 | 0 | 3000 | |
| 5865715 | gigenceto.14 | E | Feb. 1, 2014, 10:31 p.m. | OK | MS C++ | TESTS | 11 | 154 | 0 | 3000 | |
| 8286540 | Im_too_old_for_this_shit | E | Oct. 17, 2014, 7:24 p.m. | OK | MS C++ | TESTS | 11 | 248 | 9625600 | 3000 |
Back to search problems