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 |
---|---|---|---|---|---|---|
1985 | Codeforces Round 952 (Div. 4) | FINISHED | False | 9000 | 13706699 | June 11, 2024, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 15343 ) | F | Final Boss | PROGRAMMING | binary search brute force data structures |
B"You are facing the final boss in your favorite video game. The boss enemy has h health. Your character has n attacks. The i 'th attack deals a_i damage to the boss but has a cooldown of c_i turns, meaning the next time you can use this attack is turn x + c_i if your current turn is x . Each turn, you can use all attacks that are not currently on cooldown, all at once. If all attacks are on cooldown, you do nothing for the turn and skip to the next turn. Initially, all attacks are not on cooldown. How many turns will you take to beat the boss? The boss is beaten when its health is 0 or less. The first line contains t ( 1 <= q t <= q 10^4 ) xe2 x80 x93 the number of test cases. The first line of each test case contains two integers h and n ( 1 <= q h, n <= q 2 cdot 10^5 ) xe2 x80 x93 the health of the boss and the number of attacks you have. The following line of each test case contains n integers a_1, a_2, ..., a_n ( 1 <= q a_i <= q 2 cdot 10^5 ) xe2 x80 x93 the damage of your attacks. The following line of each test case contains n integers c_1, c_2, ..., c_n ( 1 <= q c_i <= q 2 cdot 10^5 ) xe2 x80 x93 the cooldown of your attacks. It is guaranteed that the sum of h and n over all test cases does not exceed 2 cdot 10^5 . For each test case, output an integer, the minimum number of turns required to beat the boss. For the first test case, you can use attacks 1 and 2 on the first turn, dealing 3 damage in total, and slaying the boss. For the second case, you can beat the boss in 3 turns by using the following attacks: Turn 1 : Use attacks 1 and 2 , dealing 3 damage to the boss. The boss now has 2 health left. Turn 2 : Use attack 2 , dealing 1 damage to the boss. The boss now has 1 health left. Turn 3 : Use attack 1 , dealing 2 damage to the boss. The boss now has -1 h"... |
Codeforces Round 952 (Div. 4) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
265402553 | otabek_kholmirzaev | F | June 11, 2024, 7:12 p.m. | OK | C# 10 | TESTS | 17 | 249 | 30003200 | ||
265437732 | ngominhkhoa2006 | F | June 12, 2024, 4:59 a.m. | OK | C++14 (GCC 6-32) | TESTS | 17 | 109 | 3276800 | ||
265416905 | nothing_lasts_forever | F | June 11, 2024, 11:04 p.m. | OK | C++14 (GCC 6-32) | TESTS | 17 | 109 | 7372800 | ||
265436319 | 3275658930 | F | June 12, 2024, 4:42 a.m. | OK | C++14 (GCC 6-32) | TESTS | 17 | 124 | 3276800 | ||
265442914 | This_is_Adroit | F | June 12, 2024, 5:51 a.m. | OK | C++14 (GCC 6-32) | TESTS | 17 | 124 | 4198400 | ||
265438877 | CMOS | F | June 12, 2024, 5:11 a.m. | OK | C++14 (GCC 6-32) | TESTS | 17 | 124 | 5324800 | ||
265432963 | ppbinh2010 | F | June 12, 2024, 4:02 a.m. | OK | C++14 (GCC 6-32) | TESTS | 17 | 125 | 1638400 | ||
265430252 | akshath07 | F | June 12, 2024, 3:27 a.m. | OK | C++14 (GCC 6-32) | TESTS | 17 | 140 | 0 | ||
265428002 | khan.daniyal1329 | F | June 12, 2024, 2:57 a.m. | OK | C++14 (GCC 6-32) | TESTS | 17 | 140 | 0 | ||
265433287 | kingsneverdie1411 | F | June 12, 2024, 4:06 a.m. | OK | C++14 (GCC 6-32) | TESTS | 17 | 140 | 4198400 | ||
265410905 | vishal2045ks | F | June 11, 2024, 8:53 p.m. | OK | C++14 (GCC 6-32) | TESTS | 17 | 140 | 4198400 | ||
265423120 | _bekhruz | F | June 12, 2024, 1:39 a.m. | OK | C++17 (GCC 7-32) | TESTS | 17 | 108 | 0 | ||
265420468 | blazeofdu | F | June 12, 2024, 12:38 a.m. | OK | C++17 (GCC 7-32) | TESTS | 17 | 108 | 5836800 | ||
265440293 | satyam_kant | F | June 12, 2024, 5:26 a.m. | OK | C++17 (GCC 7-32) | TESTS | 17 | 109 | 0 | ||
265442917 | naisheelpatel | F | June 12, 2024, 5:51 a.m. | OK | C++17 (GCC 7-32) | TESTS | 17 | 109 | 0 | ||
265438900 | piyush45 | F | June 12, 2024, 5:12 a.m. | OK | C++17 (GCC 7-32) | TESTS | 17 | 109 | 0 | ||
265438821 | vinaynagle2006 | F | June 12, 2024, 5:11 a.m. | OK | C++17 (GCC 7-32) | TESTS | 17 | 109 | 0 | ||
265438764 | No_Obligations_123 | F | June 12, 2024, 5:10 a.m. | OK | C++17 (GCC 7-32) | TESTS | 17 | 109 | 0 | ||
265427998 | Konggee. | F | June 12, 2024, 2:57 a.m. | OK | C++17 (GCC 7-32) | TESTS | 17 | 109 | 0 | ||
265423326 | Akhilz | F | June 12, 2024, 1:43 a.m. | OK | C++17 (GCC 7-32) | TESTS | 17 | 109 | 0 | ||
265405467 | harsh_8484 | F | June 11, 2024, 7:46 p.m. | OK | C++17 (GCC 7-32) | TESTS | 17 | 109 | 0 | ||
265429352 | N_z__ | F | June 12, 2024, 3:15 a.m. | OK | C++20 (GCC 13-64) | TESTS | 17 | 62 | 4403200 | ||
265431490 | huxintt | F | June 12, 2024, 3:43 a.m. | OK | C++20 (GCC 13-64) | TESTS | 17 | 62 | 6144000 | ||
265428931 | huxintt | F | June 12, 2024, 3:09 a.m. | OK | C++20 (GCC 13-64) | TESTS | 17 | 62 | 6144000 | ||
265431180 | huxintt | F | June 12, 2024, 3:39 a.m. | OK | C++20 (GCC 13-64) | TESTS | 17 | 77 | 2150400 | ||
265426699 | xhhhhhhhhhhhhhh | F | June 12, 2024, 2:39 a.m. | OK | C++20 (GCC 13-64) | TESTS | 17 | 93 | 0 | ||
265408855 | muntasir__ | F | June 11, 2024, 8:22 p.m. | OK | C++20 (GCC 13-64) | TESTS | 17 | 93 | 0 | ||
265425292 | glenjp123 | F | June 12, 2024, 2:18 a.m. | OK | C++20 (GCC 13-64) | TESTS | 17 | 93 | 0 | ||
265440531 | sameer_shreyas | F | June 12, 2024, 5:28 a.m. | OK | C++20 (GCC 13-64) | TESTS | 17 | 93 | 0 | ||
265439706 | hahahhahoohohoho | F | June 12, 2024, 5:21 a.m. | OK | C++20 (GCC 13-64) | TESTS | 17 | 93 | 0 | ||
265429224 | bobby222222222 | F | June 12, 2024, 3:13 a.m. | OK | C++20 (GCC 13-64) | TESTS | 17 | 93 | 0 | ||
265443077 | bluemegane | F | June 12, 2024, 5:52 a.m. | OK | C# 8 | TESTS | 17 | 186 | 37376000 | ||
265403724 | NenadDapic | F | June 11, 2024, 7:25 p.m. | OK | FPC | TESTS | 17 | 124 | 7065600 | ||
265413755 | 1435730 | F | June 11, 2024, 9:45 p.m. | OK | GNU C11 | TESTS | 17 | 171 | 1638400 | ||
265405475 | amon_get | F | June 11, 2024, 7:46 p.m. | OK | GNU C11 | TESTS | 17 | 187 | 3379200 | ||
265422994 | meteor041 | F | June 12, 2024, 1:37 a.m. | OK | GNU C11 | TESTS | 17 | 218 | 1638400 | ||
265436701 | xylu | F | June 12, 2024, 4:47 a.m. | OK | Go | TESTS | 17 | 92 | 6553600 | ||
265436340 | xylu | F | June 12, 2024, 4:42 a.m. | OK | Go | TESTS | 17 | 125 | 6553600 | ||
265425855 | 79209748 | F | June 12, 2024, 2:27 a.m. | OK | Go | TESTS | 17 | 139 | 16076800 | ||
265402640 | treasuryonly | F | June 11, 2024, 7:13 p.m. | OK | Haskell | TESTS | 17 | 562 | 23552000 | ||
265404099 | AkshatSaxena_05 | F | June 11, 2024, 7:30 p.m. | OK | Java 21 | TESTS | 17 | 280 | 6656000 | ||
265398199 | Manjot1151 | F | June 11, 2024, 6:27 p.m. | OK | Java 21 | TESTS | 17 | 296 | 716800 | ||
265413555 | vikash_45 | F | June 11, 2024, 9:41 p.m. | OK | Java 21 | TESTS | 17 | 312 | 3891200 | ||
265415112 | Eslam_Ahmed | F | June 11, 2024, 10:17 p.m. | OK | Java 21 | TESTS | 17 | 327 | 1945600 | ||
265434500 | Devil_7 | F | June 12, 2024, 4:20 a.m. | OK | Java 21 | TESTS | 17 | 327 | 4710400 | ||
265442249 | anshgrover25072002 | F | June 12, 2024, 5:45 a.m. | OK | Java 21 | TESTS | 17 | 343 | 1433600 | ||
265427595 | mnnit.prakharg | F | June 12, 2024, 2:51 a.m. | OK | Java 21 | TESTS | 17 | 343 | 1638400 | ||
265408523 | rishit164 | F | June 11, 2024, 8:18 p.m. | OK | Java 21 | TESTS | 17 | 343 | 4198400 | ||
265402584 | nhantran0 | F | June 11, 2024, 7:12 p.m. | OK | Java 21 | TESTS | 17 | 358 | 2457600 | ||
265428764 | echo-hope | F | June 12, 2024, 3:06 a.m. | OK | Java 21 | TESTS | 17 | 374 | 409600 | ||
265423245 | Yousef_Badr | F | June 12, 2024, 1:41 a.m. | OK | Java 8 | TESTS | 17 | 203 | 7065600 | ||
265392567 | PlayDate | F | June 11, 2024, 5:48 p.m. | OK | Java 8 | TESTS | 15 | 218 | 2764800 | ||
265415125 | Eslam_Ahmed | F | June 11, 2024, 10:17 p.m. | OK | Java 8 | TESTS | 17 | 218 | 7065600 | ||
265442916 | coderman2004 | F | June 12, 2024, 5:51 a.m. | OK | Java 8 | TESTS | 17 | 233 | 6963200 | ||
265435611 | y_a_s | F | June 12, 2024, 4:33 a.m. | OK | Java 8 | TESTS | 17 | 311 | 6963200 | ||
265410294 | warriorop066 | F | June 11, 2024, 8:43 p.m. | OK | Java 8 | TESTS | 17 | 592 | 0 | ||
265423875 | bravo123 | F | June 12, 2024, 1:53 a.m. | OK | Java 8 | TESTS | 17 | 640 | 4915200 | ||
265397715 | TheBoogeyman_429 | F | June 11, 2024, 6:23 p.m. | OK | Java 8 | TESTS | 17 | 764 | 7987200 | ||
265439857 | xyktyjayket | F | June 12, 2024, 5:22 a.m. | OK | PyPy 3 | TESTS | 17 | 639 | 16384000 | ||
265435326 | perfect_dash | F | June 12, 2024, 4:30 a.m. | OK | PyPy 3 | TESTS | 17 | 811 | 15872000 | ||
265404967 | Kefrov | F | June 11, 2024, 7:39 p.m. | OK | PyPy 3 | TESTS | 17 | 1374 | 18534400 | ||
265397938 | KrishBhimani | F | June 11, 2024, 6:25 p.m. | OK | PyPy 3 | TESTS | 17 | 1906 | 15769600 | ||
265397894 | KrishBhimani | F | June 11, 2024, 6:24 p.m. | OK | PyPy 3 | TESTS | 17 | 1999 | 15564800 | ||
265391892 | catchfree1225 | F | June 11, 2024, 5:43 p.m. | OK | PyPy 3-64 | TESTS | 15 | 186 | 24064000 | ||
265431987 | Hongs_Cai | F | June 12, 2024, 3:49 a.m. | OK | PyPy 3-64 | TESTS | 17 | 187 | 23040000 | ||
265413099 | DeadMan69 | F | June 11, 2024, 9:32 p.m. | OK | PyPy 3-64 | TESTS | 17 | 187 | 26009600 | ||
265398461 | naveentummala033 | F | June 11, 2024, 6:29 p.m. | OK | PyPy 3-64 | TESTS | 17 | 187 | 34099200 | ||
265391313 | cp_hater | F | June 11, 2024, 5:39 p.m. | OK | PyPy 3-64 | TESTS | 15 | 234 | 46387200 | ||
265391261 | cp_hater | F | June 11, 2024, 5:38 p.m. | OK | PyPy 3-64 | TESTS | 15 | 249 | 46182400 | ||
265396667 | gsomani | F | June 11, 2024, 6:14 p.m. | OK | PyPy 3-64 | TESTS | 17 | 265 | 30412800 | ||
265409992 | jiangjinjinyxt | F | June 11, 2024, 8:38 p.m. | OK | PyPy 3-64 | TESTS | 17 | 265 | 37068800 | ||
265400362 | arurocks | F | June 11, 2024, 6:49 p.m. | OK | PyPy 3-64 | TESTS | 17 | 280 | 37376000 | ||
265401661 | aayush249 | F | June 11, 2024, 7:02 p.m. | OK | PyPy 3-64 | TESTS | 17 | 281 | 25804800 | ||
265435226 | vijayvardhan6 | F | June 12, 2024, 4:29 a.m. | OK | Python 3 | TESTS | 17 | 296 | 40140800 | ||
265432699 | ___a_s_1_2___ | F | June 12, 2024, 3:58 a.m. | OK | Python 3 | TESTS | 17 | 499 | 35635200 | ||
265432244 | jjtang999 | F | June 12, 2024, 3:53 a.m. | OK | Python 3 | TESTS | 17 | 499 | 35635200 | ||
265425383 | TEST_CASE_100 | F | June 12, 2024, 2:19 a.m. | OK | Python 3 | TESTS | 17 | 827 | 61952000 | ||
265436122 | 051_KING | F | June 12, 2024, 4:40 a.m. | OK | Python 3 | TESTS | 17 | 859 | 35635200 | ||
265401799 | ike-erdman | F | June 11, 2024, 7:04 p.m. | OK | Python 3 | TESTS | 17 | 1203 | 35737600 | ||
265431862 | Nishant__Ranjan | F | June 12, 2024, 3:48 a.m. | OK | Python 3 | TESTS | 17 | 1452 | 36864000 | ||
265400414 | Decoder_RAG | F | June 11, 2024, 6:50 p.m. | OK | Python 3 | TESTS | 17 | 1577 | 36249600 | ||
265395762 | Joyboy1730 | F | June 11, 2024, 6:06 p.m. | OK | Python 3 | TESTS | 17 | 1608 | 35225600 | ||
265414168 | vstiff | F | June 11, 2024, 9:54 p.m. | OK | Rust 2021 | TESTS | 17 | 93 | 4198400 |
Back to search problems