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 |
---|---|---|---|---|---|---|
1862 | Codeforces Round 894 (Div. 3) | FINISHED | False | 8100 | 44292263 | Aug. 24, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 6537 ) | F | Magic Will Save the World | PROGRAMMING | binary search bitmasks brute force dp |
B'A portal of dark forces has opened at the border of worlds, and now the whole world is under a terrible threat. To close the portal and save the world, you need to defeat n monsters that emerge from the portal one after another. Only the sorceress Vika can handle this. She possesses two magical powers -- water magic and fire magic. In one second, Vika can generate w units of water mana and f units of fire mana. She will need mana to cast spells. Initially Vika have 0 units of water mana and 0 units of fire mana. Each of the n monsters that emerge from the portal has its own strength, expressed as a positive integer. To defeat the i -th monster with strength s_i , Vika needs to cast a water spell or a fire spell of at least the same strength. In other words, Vika can spend at least s_i units of water mana on a water spell, or at least s_i units of fire mana on a fire spell. Vika can create and cast spells instantly. Vika can cast an unlimited number of spells every second as long she has enough mana for that. The sorceress wants to save the world as quickly as possible, so tell her how much time she will need. Each test consists of several test cases. The first line of each test contains a single integer t ( 1 <= t <= 100 ) -- the number of test cases. This is followed by a description of the test cases. The first line of each test case contains two integers w , f ( 1 <= w, f <= 10^9 ) -- the amount of water and fire mana that Vika can generate per second. The second line of each test case contains a single integer n ( 1 <= n <= 100 ) -- the number of monsters. The third line of each test case contains n integers s_1, s_2, s_3, ... , s_n ( 1 <= s_i <= 10^4 ) -- the strengths of the monsters. It is guaranteed that the sum of n over all test cases does not exceed 100 . For each test case, output a single integer -- the m'... |
Tutorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
220423327 | kellendros95 | F | Aug. 25, 2023, 6:21 p.m. | OK | C# 10 | TESTS | 46 | 171 | 819200 | ||
220451919 | mban259 | F | Aug. 26, 2023, 2:23 a.m. | OK | C# 10 | TESTS | 46 | 592 | 85299200 | ||
220412173 | suomengran | F | Aug. 25, 2023, 4:56 p.m. | OK | GNU C++14 | TESTS | 46 | 31 | 409600 | ||
220408151 | extreme1228 | F | Aug. 25, 2023, 4:26 p.m. | OK | GNU C++14 | TESTS | 46 | 31 | 409600 | ||
220404073 | cyanac | F | Aug. 25, 2023, 3:56 p.m. | OK | GNU C++14 | TESTS | 46 | 31 | 409600 | ||
220368250 | suomengran | F | Aug. 25, 2023, 11:39 a.m. | OK | GNU C++14 | TESTS | 46 | 31 | 409600 | ||
220367428 | ljyyyds5 | F | Aug. 25, 2023, 11:31 a.m. | OK | GNU C++14 | TESTS | 46 | 31 | 409600 | ||
220365307 | Crsuh2er0 | F | Aug. 25, 2023, 11:13 a.m. | OK | GNU C++14 | TESTS | 46 | 31 | 409600 | ||
220354678 | CuteJerry | F | Aug. 25, 2023, 8:37 a.m. | OK | GNU C++14 | TESTS | 46 | 31 | 409600 | ||
220352820 | Bai_xiaobo | F | Aug. 25, 2023, 8:03 a.m. | OK | GNU C++14 | TESTS | 46 | 31 | 409600 | ||
220349798 | lsr123456789 | F | Aug. 25, 2023, 7:19 a.m. | OK | GNU C++14 | TESTS | 46 | 31 | 409600 | ||
220347551 | smarthehe | F | Aug. 25, 2023, 6:51 a.m. | OK | GNU C++14 | TESTS | 46 | 31 | 409600 | ||
220370712 | cjnwq | F | Aug. 25, 2023, 11:58 a.m. | OK | GNU C++17 | TESTS | 46 | 31 | 307200 | ||
220464348 | xiaolili_ | F | Aug. 26, 2023, 5:41 a.m. | OK | GNU C++17 | TESTS | 46 | 31 | 409600 | ||
220456855 | wibulord | F | Aug. 26, 2023, 3:53 a.m. | OK | GNU C++17 | TESTS | 46 | 31 | 409600 | ||
220454991 | xwd654 | F | Aug. 26, 2023, 3:20 a.m. | OK | GNU C++17 | TESTS | 46 | 31 | 409600 | ||
220442201 | Jalppatel1428 | F | Aug. 25, 2023, 10:37 p.m. | OK | GNU C++17 | TESTS | 46 | 31 | 409600 | ||
220442156 | Jalppatel1428 | F | Aug. 25, 2023, 10:36 p.m. | OK | GNU C++17 | TESTS | 46 | 31 | 409600 | ||
220426714 | sahibsingh139 | F | Aug. 25, 2023, 6:51 p.m. | OK | GNU C++17 | TESTS | 46 | 31 | 409600 | ||
220403971 | q2045891621. | F | Aug. 25, 2023, 3:55 p.m. | OK | GNU C++17 | TESTS | 46 | 31 | 409600 | ||
220403043 | sersawy | F | Aug. 25, 2023, 3:49 p.m. | OK | GNU C++17 | TESTS | 46 | 31 | 409600 | ||
220402937 | linmanba | F | Aug. 25, 2023, 3:48 p.m. | OK | GNU C++17 | TESTS | 46 | 31 | 409600 | ||
220403035 | ezluci | F | Aug. 25, 2023, 3:49 p.m. | OK | GNU C++17 (64) | TESTS | 46 | 15 | 819200 | ||
220458017 | CHN_OMoon | F | Aug. 26, 2023, 4:11 a.m. | OK | GNU C++17 (64) | TESTS | 46 | 31 | 409600 | ||
220347764 | Rain_Liu | F | Aug. 25, 2023, 6:54 a.m. | OK | GNU C++17 (64) | TESTS | 46 | 31 | 409600 | ||
220454255 | rupa6 | F | Aug. 26, 2023, 3:06 a.m. | OK | GNU C++17 (64) | TESTS | 46 | 31 | 512000 | ||
220362049 | lazymystic | F | Aug. 25, 2023, 10:45 a.m. | OK | GNU C++17 (64) | TESTS | 46 | 31 | 14028800 | ||
220350655 | lazymystic | F | Aug. 25, 2023, 7:30 a.m. | OK | GNU C++17 (64) | TESTS | 46 | 31 | 14028800 | ||
220404048 | 113113113aaasssddd | F | Aug. 25, 2023, 3:56 p.m. | OK | GNU C++17 (64) | TESTS | 46 | 46 | 409600 | ||
220345083 | aqricity | F | Aug. 25, 2023, 6:18 a.m. | OK | GNU C++17 (64) | TESTS | 46 | 46 | 409600 | ||
220410455 | Giga_Cronos | F | Aug. 25, 2023, 4:43 p.m. | OK | GNU C++17 (64) | TESTS | 46 | 46 | 512000 | ||
220460950 | zhengjunxi | F | Aug. 26, 2023, 4:58 a.m. | OK | GNU C++17 (64) | TESTS | 46 | 78 | 20070400 | ||
220373609 | dmkozyrev_thinks_slowly | F | Aug. 25, 2023, 12:22 p.m. | OK | GNU C++20 (64) | TESTS | 46 | 15 | 7782400 | ||
220460881 | zstuxuesongyin | F | Aug. 26, 2023, 4:57 a.m. | OK | GNU C++20 (64) | TESTS | 46 | 15 | 8396800 | ||
220461725 | Nickqw | F | Aug. 26, 2023, 5:09 a.m. | OK | GNU C++20 (64) | TESTS | 46 | 31 | 307200 | ||
220461676 | Nickqw | F | Aug. 26, 2023, 5:09 a.m. | OK | GNU C++20 (64) | TESTS | 46 | 31 | 307200 | ||
220461649 | Kaori_cp | F | Aug. 26, 2023, 5:08 a.m. | OK | GNU C++20 (64) | TESTS | 46 | 31 | 307200 | ||
220451266 | liangjiaqi | F | Aug. 26, 2023, 2:10 a.m. | OK | GNU C++20 (64) | TESTS | 46 | 31 | 307200 | ||
220421298 | elijjah | F | Aug. 25, 2023, 6:04 p.m. | OK | GNU C++20 (64) | TESTS | 46 | 31 | 307200 | ||
220417452 | innocentkitten | F | Aug. 25, 2023, 5:35 p.m. | OK | GNU C++20 (64) | TESTS | 46 | 31 | 307200 | ||
220409540 | borhan008 | F | Aug. 25, 2023, 4:35 p.m. | OK | GNU C++20 (64) | TESTS | 46 | 31 | 307200 | ||
220373571 | suneqa | F | Aug. 25, 2023, 12:22 p.m. | OK | GNU C++20 (64) | TESTS | 46 | 31 | 307200 | ||
220420822 | codeanand17 | F | Aug. 25, 2023, 6 p.m. | OK | Java 11 | TESTS | 46 | 358 | 0 | ||
220453914 | profchi | F | Aug. 26, 2023, 3 a.m. | OK | Java 11 | TESTS | 46 | 452 | 0 | ||
220447661 | mohamedhassan_c | F | Aug. 26, 2023, 12:54 a.m. | OK | Java 11 | TESTS | 46 | 576 | 173568000 | ||
220420074 | IceWolf898 | F | Aug. 25, 2023, 5:55 p.m. | OK | Java 11 | TESTS | 46 | 717 | 0 | ||
220450074 | iamavalon | F | Aug. 26, 2023, 1:45 a.m. | OK | Java 11 | TESTS | 46 | 732 | 143052800 | ||
220454120 | Panther369 | F | Aug. 26, 2023, 3:04 a.m. | OK | Java 11 | TESTS | 46 | 1621 | 0 | ||
220401043 | wizardleen | F | Aug. 25, 2023, 3:37 p.m. | OK | Java 17 | TESTS | 46 | 233 | 9113600 | ||
220453600 | Ligh0x74 | F | Aug. 26, 2023, 2:55 a.m. | OK | Java 17 | TESTS | 46 | 451 | 716800 | ||
220453842 | Ligh0x74 | F | Aug. 26, 2023, 2:59 a.m. | OK | Java 17 | TESTS | 46 | 452 | 614400 | ||
220437107 | shivamks2712 | F | Aug. 25, 2023, 9 p.m. | OK | Java 17 | TESTS | 46 | 1029 | 1126400 | ||
220410308 | invincible777 | F | Aug. 25, 2023, 4:41 p.m. | OK | Java 8 | TESTS | 46 | 639 | 2969600 | ||
220351230 | formidablechief_27 | F | Aug. 25, 2023, 7:37 a.m. | OK | Java 8 | TESTS | 46 | 904 | 142336000 | ||
220365129 | formidablechief_27 | F | Aug. 25, 2023, 11:12 a.m. | OK | Java 8 | TESTS | 46 | 904 | 142438400 | ||
220351101 | formidablechief_27 | F | Aug. 25, 2023, 7:35 a.m. | OK | Java 8 | TESTS | 46 | 1076 | 142438400 | ||
220346195 | maxK99 | F | Aug. 25, 2023, 6:33 a.m. | OK | MS C++ 2017 | TESTS | 46 | 31 | 1228800 | ||
220361159 | Antwerp2004 | F | Aug. 25, 2023, 10:32 a.m. | OK | MS C++ 2017 | TESTS | 46 | 217 | 102400 | ||
220448699 | Nivita | F | Aug. 26, 2023, 1:17 a.m. | OK | MS C++ 2017 | TESTS | 46 | 779 | 200396800 | ||
220448891 | Nivita | F | Aug. 26, 2023, 1:21 a.m. | OK | MS C++ 2017 | TESTS | 46 | 795 | 200396800 | ||
220410580 | Nero | F | Aug. 25, 2023, 4:43 p.m. | OK | Perl | TESTS | 46 | 1419 | 1126400 | ||
220377870 | guntehi | F | Aug. 25, 2023, 12:55 p.m. | OK | PyPy 3 | TESTS | 46 | 530 | 6041600 | ||
220448519 | Westin_sheep | F | Aug. 26, 2023, 1:13 a.m. | OK | PyPy 3 | TESTS | 46 | 623 | 10137600 | ||
220370291 | abcsumits | F | Aug. 25, 2023, 11:55 a.m. | OK | PyPy 3 | TESTS | 46 | 2760 | 49664000 | ||
220411001 | Rafaelcs | F | Aug. 25, 2023, 4:47 p.m. | OK | PyPy 3 | TESTS | 46 | 2917 | 22630400 | ||
220379196 | re-wa-tl-ok | F | Aug. 25, 2023, 1:04 p.m. | OK | PyPy 3 | TESTS | 46 | 3915 | 11161600 | ||
220416212 | titia | F | Aug. 25, 2023, 5:26 p.m. | OK | PyPy 3-64 | TESTS | 46 | 77 | 8089600 | ||
220433566 | 2025 | F | Aug. 25, 2023, 8:11 p.m. | OK | PyPy 3-64 | TESTS | 46 | 93 | 9113600 | ||
220434118 | AyuAnchor | F | Aug. 25, 2023, 8:18 p.m. | OK | PyPy 3-64 | TESTS | 46 | 108 | 9113600 | ||
220456012 | HimanshuRajput | F | Aug. 26, 2023, 3:38 a.m. | OK | PyPy 3-64 | TESTS | 46 | 139 | 6656000 | ||
220455794 | HimanshuRajput | F | Aug. 26, 2023, 3:34 a.m. | OK | PyPy 3-64 | TESTS | 46 | 140 | 11878400 | ||
220422729 | rmr | F | Aug. 25, 2023, 6:16 p.m. | OK | PyPy 3-64 | TESTS | 46 | 389 | 10342400 | ||
220409496 | lionkingchuchu | F | Aug. 25, 2023, 4:35 p.m. | OK | PyPy 3-64 | TESTS | 46 | 421 | 10649600 | ||
220406539 | aaaaaaaaaa1 | F | Aug. 25, 2023, 4:14 p.m. | OK | PyPy 3-64 | TESTS | 46 | 452 | 30924800 | ||
220378210 | guntehi | F | Aug. 25, 2023, 12:57 p.m. | OK | PyPy 3-64 | TESTS | 46 | 530 | 17510400 | ||
220409345 | ayhon | F | Aug. 25, 2023, 4:34 p.m. | OK | PyPy 3-64 | TESTS | 46 | 561 | 16793600 | ||
220373952 | sky | F | Aug. 25, 2023, 12:25 p.m. | OK | Rust 2021 | TESTS | 46 | 156 | 3993600 | ||
220372626 | sky | F | Aug. 25, 2023, 12:14 p.m. | OK | Rust 2021 | TESTS | 46 | 171 | 3993600 | ||
220355206 | arandur | F | Aug. 25, 2023, 8:46 a.m. | OK | Rust 2021 | TESTS | 46 | 1778 | 3993600 | ||
220374636 | sky | F | Aug. 25, 2023, 12:30 p.m. | OK | Rust 2021 | TESTS | 46 | 2401 | 3993600 |
Back to search problems