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 |
| 916
|
Codeforces Round 457 (Div. 2) |
FINISHED |
False |
7200 |
260033123 |
Jan. 19, 2018, 2:35 p.m. |
Problems
Why I have to finish so many assignments??? Jamie is getting very busy with his school life. He starts to forget the assignments that he has to do. He decided to write the things down on a to-do list. He assigns a value priority for each of his assignment (lower value means more important) so he can decide which he needs to spend more time on. After a few days, Jamie finds out the list is too large that he can't even manage the list by himself! As you are a good friend of Jamie, help him write a program to support the following operations on the to-do list: set a i x i — Add assignment a i to the to-do list if it is not present, and set its priority to x i . If assignment a i is already in the to-do list, its priority is changed to x i . remove a i — Remove assignment a i from the to-do list if it is present in it. query a i — Output the number of assignments that are more important (have a smaller priority value) than assignment a i , so Jamie can decide a better schedule. Output - 1 if a i is not in the to-do list. undo d i — Undo all changes that have been made in the previous d i days (not including the day of this operation) At day 0 , the to-do list is empty. In each of the following q days, Jamie will do exactly one out of the four operations. If the operation is a query , you should output the result of the query before proceeding to the next day , or poor Jamie cannot make appropriate decisions. The first line consists of a single integer q (1 ≤ q ≤ 10 5 ) — the number of operations. The following q lines consists of the description of the operations. The i -th line consists of the operation that Jamie has done in the i -th day. The query has the following format: The first word in the line indicates the type of operation. It must be one of the following four: set , remove , query , undo . If it is a set operation, a string a i and an integer x i follows (1 ≤ x i ≤ 10 9 ) . a i is the assignment that need to be set to priority x i . If it is a rem |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|
34402762 |
dalt |
D |
Jan. 21, 2018, 6:34 a.m. |
OK |
GNU C |
TESTS |
62 |
702 |
344780800 |
|
2600 |
|
34324573 |
jijiang |
D |
Jan. 19, 2018, 4:15 p.m. |
OK |
GNU C++ |
TESTS |
62 |
436 |
303411200 |
|
2600 |
|
34329518 |
guille |
D |
Jan. 19, 2018, 7:58 p.m. |
OK |
GNU C++ |
TESTS |
62 |
514 |
346726400 |
|
2600 |
|
37543757 |
luogu_bot1 |
D |
April 23, 2018, 3:34 a.m. |
OK |
GNU C++ |
TESTS |
62 |
530 |
305254400 |
|
2600 |
|
34943039 |
mengbierr |
D |
Feb. 5, 2018, 12:06 p.m. |
OK |
GNU C++ |
TESTS |
62 |
545 |
393728000 |
|
2600 |
|
34316913 |
nhho |
D |
Jan. 19, 2018, 3:25 p.m. |
OK |
GNU C++ |
TESTS |
62 |
545 |
393728000 |
|
2600 |
|
34703460 |
soul_departed |
D |
Jan. 30, 2018, 9:06 a.m. |
OK |
GNU C++ |
TESTS |
62 |
670 |
139264000 |
|
2600 |
|
34332797 |
KrK |
D |
Jan. 19, 2018, 11:03 p.m. |
OK |
GNU C++ |
TESTS |
62 |
670 |
195276800 |
|
2600 |
|
34702034 |
soul_departed |
D |
Jan. 30, 2018, 8:04 a.m. |
OK |
GNU C++ |
TESTS |
62 |
670 |
248934400 |
|
2600 |
|
34341973 |
TONYTRAN |
D |
Jan. 20, 2018, 7:01 a.m. |
OK |
GNU C++ |
TESTS |
62 |
717 |
350822400 |
|
2600 |
|
37859704 |
vjudge5 |
D |
May 3, 2018, 11:03 a.m. |
OK |
GNU C++ |
TESTS |
62 |
763 |
348672000 |
|
2600 |
|
34598625 |
yyc_ |
D |
Jan. 27, 2018, 8:03 a.m. |
OK |
GNU C++11 |
TESTS |
62 |
467 |
399667200 |
|
2600 |
|
38202424 |
just_soso |
D |
May 13, 2018, 11:19 p.m. |
OK |
GNU C++11 |
TESTS |
62 |
514 |
270540800 |
|
2600 |
|
34326213 |
I_love_Minway_Wang |
D |
Jan. 19, 2018, 4:32 p.m. |
OK |
GNU C++11 |
TESTS |
62 |
529 |
188928000 |
|
2600 |
|
69523166 |
Sugarii |
D |
Jan. 25, 2020, 2:02 p.m. |
OK |
GNU C++11 |
TESTS |
62 |
530 |
337510400 |
|
2600 |
|
38202412 |
just_soso |
D |
May 13, 2018, 11:18 p.m. |
OK |
GNU C++11 |
TESTS |
62 |
530 |
478822400 |
|
2600 |
|
54504064 |
time_interspace |
D |
May 23, 2019, 1:54 a.m. |
OK |
GNU C++11 |
TESTS |
62 |
546 |
391270400 |
|
2600 |
|
34335466 |
pr3pony |
D |
Jan. 20, 2018, 2:23 a.m. |
OK |
GNU C++11 |
TESTS |
62 |
561 |
113254400 |
|
2600 |
|
38202459 |
just_soso |
D |
May 13, 2018, 11:23 p.m. |
OK |
GNU C++11 |
TESTS |
62 |
561 |
254464000 |
|
2600 |
|
34417622 |
SheepRanger |
D |
Jan. 21, 2018, 2:56 p.m. |
OK |
GNU C++11 |
TESTS |
62 |
561 |
517529600 |
|
2600 |
|
34411294 |
massimodong |
D |
Jan. 21, 2018, 11:17 a.m. |
OK |
GNU C++11 |
TESTS |
62 |
576 |
503808000 |
|
2600 |
|
34332471 |
MrDindows |
D |
Jan. 19, 2018, 10:38 p.m. |
OK |
GNU C++14 |
TESTS |
62 |
405 |
153395200 |
|
2600 |
|
34636974 |
Hooin_Kyoma |
D |
Jan. 28, 2018, 3:28 p.m. |
OK |
GNU C++14 |
TESTS |
62 |
452 |
252825600 |
|
2600 |
|
34332416 |
MrDindows |
D |
Jan. 19, 2018, 10:33 p.m. |
OK |
GNU C++14 |
TESTS |
62 |
483 |
153395200 |
|
2600 |
|
34804282 |
dotorya |
D |
Feb. 1, 2018, 1:34 p.m. |
OK |
GNU C++14 |
TESTS |
62 |
483 |
214118400 |
|
2600 |
|
34350978 |
haleyk100198 |
D |
Jan. 20, 2018, 11:41 a.m. |
OK |
GNU C++14 |
TESTS |
62 |
483 |
303308800 |
|
2600 |
|
34474195 |
shenyunhan |
D |
Jan. 23, 2018, 8:27 a.m. |
OK |
GNU C++14 |
TESTS |
62 |
499 |
331366400 |
|
2600 |
|
34332744 |
MrDindows |
D |
Jan. 19, 2018, 10:59 p.m. |
OK |
GNU C++14 |
TESTS |
62 |
514 |
152678400 |
|
2600 |
|
34455000 |
phython1996 |
D |
Jan. 22, 2018, 4:44 p.m. |
OK |
GNU C++14 |
TESTS |
62 |
514 |
232140800 |
|
2600 |
|
34339978 |
hmc |
D |
Jan. 20, 2018, 5:58 a.m. |
OK |
GNU C++14 |
TESTS |
62 |
514 |
252825600 |
|
2600 |
|
34430582 |
hamayanhamayan |
D |
Jan. 22, 2018, 3:13 a.m. |
OK |
GNU C++14 |
TESTS |
62 |
514 |
328704000 |
|
2600 |
|
41952017 |
vjudge2 |
D |
Aug. 22, 2018, 2:28 a.m. |
OK |
GNU C++17 |
TESTS |
62 |
655 |
126668800 |
|
2600 |
|
35613427 |
comosus7 |
D |
Feb. 24, 2018, 2:23 a.m. |
OK |
GNU C++17 |
TESTS |
62 |
748 |
349593600 |
|
2600 |
|
44835718 |
szawinis |
D |
Oct. 25, 2018, 10:46 a.m. |
OK |
GNU C++17 |
TESTS |
62 |
810 |
258355200 |
|
2600 |
|
58683116 |
LinaInverse |
D |
Aug. 12, 2019, 8:12 p.m. |
OK |
GNU C++17 |
TESTS |
62 |
810 |
343142400 |
|
2600 |
|
53654223 |
ExplosionMagic |
D |
May 2, 2019, 3:31 a.m. |
OK |
GNU C++17 |
TESTS |
62 |
810 |
419635200 |
|
2600 |
|
62671323 |
hjk1030 |
D |
Oct. 16, 2019, 9:52 a.m. |
OK |
GNU C++17 |
TESTS |
62 |
826 |
250880000 |
|
2600 |
|
61985302 |
Shayan.P |
D |
Oct. 6, 2019, 1:20 p.m. |
OK |
GNU C++17 |
TESTS |
62 |
826 |
250880000 |
|
2600 |
|
58406339 |
ExplosionMagic |
D |
Aug. 6, 2019, 8:55 p.m. |
OK |
GNU C++17 |
TESTS |
62 |
841 |
343142400 |
|
2600 |
|
44834809 |
szawinis |
D |
Oct. 25, 2018, 10:20 a.m. |
OK |
GNU C++17 |
TESTS |
62 |
857 |
406528000 |
|
2600 |
|
53654169 |
ExplosionMagic |
D |
May 2, 2019, 3:29 a.m. |
OK |
GNU C++17 |
TESTS |
62 |
858 |
419635200 |
|
2600 |
|
34331352 |
aminul |
D |
Jan. 19, 2018, 9:22 p.m. |
OK |
Java 8 |
TESTS |
62 |
1996 |
167219200 |
|
2600 |
|
34329715 |
uwi |
D |
Jan. 19, 2018, 8:05 p.m. |
OK |
Java 8 |
TESTS |
62 |
1996 |
167219200 |
|
2600 |
|
34411758 |
ys1468362286 |
D |
Jan. 21, 2018, 11:31 a.m. |
OK |
MS C++ |
TESTS |
62 |
546 |
128716800 |
|
2600 |
|
34413544 |
vjudge3 |
D |
Jan. 21, 2018, 12:28 p.m. |
OK |
MS C++ |
TESTS |
62 |
560 |
128716800 |
|
2600 |
|
35169129 |
NEU_ENVY |
D |
Feb. 12, 2018, 5:25 a.m. |
OK |
MS C++ |
TESTS |
62 |
655 |
347238400 |
|
2600 |
remove filters
Back to search problems