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 |
---|---|---|---|---|---|---|
1354 | Educational Codeforces Round 87 (Rated for Div. 2) | FINISHED | False | 7200 | 142115999 | May 17, 2020, 9:20 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 23861 ) | A | Alarm Clock | PROGRAMMING | math | 900 |
B"Polycarp has spent the entire day preparing problems for you. Now he has to sleep for at least a minutes to feel refreshed. Polycarp can only wake up by hearing the sound of his alarm. So he has just fallen asleep and his first alarm goes off in b minutes. Every time Polycarp wakes up, he decides if he wants to sleep for some more time or not. If he's slept for less than a minutes in total, then he sets his alarm to go off in c minutes after it is reset and spends d minutes to fall asleep again. Otherwise, he gets out of his bed and proceeds with the day. If the alarm goes off while Polycarp is falling asleep, then he resets his alarm to go off in another c minutes and tries to fall asleep for d minutes again. You just want to find out when will Polycarp get out of his bed or report that it will never happen. Please check out the notes for some explanations of the example. The first line contains one integer t ( 1 <= t <= 1000 ) -- the number of testcases. The only line of each testcase contains four integers a, b, c, d ( 1 <= a, b, c, d <= 10^9 ) -- the time Polycarp has to sleep for to feel refreshed, the time before the first alarm goes off, the time before every succeeding alarm goes off and the time Polycarp spends to fall asleep. For each test case print one integer. If Polycarp never gets out of his bed then print -1. Otherwise, print the time it takes for Polycarp to get out of his bed. In the first testcase Polycarp wakes up after 3 minutes. He only rested for 3 minutes out of 10 minutes he needed. So after that he sets his alarm to go off in 6 minutes and spends 4 minutes falling asleep. Thus, he rests for 2 more minutes, totaling in 3+2=5 minutes of sleep. Then he repeats the procedure three more times and ends up with 11 minutes of sleep. Finally, he gets out of his bed. He spent 3 minutes before the first alarm and then r"... |
77593 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
81685169 | Raeee | A | May 28, 2020, 8:23 a.m. | OK | Clang++17 Diagnostics | TESTS | 6 | 61 | 0 | 900 | |
81139883 | weiyx | A | May 24, 2020, 7:15 a.m. | OK | Clang++17 Diagnostics | TESTS | 6 | 62 | 0 | 900 | |
81473857 | itsmystery | A | May 26, 2020, 1:16 p.m. | OK | GNU C11 | TESTS | 6 | 15 | 0 | 900 | |
81416851 | dumb_coder323 | A | May 25, 2020, 7:23 p.m. | OK | GNU C11 | TESTS | 6 | 15 | 0 | 900 | |
81335418 | priyaaaastha | A | May 24, 2020, 10:31 p.m. | OK | GNU C11 | TESTS | 6 | 15 | 0 | 900 | |
81005668 | baker14 | A | May 23, 2020, 10:33 a.m. | OK | GNU C11 | TESTS | 6 | 15 | 0 | 900 | |
80903410 | Knight_of_king | A | May 22, 2020, 5:25 a.m. | OK | GNU C11 | TESTS | 6 | 15 | 0 | 900 | |
80899394 | joquinn | A | May 22, 2020, 3:48 a.m. | OK | GNU C11 | TESTS | 6 | 15 | 0 | 900 | |
81673788 | shreya3 | A | May 28, 2020, 5:57 a.m. | OK | GNU C11 | TESTS | 6 | 15 | 0 | 900 | |
81590198 | Meharaj_mithu | A | May 27, 2020, 6:56 a.m. | OK | GNU C11 | TESTS | 6 | 15 | 0 | 900 | |
81631430 | datlalaharika1 | A | May 27, 2020, 3:01 p.m. | OK | GNU C11 | TESTS | 6 | 15 | 0 | 900 | |
81151125 | rackeh | A | May 24, 2020, 8:52 a.m. | OK | GNU C11 | TESTS | 6 | 15 | 0 | 900 | |
81440946 | Forever_Pursuit | A | May 26, 2020, 6:10 a.m. | OK | GNU C++11 | TESTS | 6 | 15 | 0 | 900 | |
81429405 | Saq_40T | A | May 26, 2020, 1:58 a.m. | OK | GNU C++11 | TESTS | 6 | 15 | 0 | 900 | |
81429280 | Iloveelafovever | A | May 26, 2020, 1:54 a.m. | OK | GNU C++11 | TESTS | 6 | 15 | 0 | 900 | |
81418826 | s.matyukevich | A | May 25, 2020, 8 p.m. | OK | GNU C++11 | TESTS | 6 | 15 | 0 | 900 | |
81710819 | livyx | A | May 28, 2020, 1:45 p.m. | OK | GNU C++11 | TESTS | 6 | 15 | 0 | 900 | |
81696826 | Sanjida1903070 | A | May 28, 2020, 10:49 a.m. | OK | GNU C++11 | TESTS | 6 | 15 | 0 | 900 | |
81684273 | beixinzai | A | May 28, 2020, 8:13 a.m. | OK | GNU C++11 | TESTS | 6 | 15 | 0 | 900 | |
81670199 | yinlei | A | May 28, 2020, 4:56 a.m. | OK | GNU C++11 | TESTS | 6 | 15 | 0 | 900 | |
81474084 | DuP_491 | A | May 26, 2020, 1:19 p.m. | OK | GNU C++11 | TESTS | 6 | 15 | 0 | 900 | |
81459666 | Forever_Pursuit | A | May 26, 2020, 10:22 a.m. | OK | GNU C++11 | TESTS | 6 | 15 | 0 | 900 | |
81352013 | mich1342 | A | May 25, 2020, 6:06 a.m. | OK | GNU C++14 | TESTS | 6 | 15 | 0 | 900 | |
81609489 | Alex.exe | A | May 27, 2020, 10:59 a.m. | OK | GNU C++14 | TESTS | 6 | 15 | 0 | 900 | |
81696262 | harishm | A | May 28, 2020, 10:42 a.m. | OK | GNU C++14 | TESTS | 6 | 15 | 0 | 900 | |
81698123 | axtrez | A | May 28, 2020, 11:05 a.m. | OK | GNU C++14 | TESTS | 6 | 15 | 0 | 900 | |
81576436 | Haricane193 | A | May 27, 2020, 3:19 a.m. | OK | GNU C++14 | TESTS | 6 | 15 | 0 | 900 | |
81420937 | bh.pradeepsingh | A | May 25, 2020, 8:46 p.m. | OK | GNU C++14 | TESTS | 6 | 15 | 0 | 900 | |
81389942 | arpire1906 | A | May 25, 2020, 1:59 p.m. | OK | GNU C++14 | TESTS | 6 | 15 | 0 | 900 | |
81388866 | Yashi_Agrawal | A | May 25, 2020, 1:46 p.m. | OK | GNU C++14 | TESTS | 6 | 15 | 0 | 900 | |
81380691 | sampritipatel | A | May 25, 2020, 12:09 p.m. | OK | GNU C++14 | TESTS | 6 | 15 | 0 | 900 | |
81372002 | hrishabh_200 | A | May 25, 2020, 10:25 a.m. | OK | GNU C++14 | TESTS | 6 | 15 | 0 | 900 | |
81457399 | hasanhp7 | A | May 26, 2020, 9:51 a.m. | OK | GNU C++17 | TESTS | 6 | 15 | 0 | 900 | |
81699022 | cyclades | A | May 28, 2020, 11:18 a.m. | OK | GNU C++17 | TESTS | 6 | 15 | 0 | 900 | |
81698650 | kumar_sunny | A | May 28, 2020, 11:13 a.m. | OK | GNU C++17 | TESTS | 6 | 15 | 0 | 900 | |
81649826 | Manish_c | A | May 27, 2020, 7:06 p.m. | OK | GNU C++17 | TESTS | 6 | 15 | 0 | 900 | |
81622636 | a4vrlyui | A | May 27, 2020, 1:24 p.m. | OK | GNU C++17 | TESTS | 6 | 15 | 0 | 900 | |
81605457 | abhikeshri10 | A | May 27, 2020, 10:08 a.m. | OK | GNU C++17 | TESTS | 6 | 15 | 0 | 900 | |
81602128 | Hitesh.V01 | A | May 27, 2020, 9:23 a.m. | OK | GNU C++17 | TESTS | 6 | 15 | 0 | 900 | |
81578902 | AngrySeal | A | May 27, 2020, 4:07 a.m. | OK | GNU C++17 | TESTS | 6 | 15 | 0 | 900 | |
81564753 | igortakeo | A | May 26, 2020, 9:04 p.m. | OK | GNU C++17 | TESTS | 6 | 15 | 0 | 900 | |
81475505 | coco18000 | A | May 26, 2020, 1:35 p.m. | OK | GNU C++17 | TESTS | 6 | 15 | 0 | 900 | |
80982713 | bsse1205 | A | May 23, 2020, 4:30 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 15 | 0 | 900 | |
81611979 | grand_zeno | A | May 27, 2020, 11:29 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 15 | 0 | 900 | |
81577981 | MateoCV | A | May 27, 2020, 3:49 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 15 | 0 | 900 | |
81446883 | harshmahajan8989 | A | May 26, 2020, 7:31 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 15 | 0 | 900 | |
81437604 | zeus_orz | A | May 26, 2020, 5:18 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 15 | 0 | 900 | |
81380145 | olphe | A | May 25, 2020, 12:02 p.m. | OK | GNU C++17 (64) | TESTS | 6 | 15 | 0 | 900 | |
81345570 | hemanth4474 | A | May 25, 2020, 4:11 a.m. | OK | GNU C++17 (64) | TESTS | 6 | 15 | 0 | 900 | |
81327788 | fredbr | A | May 24, 2020, 7:18 p.m. | OK | GNU C++17 (64) | TESTS | 6 | 15 | 0 | 900 | |
81021340 | ivan100sic | A | May 23, 2020, 2:19 p.m. | OK | GNU C++17 (64) | TESTS | 6 | 15 | 0 | 900 | |
81013114 | vjudge3 | A | May 23, 2020, 12:13 p.m. | OK | GNU C++17 (64) | TESTS | 6 | 15 | 0 | 900 | |
80520128 | dblokhin | A | May 17, 2020, 12:36 p.m. | OK | Go | TESTS | 6 | 31 | 10649600 | 900 | |
81578615 | lamvh2812 | A | May 27, 2020, 4:02 a.m. | OK | Go | TESTS | 6 | 108 | 0 | 900 | |
80642155 | Noureldin | A | May 18, 2020, 10:05 p.m. | OK | Go | TESTS | 6 | 124 | 0 | 900 | |
80582427 | jojo1094 | A | May 18, 2020, 8:17 a.m. | OK | Go | TESTS | 6 | 139 | 10649600 | 900 | |
80728054 | dauom | A | May 19, 2020, 9:42 p.m. | OK | Java 11 | TESTS | 6 | 155 | 0 | 900 | |
81665011 | yuruiyin | A | May 28, 2020, 2:54 a.m. | OK | Java 11 | TESTS | 6 | 156 | 0 | 900 | |
81055466 | wabadabakalakaboo | A | May 24, 2020, 2:07 a.m. | OK | Java 11 | TESTS | 6 | 170 | 0 | 900 | |
80634600 | mr___hacker____ | A | May 18, 2020, 7:18 p.m. | OK | Java 11 | TESTS | 6 | 170 | 0 | 900 | |
80629375 | jenish9599 | A | May 18, 2020, 5:59 p.m. | OK | Java 11 | TESTS | 6 | 170 | 0 | 900 | |
81009819 | chesthurts | A | May 23, 2020, 11:27 a.m. | OK | Java 11 | TESTS | 6 | 171 | 0 | 900 | |
80875562 | Gagan09 | A | May 21, 2020, 5:22 p.m. | OK | Java 11 | TESTS | 6 | 171 | 0 | 900 | |
80809665 | Anonymous | A | May 20, 2020, 10:31 p.m. | OK | Java 11 | TESTS | 6 | 171 | 0 | 900 | |
80798962 | GiantTornado | A | May 20, 2020, 6:23 p.m. | OK | Java 11 | TESTS | 6 | 171 | 0 | 900 | |
80767198 | zhupeijun | A | May 20, 2020, 11:26 a.m. | OK | Java 11 | TESTS | 6 | 171 | 0 | 900 | |
81633998 | DeepCoding | A | May 27, 2020, 3:29 p.m. | OK | Java 8 | TESTS | 6 | 93 | 0 | 900 | |
80888537 | jxin31415 | A | May 21, 2020, 9:10 p.m. | OK | Java 8 | TESTS | 6 | 93 | 0 | 900 | |
80515538 | afidodree | A | May 17, 2020, 11:43 a.m. | OK | Java 8 | TESTS | 6 | 93 | 20582400 | 900 | |
81471717 | out_of_the_box | A | May 26, 2020, 12:51 p.m. | OK | Java 8 | TESTS | 6 | 108 | 0 | 900 | |
81387901 | sanskriti0512 | A | May 25, 2020, 1:35 p.m. | OK | Java 8 | TESTS | 6 | 108 | 0 | 900 | |
80663627 | sudhakar005 | A | May 19, 2020, 7:15 a.m. | OK | Java 8 | TESTS | 6 | 108 | 0 | 900 | |
80654691 | Itwazonce | A | May 19, 2020, 4:48 a.m. | OK | Java 8 | TESTS | 6 | 108 | 0 | 900 | |
80630414 | shahzeb.qamar | A | May 18, 2020, 6:13 p.m. | OK | Java 8 | TESTS | 6 | 108 | 0 | 900 | |
80625396 | an09mous | A | May 18, 2020, 5:03 p.m. | OK | Java 8 | TESTS | 6 | 108 | 0 | 900 | |
81425277 | O_E | A | May 25, 2020, 11:21 p.m. | OK | Java 8 | TESTS | 6 | 108 | 0 | 900 | |
80629165 | Spheniscine | A | May 18, 2020, 5:56 p.m. | OK | Kotlin | TESTS | 6 | 108 | 0 | 900 | |
80632272 | Riz1Ahmed | A | May 18, 2020, 6:40 p.m. | OK | Kotlin | TESTS | 6 | 139 | 0 | 900 | |
81005443 | MadMax | A | May 23, 2020, 10:30 a.m. | OK | Kotlin | TESTS | 6 | 140 | 0 | 900 | |
81140145 | weiyx | A | May 24, 2020, 7:17 a.m. | OK | Kotlin | TESTS | 6 | 155 | 0 | 900 | |
80717005 | wbars | A | May 19, 2020, 6:11 p.m. | OK | Kotlin | TESTS | 6 | 155 | 0 | 900 | |
81173420 | cristian1997 | A | May 24, 2020, 12:05 p.m. | OK | Kotlin | TESTS | 6 | 156 | 0 | 900 | |
80716758 | shilov | A | May 19, 2020, 6:08 p.m. | OK | Kotlin | TESTS | 6 | 156 | 0 | 900 | |
80523228 | Ehmeed | A | May 17, 2020, 1:21 p.m. | OK | Kotlin | TESTS | 6 | 171 | 21708800 | 900 | |
80514654 | peterc | A | May 17, 2020, 11:35 a.m. | OK | Mono C# | TESTS | 6 | 46 | 8806400 | 900 | |
80707621 | krzysiek.slawik | A | May 19, 2020, 4:13 p.m. | OK | Mono C# | TESTS | 6 | 61 | 307200 | 900 | |
81169175 | munchy | A | May 24, 2020, 11:07 a.m. | OK | Mono C# | TESTS | 6 | 61 | 409600 | 900 | |
80524756 | SisAdminos | A | May 17, 2020, 1:42 p.m. | OK | Mono C# | TESTS | 6 | 61 | 12492800 | 900 | |
80946180 | LyricalRain | A | May 22, 2020, 3:11 p.m. | OK | Mono C# | TESTS | 6 | 62 | 307200 | 900 | |
80865597 | amit1509kumar | A | May 21, 2020, 3:13 p.m. | OK | Mono C# | TESTS | 6 | 62 | 409600 | 900 | |
80952515 | _Trung_Nguyen | A | May 22, 2020, 4:24 p.m. | OK | Mono C# | TESTS | 6 | 77 | 4198400 | 900 | |
80552118 | udharmesh61 | A | May 17, 2020, 8:06 p.m. | OK | MS C++ | TESTS | 6 | 31 | 3891200 | 900 | |
81590026 | Arun_Setty | A | May 27, 2020, 6:54 a.m. | OK | MS C++ 2017 | TESTS | 6 | 15 | 0 | 900 | |
80531941 | tarattata1 | A | May 17, 2020, 3:06 p.m. | OK | MS C++ 2017 | TESTS | 6 | 15 | 3686400 | 900 | |
80523630 | Ghadi_21 | A | May 17, 2020, 1:27 p.m. | OK | MS C++ 2017 | TESTS | 6 | 15 | 3686400 | 900 | |
81674682 | aviral2899 | A | May 28, 2020, 6:08 a.m. | OK | MS C++ 2017 | TESTS | 6 | 30 | 0 | 900 | |
80904027 | wlgus | A | May 22, 2020, 5:38 a.m. | OK | MS C++ 2017 | TESTS | 6 | 30 | 102400 | 900 | |
80759343 | bhupysin2512 | A | May 20, 2020, 9:41 a.m. | OK | MS C++ 2017 | TESTS | 6 | 30 | 307200 | 900 | |
80935702 | vjudge2 | A | May 22, 2020, 12:58 p.m. | OK | MS C++ 2017 | TESTS | 6 | 30 | 307200 | 900 | |
80517590 | atal_7 | A | May 17, 2020, 12:03 p.m. | OK | MS C++ 2017 | TESTS | 6 | 30 | 3686400 | 900 | |
81595528 | Xstepik | A | May 27, 2020, 8:05 a.m. | OK | MS C++ 2017 | TESTS | 6 | 31 | 0 | 900 | |
81710639 | Falca | A | May 28, 2020, 1:43 p.m. | OK | MS C++ 2017 | TESTS | 6 | 31 | 0 | 900 | |
80633386 | ilia_kh | A | May 18, 2020, 6:57 p.m. | OK | Node.js | TESTS | 6 | 77 | 1638400 | 900 | |
80633464 | ilia_kh | A | May 18, 2020, 6:58 p.m. | OK | Node.js | TESTS | 6 | 92 | 1638400 | 900 | |
80626822 | ALexqanderqwe | A | May 18, 2020, 5:23 p.m. | OK | Node.js | TESTS | 6 | 92 | 1638400 | 900 | |
80625718 | klond90 | A | May 18, 2020, 5:07 p.m. | OK | Node.js | TESTS | 6 | 93 | 1228800 | 900 | |
80633504 | ilia_kh | A | May 18, 2020, 6:59 p.m. | OK | Node.js | TESTS | 6 | 93 | 1638400 | 900 | |
80614408 | kit.shiron | A | May 18, 2020, 3:02 p.m. | OK | PyPy 2 | TESTS | 6 | 124 | 23347200 | 900 | |
80564007 | beethoven97 | A | May 18, 2020, 2:45 a.m. | OK | PyPy 2 | TESTS | 6 | 124 | 23449600 | 900 | |
81373539 | yumtam | A | May 25, 2020, 10:44 a.m. | OK | PyPy 2 | TESTS | 6 | 139 | 204800 | 900 | |
80897576 | tuxtux1 | A | May 22, 2020, 3:07 a.m. | OK | PyPy 2 | TESTS | 6 | 155 | 1638400 | 900 | |
80532547 | Pyar.Mahobat.Dhoka.Hai | A | May 17, 2020, 3:13 p.m. | OK | PyPy 2 | TESTS | 6 | 171 | 24985600 | 900 | |
80529218 | noobmaster8622 | A | May 17, 2020, 2:35 p.m. | OK | PyPy 3 | TESTS | 6 | 139 | 20275200 | 900 | |
80963188 | apoorvwatsky | A | May 22, 2020, 6:46 p.m. | OK | PyPy 3 | TESTS | 6 | 140 | 1638400 | 900 | |
80675935 | TimurABS | A | May 19, 2020, 10:07 a.m. | OK | PyPy 3 | TESTS | 6 | 140 | 1740800 | 900 | |
80799555 | jayantjain100 | A | May 20, 2020, 6:33 p.m. | OK | PyPy 3 | TESTS | 6 | 140 | 1843200 | 900 | |
80686747 | s4mp | A | May 19, 2020, 12:26 p.m. | OK | PyPy 3 | TESTS | 6 | 140 | 2048000 | 900 | |
80566694 | Sykzen | A | May 18, 2020, 3:51 a.m. | OK | PyPy 3 | TESTS | 6 | 140 | 22220800 | 900 | |
80870227 | archismandey | A | May 21, 2020, 4:10 p.m. | OK | PyPy 3 | TESTS | 6 | 155 | 1843200 | 900 | |
80743365 | aminobro70 | A | May 20, 2020, 5:44 a.m. | OK | PyPy 3 | TESTS | 6 | 155 | 2048000 | 900 | |
80620099 | ThetaSigma | A | May 18, 2020, 3:59 p.m. | OK | PyPy 3 | TESTS | 6 | 155 | 2150400 | 900 | |
80580989 | Jhony_aust | A | May 18, 2020, 7:56 a.m. | OK | PyPy 3 | TESTS | 6 | 155 | 21606400 | 900 | |
80752076 | manthansharma154 | A | May 20, 2020, 7:59 a.m. | OK | Python 2 | TESTS | 6 | 171 | 0 | 900 | |
80592571 | shubhankarsharma00 | A | May 18, 2020, 10:37 a.m. | OK | Python 2 | TESTS | 6 | 186 | 6451200 | 900 | |
81591080 | sowjanya_22 | A | May 27, 2020, 7:07 a.m. | OK | Python 3 | TESTS | 6 | 93 | 0 | 900 | |
81527368 | anshul_22 | A | May 26, 2020, 3:49 p.m. | OK | Python 3 | TESTS | 6 | 93 | 0 | 900 | |
81426186 | bufferjjh | A | May 26, 2020, 12:06 a.m. | OK | Python 3 | TESTS | 6 | 93 | 0 | 900 | |
81414799 | eric37 | A | May 25, 2020, 6:58 p.m. | OK | Python 3 | TESTS | 6 | 93 | 0 | 900 | |
81362803 | mananjagani145 | A | May 25, 2020, 8:29 a.m. | OK | Python 3 | TESTS | 6 | 93 | 0 | 900 | |
81327340 | kartikeygoel | A | May 24, 2020, 7:11 p.m. | OK | Python 3 | TESTS | 6 | 93 | 0 | 900 | |
80870447 | kalandar | A | May 21, 2020, 4:12 p.m. | OK | Python 3 | TESTS | 6 | 93 | 0 | 900 | |
80854458 | lionerd | A | May 21, 2020, 1:08 p.m. | OK | Python 3 | TESTS | 6 | 93 | 0 | 900 | |
80809518 | JaViLuMa | A | May 20, 2020, 10:25 p.m. | OK | Python 3 | TESTS | 6 | 93 | 0 | 900 | |
80752645 | Molewus | A | May 20, 2020, 8:07 a.m. | OK | Python 3 | TESTS | 6 | 93 | 0 | 900 | |
80785261 | kobae964 | A | May 20, 2020, 3:23 p.m. | OK | Rust | TESTS | 6 | 31 | 307200 | 900 | |
80611170 | cotton100pc | A | May 18, 2020, 2:26 p.m. | OK | Rust | TESTS | 6 | 31 | 3993600 | 900 | |
80827816 | altaway | A | May 21, 2020, 7:04 a.m. | OK | Rust | TESTS | 6 | 46 | 0 | 900 |
Back to search problems