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.
Problems
B"Monocarp is playing a computer game (yet again). Guess what is he doing? That's right, killing monsters. There are n monsters in a row, numbered from 1 to n . The i -th monster has two parameters: attack value equal to a_i and defense value equal to d_i . In order to kill these monsters, Monocarp put a berserk spell on them, so they're attacking each other instead of Monocarp's character. The fight consists of n rounds. Every round, the following happens: For each round, calculate the number of monsters that will die during that round. The first line contains one integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Each test case consists of three lines: Additional constraint on the input: the sum of n over all test cases does not exceed 3 cdot 10^5 . For each test case, print n integers. The i -th integer should be equal to the number of monsters that die during the i -th round. Explanation for the first test case of the example: During the first round, the following happens: After the first round, the monsters 1 and 4 stay alive. During the second round, the following happens: During the next three rounds, only the 4 -th monster is alive, so nothing happens. "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
242327057 |
Resnet-65536 |
D |
Jan. 18, 2024, 5 p.m. |
OK |
GNU C++17 |
TESTS |
21 |
187 |
14745600 |
|
|
242366834 |
yhkhoo |
D |
Jan. 19, 2024, 3:05 a.m. |
OK |
GNU C++17 |
TESTS |
21 |
202 |
7884800 |
|
|
242364456 |
october_rain |
D |
Jan. 19, 2024, 2:24 a.m. |
OK |
GNU C++17 |
TESTS |
21 |
202 |
10342400 |
|
|
242359471 |
cwl769 |
D |
Jan. 19, 2024, 12:11 a.m. |
OK |
GNU C++17 |
TESTS |
21 |
202 |
11264000 |
|
|
242376576 |
Actium |
D |
Jan. 19, 2024, 5:19 a.m. |
OK |
GNU C++17 |
TESTS |
21 |
202 |
11468800 |
|
|
242327232 |
vaibhav2740 |
D |
Jan. 18, 2024, 5 p.m. |
OK |
GNU C++17 |
TESTS |
21 |
202 |
11468800 |
|
|
242364327 |
MaxDYF |
D |
Jan. 19, 2024, 2:21 a.m. |
OK |
GNU C++17 |
TESTS |
21 |
202 |
12288000 |
|
|
242374550 |
DemberS06 |
D |
Jan. 19, 2024, 4:58 a.m. |
OK |
GNU C++17 |
TESTS |
21 |
202 |
13209600 |
|
|
242363465 |
pink_fox |
D |
Jan. 19, 2024, 2:02 a.m. |
OK |
GNU C++17 |
TESTS |
21 |
217 |
6041600 |
|
|
242370007 |
Healexr |
D |
Jan. 19, 2024, 3:54 a.m. |
OK |
GNU C++17 |
TESTS |
21 |
217 |
9216000 |
|
|
242358632 |
chappy1 |
D |
Jan. 18, 2024, 11:39 p.m. |
OK |
GNU C++17 (64) |
TESTS |
21 |
77 |
21196800 |
|
|
242366675 |
FakeDuck |
D |
Jan. 19, 2024, 3:02 a.m. |
OK |
GNU C++17 (64) |
TESTS |
21 |
139 |
11468800 |
|
|
242365029 |
Univmemor_N |
D |
Jan. 19, 2024, 2:35 a.m. |
OK |
GNU C++17 (64) |
TESTS |
21 |
139 |
14745600 |
|
|
242328697 |
unknowndriver |
D |
Jan. 18, 2024, 5:08 p.m. |
OK |
GNU C++17 (64) |
TESTS |
21 |
140 |
6348800 |
|
|
242328452 |
fanhuaxingyu |
D |
Jan. 18, 2024, 5:07 p.m. |
OK |
GNU C++17 (64) |
TESTS |
21 |
140 |
7372800 |
|
|
242380996 |
Radiaa |
D |
Jan. 19, 2024, 5:58 a.m. |
OK |
GNU C++17 (64) |
TESTS |
21 |
140 |
11468800 |
|
|
242374480 |
Maxduan |
D |
Jan. 19, 2024, 4:57 a.m. |
OK |
GNU C++17 (64) |
TESTS |
21 |
140 |
12390400 |
|
|
242370427 |
Me_Lee |
D |
Jan. 19, 2024, 4 a.m. |
OK |
GNU C++17 (64) |
TESTS |
21 |
140 |
12390400 |
|
|
242371344 |
trainerherp |
D |
Jan. 19, 2024, 4:14 a.m. |
OK |
GNU C++17 (64) |
TESTS |
21 |
140 |
15462400 |
|
|
242365558 |
Spad2e |
D |
Jan. 19, 2024, 2:44 a.m. |
OK |
GNU C++17 (64) |
TESTS |
21 |
140 |
23961600 |
|
|
242326136 |
hhhxxxyyy3 |
D |
Jan. 18, 2024, 4:56 p.m. |
OK |
GNU C++20 (64) |
TESTS |
21 |
46 |
11673600 |
|
|
242325420 |
adriancm |
D |
Jan. 18, 2024, 4:52 p.m. |
OK |
GNU C++20 (64) |
TESTS |
21 |
46 |
44646400 |
|
|
242335195 |
duckya |
D |
Jan. 18, 2024, 5:49 p.m. |
OK |
GNU C++20 (64) |
TESTS |
21 |
108 |
11468800 |
|
|
242327878 |
ScarletS |
D |
Jan. 18, 2024, 5:04 p.m. |
OK |
GNU C++20 (64) |
TESTS |
21 |
109 |
9113600 |
|
|
242374356 |
Issa |
D |
Jan. 19, 2024, 4:56 a.m. |
OK |
GNU C++20 (64) |
TESTS |
21 |
109 |
10240000 |
|
|
242369880 |
Alorithm |
D |
Jan. 19, 2024, 3:52 a.m. |
OK |
GNU C++20 (64) |
TESTS |
21 |
109 |
10240000 |
|
|
242344722 |
mcuadros |
D |
Jan. 18, 2024, 7:09 p.m. |
OK |
GNU C++20 (64) |
TESTS |
21 |
109 |
10240000 |
|
|
242371803 |
syrtin |
D |
Jan. 19, 2024, 4:20 a.m. |
OK |
GNU C++20 (64) |
TESTS |
21 |
109 |
10547200 |
|
|
242364976 |
M0N |
D |
Jan. 19, 2024, 2:34 a.m. |
OK |
GNU C++20 (64) |
TESTS |
21 |
109 |
11161600 |
|
|
242375939 |
jiangqiao_1 |
D |
Jan. 19, 2024, 5:13 a.m. |
OK |
GNU C++20 (64) |
TESTS |
21 |
109 |
11468800 |
|
|
242329827 |
leoncn |
D |
Jan. 18, 2024, 5:15 p.m. |
OK |
Java 21 |
TESTS |
21 |
935 |
61337600 |
|
|
242329229 |
shaili17 |
D |
Jan. 18, 2024, 5:11 p.m. |
OK |
Java 21 |
TESTS |
21 |
1153 |
62464000 |
|
|
242376333 |
mapleKing |
D |
Jan. 19, 2024, 5:17 a.m. |
OK |
Java 21 |
TESTS |
21 |
1169 |
50483200 |
|
|
242363072 |
Mustela_Erminea |
D |
Jan. 19, 2024, 1:53 a.m. |
OK |
Java 21 |
TESTS |
21 |
1512 |
90419200 |
|
|
242363031 |
StacGnihsihp |
D |
Jan. 19, 2024, 1:52 a.m. |
OK |
Java 21 |
TESTS |
21 |
1512 |
90419200 |
|
|
242329381 |
Yassinjan |
D |
Jan. 18, 2024, 5:12 p.m. |
OK |
Java 8 |
TESTS |
21 |
405 |
32665600 |
|
|
242335101 |
wangchaohui |
D |
Jan. 18, 2024, 5:48 p.m. |
OK |
Kotlin 1.9 |
TESTS |
21 |
1200 |
49356800 |
|
|
242359512 |
wangchaohui |
D |
Jan. 19, 2024, 12:13 a.m. |
OK |
Kotlin 1.9 |
TESTS |
21 |
1528 |
49356800 |
|
|
242359719 |
IITeens |
D |
Jan. 19, 2024, 12:21 a.m. |
OK |
MS C++ 2017 |
TESTS |
21 |
935 |
21811200 |
|
|
242364858 |
YMSeah |
D |
Jan. 19, 2024, 2:31 a.m. |
OK |
PyPy 3 |
TESTS |
21 |
1248 |
36352000 |
|
|
242331582 |
BytesizeGenius |
D |
Jan. 18, 2024, 5:25 p.m. |
OK |
PyPy 3 |
TESTS |
21 |
1356 |
101580800 |
|
|
242375797 |
mikeac |
D |
Jan. 19, 2024, 5:12 a.m. |
OK |
PyPy 3-64 |
TESTS |
21 |
358 |
69017600 |
|
|
242369182 |
pennymagic156 |
D |
Jan. 19, 2024, 3:42 a.m. |
OK |
PyPy 3-64 |
TESTS |
21 |
390 |
68915200 |
|
|
242365738 |
oweijane |
D |
Jan. 19, 2024, 2:47 a.m. |
OK |
PyPy 3-64 |
TESTS |
21 |
405 |
67174400 |
|
|
242343464 |
Quick-One |
D |
Jan. 18, 2024, 6:56 p.m. |
OK |
PyPy 3-64 |
TESTS |
21 |
436 |
71372800 |
|
|
242361500 |
theRealChainman |
D |
Jan. 19, 2024, 1:16 a.m. |
OK |
PyPy 3-64 |
TESTS |
21 |
436 |
85504000 |
|
|
242326573 |
VitalyKo |
D |
Jan. 18, 2024, 4:57 p.m. |
OK |
PyPy 3-64 |
TESTS |
21 |
468 |
73523200 |
|
|
242345511 |
ptripathy013 |
D |
Jan. 18, 2024, 7:18 p.m. |
OK |
PyPy 3-64 |
TESTS |
21 |
482 |
73216000 |
|
|
242364800 |
RobinFromTheHood |
D |
Jan. 19, 2024, 2:30 a.m. |
OK |
PyPy 3-64 |
TESTS |
21 |
483 |
59801600 |
|
|
242336467 |
eunsoo0607 |
D |
Jan. 18, 2024, 5:58 p.m. |
OK |
PyPy 3-64 |
TESTS |
21 |
498 |
57241600 |
|
|
242367960 |
00zijian |
D |
Jan. 19, 2024, 3:24 a.m. |
OK |
PyPy 3-64 |
TESTS |
21 |
529 |
64409600 |
|
|
242331574 |
OLOGY |
D |
Jan. 18, 2024, 5:25 p.m. |
OK |
Python 2 |
TESTS |
21 |
779 |
37683200 |
|
|
242343087 |
OLOGY |
D |
Jan. 18, 2024, 6:52 p.m. |
OK |
Python 2 |
TESTS |
21 |
794 |
36966400 |
|
|
242344104 |
OLOGY |
D |
Jan. 18, 2024, 7:03 p.m. |
OK |
Python 2 |
TESTS |
21 |
826 |
37171200 |
|
|
242341169 |
OLOGY |
D |
Jan. 18, 2024, 6:35 p.m. |
OK |
Python 2 |
TESTS |
21 |
904 |
40243200 |
|
|
242340345 |
uttharapally_chandra |
D |
Jan. 18, 2024, 6:27 p.m. |
OK |
Python 3 |
TESTS |
21 |
1169 |
73420800 |
|
|
242332192 |
0npata |
D |
Jan. 18, 2024, 5:29 p.m. |
OK |
Rust 2021 |
TESTS |
21 |
62 |
33280000 |
|
|
242331611 |
0npata |
D |
Jan. 18, 2024, 5:25 p.m. |
OK |
Rust 2021 |
TESTS |
21 |
62 |
33280000 |
|
|
242332868 |
0npata |
D |
Jan. 18, 2024, 5:33 p.m. |
OK |
Rust 2021 |
TESTS |
21 |
77 |
29286400 |
|
|
242329801 |
0npata |
D |
Jan. 18, 2024, 5:15 p.m. |
OK |
Rust 2021 |
TESTS |
21 |
77 |
30822400 |
|
|
242334482 |
vstiff |
D |
Jan. 18, 2024, 5:43 p.m. |
OK |
Rust 2021 |
TESTS |
21 |
77 |
37068800 |
|
|
242333467 |
vstiff |
D |
Jan. 18, 2024, 5:37 p.m. |
OK |
Rust 2021 |
TESTS |
21 |
77 |
37068800 |
|
|
242332996 |
0npata |
D |
Jan. 18, 2024, 5:34 p.m. |
OK |
Rust 2021 |
TESTS |
21 |
77 |
44032000 |
|
|
242332116 |
0npata |
D |
Jan. 18, 2024, 5:28 p.m. |
OK |
Rust 2021 |
TESTS |
21 |
78 |
33280000 |
|
|
242334766 |
vstiff |
D |
Jan. 18, 2024, 5:45 p.m. |
OK |
Rust 2021 |
TESTS |
21 |
78 |
37068800 |
|
|
242334690 |
vstiff |
D |
Jan. 18, 2024, 5:45 p.m. |
OK |
Rust 2021 |
TESTS |
21 |
78 |
37068800 |
|
|
remove filters
Back to search problems