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 |
---|---|---|---|---|---|---|
1955 | Codeforces Round 938 (Div. 3) | FINISHED | False | 8100 | 19236299 | April 8, 2024, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 21353 ) | C | Inhabitant of the Deep Sea | PROGRAMMING | greedy implementation math |
B" n ships set out to explore the depths of the ocean. The ships are numbered from 1 to n and follow each other in ascending order; the i -th ship has a durability of a_i . The Kraken attacked the ships k times in a specific order. First, it attacks the first of the ships, then the last, then the first again, and so on. Each attack by the Kraken reduces the durability of the ship by 1 . When the durability of the ship drops to 0 , it sinks and is no longer subjected to attacks (thus the ship ceases to be the first or last, and the Kraken only attacks the ships that have not yet sunk). If all the ships have sunk, the Kraken has nothing to attack and it swims away. For example, if n=4 , k=5 , and a=[1, 2, 4, 3] , the following will happen: How many ships were sunk after the Kraken's attack? The first line contains an integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The first line of each test case contains two integers n and k ( 1 <= n <= 2 cdot 10^5 , 1 <= k <= 10^{15} ) -- the number of ships and how many times the Kraken will attack the ships. The second line of each test case contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 10^9 ) -- the durability of the ships. It is guaranteed that the sum of n for all test cases does not exceed 2 cdot 10^5 . For each test case, output the number of ships sunk by the Kraken on a separate line. "... |
128243 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
255805168 | chrisTris | C | April 9, 2024, 1:59 a.m. | OK | C# 10 | TESTS | 5 | 124 | 26009600 | ||
255788411 | ProgCroco | C | April 8, 2024, 9:04 p.m. | OK | C++14 (GCC 6-32) | TESTS | 5 | 62 | 0 | ||
255781188 | tellowart | C | April 8, 2024, 7:43 p.m. | OK | C++14 (GCC 6-32) | TESTS | 5 | 77 | 0 | ||
255807773 | xyw_6 | C | April 9, 2024, 2:37 a.m. | OK | C++14 (GCC 6-32) | TESTS | 5 | 77 | 0 | ||
255820501 | SCAUwyp | C | April 9, 2024, 5:13 a.m. | OK | C++14 (GCC 6-32) | TESTS | 5 | 77 | 0 | ||
255817645 | nickky_k | C | April 9, 2024, 4:42 a.m. | OK | C++14 (GCC 6-32) | TESTS | 5 | 77 | 0 | ||
255817644 | SakibShekh | C | April 9, 2024, 4:42 a.m. | OK | C++14 (GCC 6-32) | TESTS | 5 | 77 | 0 | ||
255813436 | 666long | C | April 9, 2024, 3:49 a.m. | OK | C++14 (GCC 6-32) | TESTS | 5 | 77 | 102400 | ||
255788977 | negetive_iq | C | April 8, 2024, 9:11 p.m. | OK | C++14 (GCC 6-32) | TESTS | 5 | 77 | 102400 | ||
255799225 | 22_Youssef_19 | C | April 9, 2024, 12:16 a.m. | OK | C++14 (GCC 6-32) | TESTS | 5 | 77 | 307200 | ||
255821122 | guoguo_ | C | April 9, 2024, 5:19 a.m. | OK | C++14 (GCC 6-32) | TESTS | 5 | 77 | 819200 | ||
255778210 | wapiex | C | April 8, 2024, 7:13 p.m. | OK | C++17 (GCC 7-32) | TESTS | 5 | 62 | 0 | ||
255816863 | _Sadman_ | C | April 9, 2024, 4:33 a.m. | OK | C++17 (GCC 7-32) | TESTS | 5 | 62 | 0 | ||
255822021 | CHIRAG_MURARKA | C | April 9, 2024, 5:28 a.m. | OK | C++17 (GCC 7-32) | TESTS | 5 | 77 | 0 | ||
255824131 | bhanu2306 | C | April 9, 2024, 5:48 a.m. | OK | C++17 (GCC 7-32) | TESTS | 5 | 77 | 0 | ||
255820307 | BigFlow | C | April 9, 2024, 5:11 a.m. | OK | C++17 (GCC 7-32) | TESTS | 5 | 77 | 0 | ||
255819816 | Waynedam | C | April 9, 2024, 5:06 a.m. | OK | C++17 (GCC 7-32) | TESTS | 5 | 77 | 0 | ||
255816630 | Sunnyiitian | C | April 9, 2024, 4:30 a.m. | OK | C++17 (GCC 7-32) | TESTS | 5 | 77 | 0 | ||
255815714 | happydreamer | C | April 9, 2024, 4:18 a.m. | OK | C++17 (GCC 7-32) | TESTS | 5 | 77 | 0 | ||
255814060 | hnust_lizhongyu | C | April 9, 2024, 3:56 a.m. | OK | C++17 (GCC 7-32) | TESTS | 5 | 77 | 0 | ||
255813256 | GauravBilotia | C | April 9, 2024, 3:47 a.m. | OK | C++17 (GCC 7-32) | TESTS | 5 | 77 | 0 | ||
255791864 | Jorge_Slime | C | April 8, 2024, 9:53 p.m. | OK | C++20 (GCC 13-64) | TESTS | 5 | 46 | 1433600 | ||
255804648 | catting | C | April 9, 2024, 1:50 a.m. | OK | C++20 (GCC 13-64) | TESTS | 5 | 61 | 0 | ||
255780458 | KaNaPlz | C | April 8, 2024, 7:35 p.m. | OK | C++20 (GCC 13-64) | TESTS | 5 | 61 | 102400 | ||
255801426 | Robbe | C | April 9, 2024, 12:55 a.m. | OK | C++20 (GCC 13-64) | TESTS | 5 | 61 | 102400 | ||
255802654 | Kiffaz | C | April 9, 2024, 1:16 a.m. | OK | C++20 (GCC 13-64) | TESTS | 5 | 61 | 307200 | ||
255786787 | ZA7med | C | April 8, 2024, 8:44 p.m. | OK | C++20 (GCC 13-64) | TESTS | 5 | 61 | 1126400 | ||
255821902 | S_V_V | C | April 9, 2024, 5:27 a.m. | OK | C++20 (GCC 13-64) | TESTS | 5 | 62 | 0 | ||
255821948 | S_Voloch | C | April 9, 2024, 5:27 a.m. | OK | C++20 (GCC 13-64) | TESTS | 5 | 62 | 0 | ||
255820370 | M2rider | C | April 9, 2024, 5:12 a.m. | OK | C++20 (GCC 13-64) | TESTS | 5 | 62 | 0 | ||
255823912 | moyegege | C | April 9, 2024, 5:46 a.m. | OK | C++20 (GCC 13-64) | TESTS | 5 | 62 | 0 | ||
255802375 | bluemegane | C | April 9, 2024, 1:12 a.m. | OK | C# 8 | TESTS | 5 | 124 | 19558400 | ||
255786586 | NenadDapic | C | April 8, 2024, 8:42 p.m. | OK | FPC | TESTS | 5 | 92 | 819200 | ||
255808642 | A_R_K1 | C | April 9, 2024, 2:49 a.m. | OK | GNU C11 | TESTS | 5 | 77 | 819200 | ||
255792503 | ujjwaljain2506 | C | April 8, 2024, 10:04 p.m. | OK | GNU C11 | TESTS | 5 | 92 | 921600 | ||
255823211 | TianMeng30 | C | April 9, 2024, 5:39 a.m. | OK | GNU C11 | TESTS | 5 | 93 | 921600 | ||
255783919 | shreyansh_singh | C | April 8, 2024, 8:12 p.m. | OK | GNU C11 | TESTS | 5 | 108 | 819200 | ||
255823033 | 123_wby | C | April 9, 2024, 5:37 a.m. | OK | Go | TESTS | 5 | 156 | 5017600 | ||
255771664 | priyaroy3370 | C | April 8, 2024, 6:17 p.m. | OK | Java 21 | TESTS | 5 | 233 | 11366400 | ||
255822874 | bharath20 | C | April 9, 2024, 5:36 a.m. | OK | Java 21 | TESTS | 5 | 265 | 307200 | ||
255776276 | swatishivam23 | C | April 8, 2024, 6:54 p.m. | OK | Java 21 | TESTS | 5 | 280 | 5734400 | ||
255773712 | Andr0Dev | C | April 8, 2024, 6:32 p.m. | OK | Java 21 | TESTS | 5 | 280 | 5734400 | ||
255819433 | _ShenHua_ | C | April 9, 2024, 5:02 a.m. | OK | Java 21 | TESTS | 5 | 281 | 3891200 | ||
255769748 | raja1102 | C | April 8, 2024, 6:02 p.m. | OK | Java 21 | TESTS | 5 | 281 | 4198400 | ||
255792190 | koolkartik | C | April 8, 2024, 9:59 p.m. | OK | Java 21 | TESTS | 5 | 281 | 5017600 | ||
255800957 | neilchetty | C | April 9, 2024, 12:47 a.m. | OK | Java 21 | TESTS | 5 | 296 | 4608000 | ||
255792481 | vivekrp189 | C | April 8, 2024, 10:04 p.m. | OK | Java 21 | TESTS | 5 | 296 | 4915200 | ||
255797309 | ItsLever | C | April 8, 2024, 11:34 p.m. | OK | Java 21 | TESTS | 5 | 311 | 9625600 | ||
255807392 | Freedom_lifelong | C | April 9, 2024, 2:33 a.m. | OK | Java 8 | TESTS | 5 | 171 | 0 | ||
255788339 | Sumitsingh7 | C | April 8, 2024, 9:03 p.m. | OK | Java 8 | TESTS | 5 | 171 | 6656000 | ||
255807209 | Safawt | C | April 9, 2024, 2:30 a.m. | OK | Java 8 | TESTS | 5 | 171 | 11980800 | ||
255797822 | NerfThis | C | April 8, 2024, 11:46 p.m. | OK | Java 8 | TESTS | 5 | 187 | 11878400 | ||
255770734 | Hemant_malav | C | April 8, 2024, 6:09 p.m. | OK | Java 8 | TESTS | 5 | 202 | 11878400 | ||
255817092 | cdream | C | April 9, 2024, 4:36 a.m. | OK | Java 8 | TESTS | 5 | 406 | 0 | ||
255778377 | Aarush_Kinhikar | C | April 8, 2024, 7:14 p.m. | OK | Java 8 | TESTS | 5 | 421 | 0 | ||
255768082 | kaustubh_verma | C | April 8, 2024, 5:51 p.m. | OK | Java 8 | TESTS | 5 | 421 | 0 | ||
255800483 | god_1021 | C | April 9, 2024, 12:38 a.m. | OK | Java 8 | TESTS | 5 | 421 | 0 | ||
255783201 | Praneeth288 | C | April 8, 2024, 8:04 p.m. | OK | Java 8 | TESTS | 5 | 436 | 0 | ||
255821440 | lssl | C | April 9, 2024, 5:23 a.m. | OK | Node.js | TESTS | 5 | 186 | 56832000 | ||
255806215 | rasheed_ashen_one | C | April 9, 2024, 2:15 a.m. | OK | PyPy 3 | TESTS | 5 | 296 | 18124800 | ||
255819242 | MY963 | C | April 9, 2024, 5 a.m. | OK | PyPy 3 | TESTS | 5 | 327 | 17612800 | ||
255777030 | _still_learning__ | C | April 8, 2024, 7:01 p.m. | OK | PyPy 3 | TESTS | 5 | 342 | 17715200 | ||
255771735 | amin2783 | C | April 8, 2024, 6:17 p.m. | OK | PyPy 3 | TESTS | 5 | 343 | 17408000 | ||
255778725 | Kefrov | C | April 8, 2024, 7:18 p.m. | OK | PyPy 3 | TESTS | 5 | 359 | 16486400 | ||
255801512 | bboo_123 | C | April 9, 2024, 12:57 a.m. | OK | PyPy 3 | TESTS | 5 | 359 | 17612800 | ||
255772388 | lo_krlo_baatt | C | April 8, 2024, 6:22 p.m. | OK | PyPy 3 | TESTS | 5 | 406 | 18022400 | ||
255823763 | nisarg007panchal | C | April 9, 2024, 5:44 a.m. | OK | PyPy 3 | TESTS | 5 | 421 | 18227200 | ||
255798551 | elnazar | C | April 9, 2024, 12:02 a.m. | OK | PyPy 3-64 | TESTS | 5 | 155 | 26316800 | ||
255768036 | master_JD | C | April 8, 2024, 5:51 p.m. | OK | PyPy 3-64 | TESTS | 5 | 155 | 30105600 | ||
255801666 | samchen123 | C | April 9, 2024, 12:59 a.m. | OK | PyPy 3-64 | TESTS | 5 | 156 | 25395200 | ||
255771553 | _aadiupadhyay_ | C | April 8, 2024, 6:16 p.m. | OK | PyPy 3-64 | TESTS | 5 | 156 | 28876800 | ||
255774821 | amanuelmandefrow | C | April 8, 2024, 6:42 p.m. | OK | PyPy 3-64 | TESTS | 5 | 171 | 24268800 | ||
255812812 | booleancub3 | C | April 9, 2024, 3:41 a.m. | OK | PyPy 3-64 | TESTS | 5 | 186 | 32256000 | ||
255767070 | sygi | C | April 8, 2024, 5:44 p.m. | OK | PyPy 3-64 | TESTS | 5 | 187 | 21606400 | ||
255821600 | Taymyr | C | April 9, 2024, 5:24 a.m. | OK | PyPy 3-64 | TESTS | 5 | 202 | 26828800 | ||
255803317 | ramann_696 | C | April 9, 2024, 1:27 a.m. | OK | PyPy 3-64 | TESTS | 5 | 202 | 26931200 | ||
255800942 | Drought | C | April 9, 2024, 12:47 a.m. | OK | PyPy 3-64 | TESTS | 5 | 202 | 35020800 | ||
255766688 | OLOGY | C | April 8, 2024, 5:42 p.m. | OK | Python 2 | TESTS | 5 | 187 | 12185600 | ||
255820435 | aryui_2902 | C | April 9, 2024, 5:12 a.m. | OK | Python 3 | TESTS | 5 | 124 | 25190400 | ||
255771649 | Swayam24 | C | April 8, 2024, 6:16 p.m. | OK | Python 3 | TESTS | 5 | 140 | 25190400 | ||
255768067 | MTA9402 | C | April 8, 2024, 5:51 p.m. | OK | Python 3 | TESTS | 5 | 140 | 26009600 | ||
255806383 | nikhilreddy3 | C | April 9, 2024, 2:17 a.m. | OK | Python 3 | TESTS | 5 | 155 | 25190400 | ||
255766544 | BuRabea3 | C | April 8, 2024, 5:41 p.m. | OK | Python 3 | TESTS | 5 | 171 | 25190400 | ||
255800260 | enkeph | C | April 9, 2024, 12:34 a.m. | OK | Python 3 | TESTS | 5 | 171 | 25190400 | ||
255786003 | re0077 | C | April 8, 2024, 8:36 p.m. | OK | Python 3 | TESTS | 5 | 171 | 28569600 | ||
255772565 | rinsane | C | April 8, 2024, 6:23 p.m. | OK | Python 3 | TESTS | 5 | 186 | 28262400 | ||
255798540 | elnazar | C | April 9, 2024, 12:02 a.m. | OK | Python 3 | TESTS | 5 | 202 | 25907200 | ||
255773116 | Om_Singh_ | C | April 8, 2024, 6:28 p.m. | OK | Python 3 | TESTS | 5 | 218 | 26112000 | ||
255778392 | pumpkincheshire | C | April 8, 2024, 7:14 p.m. | OK | Rust 2021 | TESTS | 5 | 77 | 15257600 |
Back to search problems