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 |
---|---|---|---|---|---|---|
1879 | Educational Codeforces Round 155 (Rated for Div. 2) | FINISHED | False | 7200 | 41613863 | Sept. 24, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 529 ) | F | Last Man Standing | PROGRAMMING | data structures number theory | 2800 |
B"There are n heroes in a videogame. Each hero has some health value h and initial armor value a . Let the current value of armor be a_{ mathit{cur}} , initially equal to a . When x points of damage are inflicted on a hero, the following happens: if x < a_{ mathit{cur}} , then x gets subtracted from a_{ mathit{cur}} ; otherwise, 1 gets subtracted from h and a_{ mathit{cur}} gets assigned back to a . In the start of the game, you choose the value x (an integer strictly greater than 0 , arbitrarily large). Then you keep attacking all heroes in rounds: in one round, you inflict x points of damage to all alive heroes. A hero dies when his health becomes 0 . The game ends when all heroes are dead. The last hero to die earns the number of points, equal to the number of rounds he was the only hero alive. The other heroes get 0 points. In particular, if the last round ends with multiple heroes dying, then every hero gets 0 points. The game is played for every possible x (from 1 to infinity). The points are reset between the games. What's the maximum number of points each hero has had? The first line contains a single integer t ( 1 <= t <= 10 ) -- the number of testcases. The first line of each testcase contains a single integer n ( 1 <= n <= 2 cdot 10^5 ) -- the number of heroes. The second line contains n integers h_1, h_2, ... , h_n ( 1 <= h_i <= 2 cdot 10^5 ) -- the health value of each hero. The third line contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= 2 cdot 10^5 ) -- the initial armor value of each hero. For each testcase, print n integers -- the maximum number of points each hero has had over the games played for every possible x . In the first testcase, the game for x = 1 is played as follows: The second hero was the last hero to die, and he wa"... |
120773 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
224989959 | OdtreePrince | F | Sept. 24, 2023, 6:08 p.m. | OK | GNU C++14 | TESTS | 40 | 1731 | 12083200 | 2800 | |
224984196 | 0wuming0 | F | Sept. 24, 2023, 5:24 p.m. | OK | GNU C++14 | TESTS | 40 | 3134 | 39321600 | 2800 | |
225011712 | opal_Inwza007x | F | Sept. 24, 2023, 11:37 p.m. | OK | GNU C++14 | TESTS | 42 | 3541 | 35225600 | 2800 | |
225021122 | QZJ114514 | F | Sept. 25, 2023, 3:16 a.m. | OK | GNU C++14 | TESTS | 42 | 3572 | 105062400 | 2800 | |
224987845 | mohamedblack667 | F | Sept. 24, 2023, 5:51 p.m. | OK | GNU C++14 | TESTS | 40 | 3978 | 19251200 | 2800 | |
224974738 | Enter_ | F | Sept. 24, 2023, 4:38 p.m. | OK | GNU C++14 | TESTS | 40 | 5272 | 83353600 | 2800 | |
225005689 | patou | F | Sept. 24, 2023, 9:13 p.m. | OK | GNU C++17 | TESTS | 42 | 1419 | 6758400 | 2800 | |
225031254 | Sxy_Limit | F | Sept. 25, 2023, 5:49 a.m. | OK | GNU C++17 | TESTS | 42 | 2198 | 96051200 | 2800 | |
225028034 | Faysal_Ahamed.bu.008 | F | Sept. 25, 2023, 5:08 a.m. | OK | GNU C++17 | TESTS | 42 | 2682 | 26214400 | 2800 | |
224995534 | Amarendra_Baahubali | F | Sept. 24, 2023, 6:58 p.m. | OK | GNU C++17 | TESTS | 42 | 2730 | 14950400 | 2800 | |
225021074 | int65536 | F | Sept. 25, 2023, 3:15 a.m. | OK | GNU C++17 | TESTS | 42 | 3244 | 85401600 | 2800 | |
225005185 | pab2 | F | Sept. 24, 2023, 9:04 p.m. | OK | GNU C++17 | TESTS | 42 | 3525 | 59699200 | 2800 | |
224983646 | karemo | F | Sept. 24, 2023, 5:20 p.m. | OK | GNU C++17 | TESTS | 40 | 3650 | 35430400 | 2800 | |
224996115 | jmyszka | F | Sept. 24, 2023, 7:04 p.m. | OK | GNU C++17 | TESTS | 42 | 4071 | 126259200 | 2800 | |
224984476 | CSHwang | F | Sept. 24, 2023, 5:26 p.m. | OK | GNU C++17 | TESTS | 40 | 5413 | 32460800 | 2800 | |
224983920 | CSHwang | F | Sept. 24, 2023, 5:22 p.m. | OK | GNU C++17 | TESTS | 40 | 6364 | 29286400 | 2800 | |
225015096 | wsyear | F | Sept. 25, 2023, 1:14 a.m. | OK | GNU C++17 (64) | TESTS | 42 | 826 | 6451200 | 2800 | |
225011073 | lunchbox | F | Sept. 24, 2023, 11:18 p.m. | OK | GNU C++17 (64) | TESTS | 42 | 2635 | 35225600 | 2800 | |
225012665 | enslaved | F | Sept. 25, 2023, 12:10 a.m. | OK | GNU C++17 (64) | TESTS | 42 | 2714 | 61132800 | 2800 | |
225011025 | lunchbox | F | Sept. 24, 2023, 11:16 p.m. | OK | GNU C++17 (64) | TESTS | 42 | 2854 | 35225600 | 2800 | |
224984917 | tute7627 | F | Sept. 24, 2023, 5:29 p.m. | OK | GNU C++17 (64) | TESTS | 40 | 3166 | 163532800 | 2800 | |
224982141 | cxm1024 | F | Sept. 24, 2023, 5:11 p.m. | OK | GNU C++17 (64) | TESTS | 40 | 4102 | 8806400 | 2800 | |
225022366 | max67 | F | Sept. 25, 2023, 3:37 a.m. | OK | GNU C++17 (64) | TESTS | 42 | 4320 | 33792000 | 2800 | |
225022309 | max67 | F | Sept. 25, 2023, 3:37 a.m. | OK | GNU C++17 (64) | TESTS | 42 | 4320 | 33792000 | 2800 | |
224990510 | milizeshousan | F | Sept. 24, 2023, 6:12 p.m. | OK | GNU C++17 (64) | TESTS | 40 | 5943 | 9011200 | 2800 | |
224995912 | acos | F | Sept. 24, 2023, 7:02 p.m. | OK | GNU C++17 (64) | TESTS | 42 | 6223 | 13312000 | 2800 | |
225013549 | cmk666 | F | Sept. 25, 2023, 12:34 a.m. | OK | GNU C++20 (64) | TESTS | 42 | 405 | 10137600 | 2800 | |
225020683 | ClHg2 | F | Sept. 25, 2023, 3:09 a.m. | OK | GNU C++20 (64) | TESTS | 42 | 732 | 6451200 | 2800 | |
224990931 | AbdelmagedNour | F | Sept. 24, 2023, 6:16 p.m. | OK | GNU C++20 (64) | TESTS | 40 | 764 | 4812800 | 2800 | |
224987113 | AbdelmagedNour | F | Sept. 24, 2023, 5:46 p.m. | OK | GNU C++20 (64) | TESTS | 40 | 764 | 4812800 | 2800 | |
224993106 | A_G | F | Sept. 24, 2023, 6:35 p.m. | OK | GNU C++20 (64) | TESTS | 42 | 810 | 8806400 | 2800 | |
224980633 | SanguineChameleon | F | Sept. 24, 2023, 5:02 p.m. | OK | GNU C++20 (64) | TESTS | 40 | 935 | 9625600 | 2800 | |
224980567 | SanguineChameleon | F | Sept. 24, 2023, 5:02 p.m. | OK | GNU C++20 (64) | TESTS | 40 | 950 | 9625600 | 2800 | |
225011316 | Boboge | F | Sept. 24, 2023, 11:26 p.m. | OK | GNU C++20 (64) | TESTS | 42 | 1278 | 20684800 | 2800 | |
224982243 | propane | F | Sept. 24, 2023, 5:11 p.m. | OK | GNU C++20 (64) | TESTS | 40 | 1434 | 7168000 | 2800 | |
225014817 | IhcNerNaug | F | Sept. 25, 2023, 1:08 a.m. | OK | GNU C++20 (64) | TESTS | 42 | 1435 | 9625600 | 2800 |
Back to search problems