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 |
|---|---|---|---|---|---|---|
| 1250 | 2019-2020 ICPC, NERC, Southern and Volga Russian Regional Contest (Online Mirror, ICPC Rules, Teams Preferred) | FINISHED | False | 18000 | 204236723 | Oct. 27, 2019, 9:35 a.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 774 ) | G | Discarding Game | PROGRAMMING | dp greedy two pointers | 2400 |
Eulampius has created a game with the following rules: there are two players in the game: a human and a computer; the game lasts for no more than (n) rounds. Initially both players have (0) points. In the (j)-th round the human gains (a_j) points, and the computer gains (b_j) points. The points are gained simultaneously; the game ends when one of the players gets (k) or more points. This player loses the game. If both players get (k) or more points simultaneously, both lose; if both players have less than (k) points after (n) rounds, the game ends in a tie; after each round the human can push the "Reset" button. If the human had (x) points, and the computer had (y) points before the button is pushed (of course, (x < k) and (y < k)), then after the button is pushed the human will have (x' = max(0, \, x - y)) points, and the computer will have (y' = max(0, \, y - x)) points. E. g. the push of "Reset" button transforms the state ((x=3, \, y=5)) into the state ((x'=0, \, y'=2)), and the state ((x=8, \, y=2)) into the state ((x'=6, \, y'=0)). Eulampius asked his friend Polycarpus to test the game. Polycarpus has quickly revealed that amounts of points gained by the human and the computer in each of (n) rounds are generated before the game and stored in a file. In other words, the pushes of the "Reset" button do not influence the values (a_j) and (b_j), so sequences (a) and (b) are fixed and known in advance. Polycarpus wants to make a plan for the game. He would like to win the game pushing the "Reset" button as few times as possible. Your task is to determine this minimal number of pushes or determine that Polycarpus cannot win. The first line of the input contains one integer (t) ((1 \le t \le 10000)) — the number of test cases. Then the test cases follow. The first line of each test case contains two integers (n) and (k) ($$$1 \le n \le 2 \cdot 10^ |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 64349075 | Fubuki | G | Nov. 6, 2019, 7:35 a.m. | OK | GNU C++11 | TESTS | 51 | 62 | 7270400 | 2400 | |
| 64091410 | pufanyi | G | Nov. 2, 2019, 12:44 p.m. | OK | GNU C++11 | TESTS | 51 | 77 | 3379200 | 2400 | |
| 63978721 | wang9897 qkoqhh fffasttime | G | Nov. 1, 2019, 9:27 a.m. | OK | GNU C++11 | TESTS | 51 | 77 | 6451200 | 2400 | |
| 64187688 | Dancepted | G | Nov. 4, 2019, 6:12 a.m. | OK | GNU C++11 | TESTS | 51 | 77 | 14438400 | 2400 | |
| 64774367 | pufanyi | G | Nov. 13, 2019, 2:58 a.m. | OK | GNU C++11 | TESTS | 51 | 78 | 3379200 | 2400 | |
| 63558648 | daifucong pufanyi | G | Oct. 27, 2019, 1:36 p.m. | OK | GNU C++11 | TESTS | 51 | 78 | 3379200 | 2400 | |
| 64455608 | myx12345 | G | Nov. 7, 2019, 8:37 a.m. | OK | GNU C++11 | TESTS | 51 | 92 | 20070400 | 2400 | |
| 64782848 | henu_16l_lxl | G | Nov. 13, 2019, 7:59 a.m. | OK | GNU C++11 | TESTS | 51 | 108 | 6348800 | 2400 | |
| 64450843 | vjudge4 | G | Nov. 7, 2019, 7:02 a.m. | OK | GNU C++11 | TESTS | 51 | 109 | 4812800 | 2400 | |
| 63551421 | panole zx2003 | G | Oct. 27, 2019, 11:46 a.m. | OK | GNU C++11 | TESTS | 51 | 109 | 7270400 | 2400 | |
| 63759738 | tokitsukaze | G | Oct. 30, 2019, 2:51 a.m. | OK | GNU C++14 | TESTS | 51 | 62 | 6758400 | 2400 | |
| 63556657 | vito1036 BorisBarca | G | Oct. 27, 2019, 1:04 p.m. | OK | GNU C++14 | TESTS | 51 | 77 | 4812800 | 2400 | |
| 63553885 | lamejeck Zoli9 | G | Oct. 27, 2019, 12:21 p.m. | OK | GNU C++14 | TESTS | 51 | 124 | 4812800 | 2400 | |
| 64431541 | jk89 | G | Nov. 6, 2019, 9:36 p.m. | OK | GNU C++14 | TESTS | 51 | 139 | 4812800 | 2400 | |
| 64895101 | yashChandnani anayMehrotra gravito12345 | G | Nov. 14, 2019, 4:15 p.m. | OK | GNU C++14 | TESTS | 51 | 139 | 6451200 | 2400 | |
| 63786406 | oipotato Subconscious chenjb | G | Oct. 30, 2019, 12:26 p.m. | OK | GNU C++14 | TESTS | 51 | 139 | 9011200 | 2400 | |
| 63647163 | Origenes OAHOBOHAO emmah | G | Oct. 28, 2019, 10:08 a.m. | OK | GNU C++14 | TESTS | 51 | 139 | 11059200 | 2400 | |
| 64291902 | Chirography_11 stratoes dzerzhinski | G | Nov. 5, 2019, 7:20 a.m. | OK | GNU C++14 | TESTS | 51 | 139 | 33177600 | 2400 | |
| 63667764 | Yousef_Salama | G | Oct. 28, 2019, 3:55 p.m. | OK | GNU C++14 | TESTS | 51 | 140 | 3174400 | 2400 | |
| 63608666 | little_misfortune | G | Oct. 27, 2019, 4:13 p.m. | OK | GNU C++14 | TESTS | 51 | 140 | 3379200 | 2400 | |
| 69417479 | randomusername YaoBIG please_delete_account | G | Jan. 23, 2020, 1:29 p.m. | OK | GNU C++17 | TESTS | 51 | 139 | 7987200 | 2400 | |
| 64190904 | hank55663 | G | Nov. 4, 2019, 7:41 a.m. | OK | GNU C++17 | TESTS | 51 | 139 | 9625600 | 2400 | |
| 65421504 | Ali.Kh | G | Nov. 20, 2019, 9:06 a.m. | OK | GNU C++17 | TESTS | 51 | 140 | 3174400 | 2400 | |
| 63938363 | masamasa zygzagZ | G | Oct. 31, 2019, 4:39 p.m. | OK | GNU C++17 | TESTS | 51 | 140 | 4812800 | 2400 | |
| 63934258 | wasyl Jon tymo | G | Oct. 31, 2019, 3:19 p.m. | OK | GNU C++17 | TESTS | 51 | 140 | 4812800 | 2400 | |
| 66248698 | KonaeAkira | G | Dec. 3, 2019, 10:48 p.m. | OK | GNU C++17 | TESTS | 51 | 140 | 5632000 | 2400 | |
| 63913162 | Anadi MicGor | G | Oct. 31, 2019, 9:04 a.m. | OK | GNU C++17 | TESTS | 51 | 140 | 7270400 | 2400 | |
| 64076059 | runfeng1998 aircat H4XeO6 | G | Nov. 2, 2019, 8:49 a.m. | OK | GNU C++17 | TESTS | 51 | 140 | 12595200 | 2400 | |
| 63990219 | msporyshev | G | Nov. 1, 2019, 12:54 p.m. | OK | GNU C++17 | TESTS | 51 | 155 | 4812800 | 2400 | |
| 63935706 | I_love_chickpea xman1024 Juzek | G | Oct. 31, 2019, 3:46 p.m. | OK | GNU C++17 | TESTS | 51 | 155 | 4812800 | 2400 | |
| 63554171 | spar5h Jeel_Vaishnav Ashish | G | Oct. 27, 2019, 12:25 p.m. | OK | Java 8 | TESTS | 51 | 186 | 0 | 2400 | |
| 63610923 | beginner1010 | G | Oct. 27, 2019, 5:11 p.m. | OK | Java 8 | TESTS | 51 | 202 | 4812800 | 2400 | |
| 65058286 | Hemose O_E YahiaSherif | G | Nov. 15, 2019, 3:57 p.m. | OK | Java 8 | TESTS | 51 | 295 | 22630400 | 2400 | |
| 64840573 | mennafadali ZeyadKhattab Nesrin | G | Nov. 13, 2019, 4:32 p.m. | OK | Java 8 | TESTS | 51 | 311 | 25190400 | 2400 | |
| 65900895 | dalt | G | Nov. 28, 2019, 8:41 a.m. | OK | Java 8 | TESTS | 51 | 373 | 50790400 | 2400 | |
| 64195003 | badprogrammer123 | G | Nov. 4, 2019, 9:19 a.m. | OK | Java 8 | TESTS | 51 | 1263 | 6553600 | 2400 | |
| 65108430 | wp32pw | G | Nov. 15, 2019, 8:33 p.m. | OK | MS C++ 2017 | TESTS | 51 | 420 | 7372800 | 2400 | |
| 67986339 | Freek Jorke SmileyCraft | G | Dec. 30, 2019, 11:08 p.m. | OK | PyPy 3 | TESTS | 51 | 1076 | 51097600 | 2400 | |
| 63540208 | G | Oct. 27, 2019, 9:06 a.m. | OK | Unknown | TESTS | 0 | 0 | 0 | 2400 | ||
| 63540176 | G | Oct. 27, 2019, 9:06 a.m. | OK | Unknown | TESTS | 0 | 0 | 0 | 2400 | ||
| 63540103 | G | Oct. 27, 2019, 9:06 a.m. | OK | Unknown | TESTS | 0 | 0 | 0 | 2400 | ||
| 63540031 | G | Oct. 27, 2019, 9:06 a.m. | OK | Unknown | TESTS | 0 | 0 | 0 | 2400 | ||
| 63540026 | G | Oct. 27, 2019, 9:06 a.m. | OK | Unknown | TESTS | 0 | 0 | 0 | 2400 | ||
| 63539864 | G | Oct. 27, 2019, 9:06 a.m. | OK | Unknown | TESTS | 0 | 0 | 0 | 2400 | ||
| 63539695 | G | Oct. 27, 2019, 9:06 a.m. | OK | Unknown | TESTS | 0 | 0 | 0 | 2400 | ||
| 63539536 | G | Oct. 27, 2019, 9:06 a.m. | OK | Unknown | TESTS | 0 | 0 | 0 | 2400 |
Back to search problems