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'King Kog got annoyed of the usual laxity of his knights -- they can break into his hall without prior notice! Thus, the King decided to build a reception with a queue where each knight chooses in advance the time when he will come and how long the visit will take. The knights are served in the order of the recorded time, but each knight has to wait until the visits of all the knights before him are finished. Princess Keabeanie wants to see her father. However, she does not want to interrupt the knights so she joins the queue. Unfortunately, the knights change their minds very often -- they can join the queue or cancel their visits. Please help the princess to understand how long she will have to wait until she sees her father if she enters the queue at the specified moments of time given the records at the reception. The first line of the input contains a single integer q ( 1 <= q q <= q 3 cdot 10^5 ) -- the number of events. An event can be of three types: join, cancel, or query. It is guaranteed that after each event there are no two knights with the same entrance time in the queue. Cancel events refer to the previous joins that were not cancelled yet. Keabeanie can come at the same time as some knight, but Keabeanie is very polite and she will wait for the knight to pass. For each query write a separate line with the amount of time Keabeanie will have to wait. '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
48654592 |
ReaLNero1 |
K |
Jan. 21, 2019, 1:40 a.m. |
OK |
GNU C++11 |
TESTS |
45 |
155 |
36761600 |
|
2400 |
47484330 |
Dust1404 |
K |
Dec. 25, 2018, 7:37 a.m. |
OK |
GNU C++11 |
TESTS |
45 |
155 |
36761600 |
|
2400 |
50520773 |
wh_ZH |
K |
Feb. 26, 2019, 9:15 a.m. |
OK |
GNU C++11 |
TESTS |
45 |
156 |
88985600 |
|
2400 |
49136384 |
vjudge1 |
K |
Jan. 29, 2019, 7:52 a.m. |
OK |
GNU C++11 |
TESTS |
45 |
186 |
98611200 |
|
2400 |
46566452 |
aurinegro |
K |
Dec. 4, 2018, 12:17 a.m. |
OK |
GNU C++11 |
TESTS |
45 |
202 |
23552000 |
|
2400 |
48793752 |
Okazaki_Yumemi |
K |
Jan. 23, 2019, 11:53 a.m. |
OK |
GNU C++11 |
TESTS |
45 |
202 |
68915200 |
|
2400 |
48786200 |
luogu_bot3 |
K |
Jan. 23, 2019, 9:04 a.m. |
OK |
GNU C++11 |
TESTS |
45 |
202 |
100966400 |
|
2400 |
48786173 |
Jugglypuff |
K |
Jan. 23, 2019, 9:03 a.m. |
OK |
GNU C++11 |
TESTS |
45 |
217 |
100966400 |
|
2400 |
46703335 |
frodakcin |
K |
Dec. 7, 2018, 5:08 a.m. |
OK |
GNU C++11 |
TESTS |
45 |
218 |
82636800 |
|
2400 |
46492085 |
stal_xy23z7b8 |
K |
Dec. 2, 2018, 9:59 a.m. |
OK |
GNU C++11 |
TESTS |
45 |
218 |
98611200 |
|
2400 |
46516457 |
wleung_bvg |
K |
Dec. 2, 2018, 4:38 p.m. |
OK |
GNU C++14 |
TESTS |
45 |
140 |
60928000 |
|
2400 |
46567672 |
rfpermen |
K |
Dec. 4, 2018, 2:09 a.m. |
OK |
GNU C++14 |
TESTS |
45 |
265 |
37683200 |
|
2400 |
47822457 |
krijgertje |
K |
Jan. 1, 2019, 6:47 p.m. |
OK |
GNU C++14 |
TESTS |
45 |
265 |
70758400 |
|
2400 |
47031164 |
IvL |
K |
Dec. 15, 2018, 9:53 a.m. |
OK |
GNU C++14 |
TESTS |
45 |
280 |
42086400 |
|
2400 |
46573258 |
KeyID Phronesis 423555290 |
K |
Dec. 4, 2018, 7:12 a.m. |
OK |
GNU C++14 |
TESTS |
45 |
280 |
70553600 |
|
2400 |
46926960 |
BlockChanZJ Samaritan_infi DaleDale |
K |
Dec. 12, 2018, 9:18 a.m. |
OK |
GNU C++14 |
TESTS |
45 |
280 |
104243200 |
|
2400 |
48578480 |
fleimgruber lumibons Gregory |
K |
Jan. 19, 2019, 3:21 p.m. |
OK |
GNU C++14 |
TESTS |
45 |
295 |
35225600 |
|
2400 |
65598729 |
Motarack Light Hiasat |
K |
Nov. 23, 2019, 5 p.m. |
OK |
GNU C++14 |
TESTS |
45 |
295 |
67788800 |
|
2400 |
46514491 |
kazuma |
K |
Dec. 2, 2018, 3:13 p.m. |
OK |
GNU C++14 |
TESTS |
45 |
311 |
34816000 |
|
2400 |
47382702 |
mjhun |
K |
Dec. 22, 2018, 11:43 p.m. |
OK |
GNU C++14 |
TESTS |
45 |
311 |
39014400 |
|
2400 |
46475236 |
MiFaFaOvO TLE FizzyDavid |
K |
Dec. 2, 2018, 8:06 a.m. |
OK |
GNU C++17 |
TESTS |
45 |
234 |
96256000 |
|
2400 |
64578337 |
zdolna_kaczka _h_ Miyukine |
K |
Nov. 9, 2019, 11:23 a.m. |
OK |
GNU C++17 |
TESTS |
45 |
249 |
36864000 |
|
2400 |
49516989 |
vjudge4 |
K |
Feb. 6, 2019, 4:14 a.m. |
OK |
GNU C++17 |
TESTS |
45 |
249 |
68403200 |
|
2400 |
58648036 |
liaoranrio |
K |
Aug. 12, 2019, 6:32 a.m. |
OK |
GNU C++17 |
TESTS |
45 |
264 |
66560000 |
|
2400 |
49511374 |
vjudge2 |
K |
Feb. 5, 2019, 8:39 p.m. |
OK |
GNU C++17 |
TESTS |
45 |
264 |
68403200 |
|
2400 |
66073064 |
apostoldaniel854 |
K |
Nov. 30, 2019, 8:46 p.m. |
OK |
GNU C++17 |
TESTS |
45 |
264 |
72192000 |
|
2400 |
50465297 |
ericxu0 desert97 yum |
K |
Feb. 24, 2019, 7:30 p.m. |
OK |
GNU C++17 |
TESTS |
45 |
265 |
34816000 |
|
2400 |
46485557 |
ryo_issy DAyamaCTF imulan |
K |
Dec. 2, 2018, 9:28 a.m. |
OK |
GNU C++17 |
TESTS |
45 |
265 |
36044800 |
|
2400 |
46476098 |
Swistakk mnbvmar |
K |
Dec. 2, 2018, 8:07 a.m. |
OK |
GNU C++17 |
TESTS |
45 |
265 |
46796800 |
|
2400 |
46547385 |
theodor.moroianu |
K |
Dec. 3, 2018, 3:48 p.m. |
OK |
GNU C++17 |
TESTS |
45 |
265 |
67276800 |
|
2400 |
62387684 |
beginner1010 |
K |
Oct. 11, 2019, 10:35 p.m. |
OK |
Java 8 |
TESTS |
45 |
248 |
41369600 |
|
2400 |
62387661 |
beginner1010 |
K |
Oct. 11, 2019, 10:34 p.m. |
OK |
Java 8 |
TESTS |
45 |
265 |
41369600 |
|
2400 |
46720416 |
Musin |
K |
Dec. 7, 2018, 12:58 p.m. |
OK |
Java 8 |
TESTS |
45 |
312 |
41369600 |
|
2400 |
46692875 |
Musin |
K |
Dec. 6, 2018, 5:38 p.m. |
OK |
Java 8 |
TESTS |
45 |
373 |
41267200 |
|
2400 |
62387294 |
beginner1010 |
K |
Oct. 11, 2019, 10:18 p.m. |
OK |
Java 8 |
TESTS |
45 |
374 |
41369600 |
|
2400 |
62387177 |
beginner1010 |
K |
Oct. 11, 2019, 10:12 p.m. |
OK |
Java 8 |
TESTS |
45 |
374 |
41369600 |
|
2400 |
46943135 |
Jeel_Vaishnav |
K |
Dec. 12, 2018, 5:59 p.m. |
OK |
Java 8 |
TESTS |
45 |
374 |
93798400 |
|
2400 |
62387348 |
beginner1010 |
K |
Oct. 11, 2019, 10:21 p.m. |
OK |
Java 8 |
TESTS |
45 |
389 |
41369600 |
|
2400 |
50998975 |
Suzukaze |
K |
March 8, 2019, 5:50 a.m. |
OK |
Java 8 |
TESTS |
45 |
514 |
83046400 |
|
2400 |
46736430 |
Musin |
K |
Dec. 7, 2018, 8:14 p.m. |
OK |
Java 8 |
TESTS |
45 |
545 |
44748800 |
|
2400 |
46720325 |
peregrinus |
K |
Dec. 7, 2018, 12:56 p.m. |
OK |
Mono C# |
TESTS |
45 |
1809 |
164147200 |
|
2400 |
49135469 |
vjudge5 |
K |
Jan. 29, 2019, 7:26 a.m. |
OK |
MS C++ |
TESTS |
45 |
295 |
104448000 |
|
2400 |
60561785 |
vjudge2 |
K |
Sept. 14, 2019, 2:46 p.m. |
OK |
MS C++ |
TESTS |
45 |
296 |
98611200 |
|
2400 |
64631221 |
wp32pw |
K |
Nov. 10, 2019, 10:13 a.m. |
OK |
MS C++ 2017 |
TESTS |
45 |
608 |
79257600 |
|
2400 |
63410148 |
xim97 |
K |
Oct. 25, 2019, 11:15 p.m. |
OK |
MS C++ 2017 |
TESTS |
45 |
1184 |
72396800 |
|
2400 |
63031234 |
xim97 |
K |
Oct. 20, 2019, 6:31 p.m. |
OK |
MS C++ 2017 |
TESTS |
45 |
1185 |
72192000 |
|
2400 |
63031451 |
xim97 |
K |
Oct. 20, 2019, 6:36 p.m. |
OK |
MS C++ 2017 |
TESTS |
45 |
1216 |
72192000 |
|
2400 |
63032674 |
xim97 |
K |
Oct. 20, 2019, 7:09 p.m. |
OK |
MS C++ 2017 |
TESTS |
45 |
1231 |
72192000 |
|
2400 |
63031783 |
xim97 |
K |
Oct. 20, 2019, 6:45 p.m. |
OK |
MS C++ 2017 |
TESTS |
45 |
1231 |
72192000 |
|
2400 |
63031262 |
xim97 |
K |
Oct. 20, 2019, 6:31 p.m. |
OK |
MS C++ 2017 |
TESTS |
45 |
1248 |
72192000 |
|
2400 |
46711676 |
|
K |
Dec. 7, 2018, 9:06 a.m. |
OK |
Unknown |
TESTS |
0 |
0 |
0 |
|
2400 |
46711597 |
|
K |
Dec. 7, 2018, 9:06 a.m. |
OK |
Unknown |
TESTS |
0 |
0 |
0 |
|
2400 |
46711578 |
|
K |
Dec. 7, 2018, 9:06 a.m. |
OK |
Unknown |
TESTS |
0 |
0 |
0 |
|
2400 |
46711560 |
|
K |
Dec. 7, 2018, 9:06 a.m. |
OK |
Unknown |
TESTS |
0 |
0 |
0 |
|
2400 |
46711532 |
|
K |
Dec. 7, 2018, 9:06 a.m. |
OK |
Unknown |
TESTS |
0 |
0 |
0 |
|
2400 |
46711411 |
|
K |
Dec. 7, 2018, 9:06 a.m. |
OK |
Unknown |
TESTS |
0 |
0 |
0 |
|
2400 |
46711303 |
|
K |
Dec. 7, 2018, 9:06 a.m. |
OK |
Unknown |
TESTS |
0 |
0 |
0 |
|
2400 |
46711298 |
|
K |
Dec. 7, 2018, 9:06 a.m. |
OK |
Unknown |
TESTS |
0 |
0 |
0 |
|
2400 |
46712464 |
|
K |
Dec. 7, 2018, 9:06 a.m. |
OK |
Unknown |
TESTS |
0 |
0 |
0 |
|
2400 |
46712190 |
|
K |
Dec. 7, 2018, 9:06 a.m. |
OK |
Unknown |
TESTS |
0 |
0 |
0 |
|
2400 |
remove filters
Back to search problems