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 |
---|---|---|---|---|---|---|
1430 | Educational Codeforces Round 96 (Rated for Div. 2) | FINISHED | False | 7200 | 134945711 | Oct. 11, 2020, 9:05 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 929 ) | F | Realistic Gameplay | PROGRAMMING | dp greedy |
B"Recently you've discovered a new shooter. They say it has realistic game mechanics. Your character has a gun with magazine size equal to k and should exterminate n waves of monsters. The i -th wave consists of a_i monsters and happens from the l_i -th moment of time up to the r_i -th moments of time. All a_i monsters spawn at moment l_i and you have to exterminate all of them before the moment r_i ends (you can kill monsters right at moment r_i ). For every two consecutive waves, the second wave starts not earlier than the first wave ends (though the second wave can start at the same moment when the first wave ends) -- formally, the condition r_i <= l_{i + 1} holds. Take a look at the notes for the examples to understand the process better. You are confident in yours and your character's skills so you can assume that aiming and shooting are instant and you need exactly one bullet to kill one monster. But reloading takes exactly 1 unit of time. One of the realistic mechanics is a mechanic of reloading: when you reload you throw away the old magazine with all remaining bullets in it. That's why constant reloads may cost you excessive amounts of spent bullets. You've taken a liking to this mechanic so now you are wondering: what is the minimum possible number of bullets you need to spend (both used and thrown) to exterminate all waves. Note that you don't throw the remaining bullets away after eradicating all monsters, and you start with a full magazine. The first line contains two integers n and k ( 1 <= n <= 2000 ; 1 <= k <= 10^9 ) -- the number of waves and magazine size. The next n lines contain descriptions of waves. The i -th line contains three integers l_i , r_i and a_i ( 1 <= l_i <= r_i <= 10^9 ; 1 <= a_i <= 10^9 ) -- the period of time when the i -th wave happens and the number of monsters in it. It's guar"... |
Educational Codeforces Round 96 — Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
95253539 | jxm2001 | F | Oct. 11, 2020, 11:15 a.m. | OK | GNU C++11 | TESTS | 46 | 31 | 0 | ||
95262946 | gzhffIThh | F | Oct. 11, 2020, 12:54 p.m. | OK | GNU C++11 | TESTS | 46 | 31 | 0 | ||
95261034 | Logey | F | Oct. 11, 2020, 12:31 p.m. | OK | GNU C++11 | TESTS | 46 | 31 | 0 | ||
95309807 | AzusaCat | F | Oct. 12, 2020, 3:28 a.m. | OK | GNU C++11 | TESTS | 46 | 31 | 0 | ||
95307832 | wgx666 | F | Oct. 12, 2020, 2:33 a.m. | OK | GNU C++11 | TESTS | 46 | 31 | 0 | ||
95307516 | liberShip | F | Oct. 12, 2020, 2:23 a.m. | OK | GNU C++11 | TESTS | 46 | 31 | 0 | ||
95297331 | denkendoemeer | F | Oct. 11, 2020, 7:56 p.m. | OK | GNU C++11 | TESTS | 46 | 31 | 0 | ||
95269779 | chr_ | F | Oct. 11, 2020, 2:17 p.m. | OK | GNU C++11 | TESTS | 46 | 31 | 0 | ||
95265948 | jxdxhy | F | Oct. 11, 2020, 1:29 p.m. | OK | GNU C++11 | TESTS | 46 | 31 | 0 | ||
95315907 | zhanghyd | F | Oct. 12, 2020, 5:53 a.m. | OK | GNU C++11 | TESTS | 46 | 31 | 102400 | ||
95287875 | caoyizhong | F | Oct. 11, 2020, 5:09 p.m. | OK | GNU C++14 | TESTS | 46 | 31 | 102400 | ||
95306794 | Giga_Cronos | F | Oct. 12, 2020, 1:56 a.m. | OK | GNU C++14 | TESTS | 46 | 31 | 204800 | ||
95267864 | _Backl1ght | F | Oct. 11, 2020, 1:53 p.m. | OK | GNU C++14 | TESTS | 46 | 31 | 1126400 | ||
95265772 | BeNoble | F | Oct. 11, 2020, 1:27 p.m. | OK | GNU C++14 | TESTS | 46 | 46 | 0 | ||
95255741 | joker_x | F | Oct. 11, 2020, 11:34 a.m. | OK | GNU C++14 | TESTS | 46 | 62 | 102400 | ||
95247622 | vsriram1012 | F | Oct. 11, 2020, 10:54 a.m. | OK | GNU C++14 | TESTS | 46 | 62 | 204800 | ||
95315640 | nbl97 | F | Oct. 12, 2020, 5:49 a.m. | OK | GNU C++14 | TESTS | 46 | 62 | 20172800 | ||
95280575 | get_r_ight | F | Oct. 11, 2020, 3:47 p.m. | OK | GNU C++14 | TESTS | 46 | 62 | 23347200 | ||
95307109 | AccioAC | F | Oct. 12, 2020, 2:09 a.m. | OK | GNU C++14 | TESTS | 46 | 78 | 307200 | ||
95252961 | dlalswp25 | F | Oct. 11, 2020, 11:11 a.m. | OK | GNU C++14 | TESTS | 46 | 93 | 0 | ||
95261710 | Cyber_Wizard | F | Oct. 11, 2020, 12:39 p.m. | OK | GNU C++17 | TESTS | 46 | 31 | 0 | ||
95306613 | Kenton1989 | F | Oct. 12, 2020, 1:48 a.m. | OK | GNU C++17 | TESTS | 46 | 31 | 0 | ||
95253757 | Arg_007 | F | Oct. 11, 2020, 11:17 a.m. | OK | GNU C++17 | TESTS | 46 | 31 | 102400 | ||
95283299 | Anji | F | Oct. 11, 2020, 4:22 p.m. | OK | GNU C++17 | TESTS | 46 | 31 | 102400 | ||
95280579 | hanna_d | F | Oct. 11, 2020, 3:47 p.m. | OK | GNU C++17 | TESTS | 46 | 31 | 102400 | ||
95278209 | hanna_d | F | Oct. 11, 2020, 3:16 p.m. | OK | GNU C++17 | TESTS | 46 | 31 | 102400 | ||
95253817 | LunaticGe | F | Oct. 11, 2020, 11:17 a.m. | OK | GNU C++17 | TESTS | 46 | 31 | 102400 | ||
95303418 | Clouder0 | F | Oct. 11, 2020, 11:10 p.m. | OK | GNU C++17 | TESTS | 46 | 31 | 1024000 | ||
95295030 | limabeans | F | Oct. 11, 2020, 7:08 p.m. | OK | GNU C++17 | TESTS | 46 | 31 | 32051200 | ||
95313281 | HanaYukii | F | Oct. 12, 2020, 5:01 a.m. | OK | GNU C++17 | TESTS | 46 | 46 | 0 | ||
95266955 | dna049 | F | Oct. 11, 2020, 1:41 p.m. | OK | GNU C++17 (64) | TESTS | 46 | 31 | 0 | ||
95255083 | Ormlis | F | Oct. 11, 2020, 11:28 a.m. | OK | GNU C++17 (64) | TESTS | 46 | 31 | 102400 | ||
95248324 | Ormlis | F | Oct. 11, 2020, 10:56 a.m. | OK | GNU C++17 (64) | TESTS | 46 | 31 | 102400 | ||
95306236 | chctxdy68 | F | Oct. 12, 2020, 1:33 a.m. | OK | GNU C++17 (64) | TESTS | 46 | 31 | 102400 | ||
95269510 | generic_placeholder_name | F | Oct. 11, 2020, 2:13 p.m. | OK | GNU C++17 (64) | TESTS | 46 | 31 | 102400 | ||
95263045 | inszva | F | Oct. 11, 2020, 12:55 p.m. | OK | GNU C++17 (64) | TESTS | 46 | 31 | 6451200 | ||
95255902 | hitonanode | F | Oct. 11, 2020, 11:35 a.m. | OK | GNU C++17 (64) | TESTS | 46 | 46 | 102400 | ||
95248722 | wakaka | F | Oct. 11, 2020, 10:57 a.m. | OK | GNU C++17 (64) | TESTS | 46 | 46 | 102400 | ||
95309112 | rk_fighter89 | F | Oct. 12, 2020, 3:09 a.m. | OK | GNU C++17 (64) | TESTS | 46 | 46 | 102400 | ||
95306699 | smax | F | Oct. 12, 2020, 1:52 a.m. | OK | GNU C++17 (64) | TESTS | 46 | 46 | 32256000 | ||
95257085 | Apfeloxid | F | Oct. 11, 2020, 11:47 a.m. | OK | Java 11 | TESTS | 46 | 498 | 77824000 | ||
95252687 | AnnSuperstar | F | Oct. 11, 2020, 11:09 a.m. | OK | MS C++ 2017 | TESTS | 46 | 998 | 87654400 | ||
95251509 | terry_u16 | F | Oct. 11, 2020, 11:04 a.m. | OK | .NET Core C# | TESTS | 46 | 171 | 34508800 | ||
95248832 | mban259 | F | Oct. 11, 2020, 10:58 a.m. | OK | .NET Core C# | TESTS | 46 | 171 | 65331200 | ||
95269570 | sh1194 | F | Oct. 11, 2020, 2:14 p.m. | OK | Python 3 | TESTS | 46 | 124 | 307200 | ||
95269526 | sh1194 | F | Oct. 11, 2020, 2:13 p.m. | OK | Python 3 | TESTS | 46 | 124 | 307200 | ||
95252108 | Maksim1744 | F | Oct. 11, 2020, 11:06 a.m. | OK | Rust | TESTS | 46 | 124 | 102400 |
Back to search problems