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 |
---|---|---|---|---|---|---|
1051 | Educational Codeforces Round 51 (Rated for Div. 2) | FINISHED | False | 7200 | 200070923 | Sept. 20, 2018, 2:45 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 411 ) | G | Distinctification | PROGRAMMING | data structures ds greedy | 2700 |
B'Suppose you are given a sequence S of k pairs of integers (a_1, b_1), (a_2, b_2), ... , (a_k, b_k) . You can perform the following operations on it: Each operation can be performed arbitrary number of times (possibly zero). Let f(S) be minimum possible x such that there exists a sequence of operations with total cost x , after which all a_i from S are pairwise distinct. Now for the task itself ... You are given a sequence P consisting of n pairs of integers (a_1, b_1), (a_2, b_2), ... , (a_n, b_n) . All b_i are pairwise distinct. Let P_i be the sequence consisting of the first i pairs of P . Your task is to calculate the values of f(P_1), f(P_2), ... , f(P_n) . The first line contains a single integer n ( 1 <= n <= 2 cdot 10^5 ) -- the number of pairs in sequence P . Next n lines contain the elements of P : i -th of the next n lines contains two integers a_i and b_i ( 1 <= a_i <= 2 cdot 10^5 , 1 <= b_i <= n ). It is guaranteed that all values of b_i are pairwise distinct. Print n integers -- the i -th number should be equal to f(P_i) . '... |
Educational Codeforces Round 51 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
44732203 | test616.cpp | G | Oct. 23, 2018, 11:11 a.m. | OK | GNU C++11 | TESTS | 61 | 327 | 185958400 | 2700 | |
60333751 | dqa2020 | G | Sept. 10, 2019, 7:27 a.m. | OK | GNU C++11 | TESTS | 61 | 373 | 94412800 | 2700 | |
45432925 | hychyc | G | Nov. 8, 2018, 5:48 a.m. | OK | GNU C++11 | TESTS | 61 | 389 | 346316800 | 2700 | |
47146768 | zstu_MingSD | G | Dec. 17, 2018, 3:16 a.m. | OK | GNU C++11 | TESTS | 61 | 436 | 180326400 | 2700 | |
54507160 | WOSHIGEPACHONG2 | G | May 23, 2019, 4:51 a.m. | OK | GNU C++11 | TESTS | 61 | 467 | 19046400 | 2700 | |
46132717 | frodakcin | G | Nov. 24, 2018, 2:55 a.m. | OK | GNU C++11 | TESTS | 61 | 468 | 84172800 | 2700 | |
50823172 | hk_cnyali | G | March 5, 2019, 2:25 p.m. | OK | GNU C++11 | TESTS | 61 | 468 | 396083200 | 2700 | |
49950473 | SovietPower | G | Feb. 15, 2019, 1:50 p.m. | OK | GNU C++11 | TESTS | 61 | 483 | 164966400 | 2700 | |
45097868 | luogu_bot1 | G | Oct. 30, 2018, 12:36 p.m. | OK | GNU C++11 | TESTS | 61 | 483 | 216678400 | 2700 | |
49892360 | SovietPower | G | Feb. 14, 2019, 4:57 a.m. | OK | GNU C++11 | TESTS | 61 | 499 | 164966400 | 2700 | |
69518934 | problem-solved | G | Jan. 25, 2020, 12:52 p.m. | OK | GNU C++14 | TESTS | 61 | 483 | 149504000 | 2700 | |
44064332 | zhou888 | G | Oct. 10, 2018, 8:14 a.m. | OK | GNU C++14 | TESTS | 61 | 514 | 261427200 | 2700 | |
44751504 | ReaLNero1 | G | Oct. 23, 2018, 8:12 p.m. | OK | GNU C++14 | TESTS | 61 | 545 | 261427200 | 2700 | |
52563096 | luogu_bot1 | G | April 10, 2019, 11:23 a.m. | OK | GNU C++14 | TESTS | 61 | 623 | 296038400 | 2700 | |
43232839 | tmwilliamlin168 | G | Sept. 22, 2018, 6:12 a.m. | OK | GNU C++14 | TESTS | 61 | 701 | 79564800 | 2700 | |
43395947 | dwt | G | Sept. 25, 2018, 5:19 a.m. | OK | GNU C++14 | TESTS | 61 | 701 | 335462400 | 2700 | |
45371639 | w446506278 | G | Nov. 6, 2018, 10:09 a.m. | OK | GNU C++14 | TESTS | 61 | 717 | 261529600 | 2700 | |
43379835 | Viktor_Terziev | G | Sept. 24, 2018, 5:50 p.m. | OK | GNU C++14 | TESTS | 61 | 732 | 101888000 | 2700 | |
43604599 | __WNJXYK | G | Sept. 30, 2018, 11:44 a.m. | OK | GNU C++14 | TESTS | 61 | 748 | 213708800 | 2700 | |
45097845 | fks20011206 | G | Oct. 30, 2018, 12:36 p.m. | OK | GNU C++14 | TESTS | 61 | 748 | 216780800 | 2700 | |
64498565 | EDawn | G | Nov. 8, 2019, 2:25 a.m. | OK | GNU C++17 | TESTS | 61 | 436 | 197222400 | 2700 | |
66455753 | hjk1030 | G | Dec. 7, 2019, 1:05 p.m. | OK | GNU C++17 | TESTS | 61 | 452 | 245248000 | 2700 | |
43552510 | q234rty | G | Sept. 29, 2018, 2:33 a.m. | OK | GNU C++17 | TESTS | 61 | 529 | 466534400 | 2700 | |
52563075 | Fulisike | G | April 10, 2019, 11:23 a.m. | OK | GNU C++17 | TESTS | 61 | 530 | 296038400 | 2700 | |
49667867 | Minnakhmetov | G | Feb. 9, 2019, 3:18 p.m. | OK | GNU C++17 | TESTS | 61 | 607 | 11673600 | 2700 | |
47839614 | CMXRYNP | G | Jan. 2, 2019, 11 a.m. | OK | GNU C++17 | TESTS | 61 | 608 | 120012800 | 2700 | |
52563099 | Fulisike | G | April 10, 2019, 11:24 a.m. | OK | GNU C++17 | TESTS | 61 | 638 | 247910400 | 2700 | |
48070923 | awmir._.mi | G | Jan. 7, 2019, 10:47 p.m. | OK | GNU C++17 | TESTS | 61 | 639 | 79769600 | 2700 | |
47839441 | CMXRYNP | G | Jan. 2, 2019, 10:53 a.m. | OK | GNU C++17 | TESTS | 61 | 639 | 227430400 | 2700 | |
64180162 | pootis | G | Nov. 3, 2019, 11:42 p.m. | OK | GNU C++17 | TESTS | 61 | 655 | 205107200 | 2700 |
Back to search problems