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 |
---|---|---|---|---|---|---|
1209 | Codeforces Round 584 - Dasha Code Championship - Elimination Round (rated, open for everyone, Div. 1 + Div. 2) | FINISHED | False | 9000 | 163356899 | Sept. 14, 2019, 1:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 449 ) | G2 | Into Blocks (hard version) | PROGRAMMING | data structures | 3200 |
B'This is a harder version of the problem. In this version q <= 200 ,000 . A sequence of integers is called nice if its elements are arranged in blocks like in [3, 3, 3, 4, 1, 1] . Formally, if two elements are equal, everything in between must also be equal. Let 's define difficulty of a sequence as a minimum possible number of elements to change to get a nice sequence. However, if you change at least one element of value x to value y , you must also change all other elements of value x into y as well. For example, for [3, 3, 1, 3, 2, 1, 2] it isn 't allowed to change first 1 to 3 and second 1 to 2 . You need to leave 1 's untouched or change them to the same value. You are given a sequence of integers a_1, a_2, ldots, a_n and q updates. Each update is of form " i x " -- change a_i to x . Updates are not independent (the change stays for the future). Print the difficulty of the initial sequence and of the sequence after every update. The first line contains integers n and q ( 1 <= n <= 200 ,000 , 0 <= q <= 200 ,000 ), the length of the sequence and the number of the updates. The second line contains n integers a_1, a_2, ldots, a_n ( 1 <= a_i <= 200 ,000 ), the initial sequence. Each of the following q lines contains integers i_t and x_t ( 1 <= i_t <= n , 1 <= x_t <= 200 ,000 ), the position and the new value for this position. Print q+1 integers, the answer for the initial sequence and the answer after every update. '... |
69791 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
62338985 | TimeLimitExceed | G2 | Oct. 11, 2019, 3:41 a.m. | OK | GNU C++11 | TESTS | 25 | 686 | 31334400 | 3200 | |
61596622 | ytrsk | G2 | Oct. 1, 2019, 9:06 a.m. | OK | GNU C++11 | TESTS | 25 | 686 | 32153600 | 3200 | |
60725910 | ljc2002 | G2 | Sept. 17, 2019, 1:53 p.m. | OK | GNU C++11 | TESTS | 25 | 732 | 31334400 | 3200 | |
60676474 | yyf0309 | G2 | Sept. 16, 2019, 12:35 p.m. | OK | GNU C++11 | TESTS | 25 | 842 | 28876800 | 3200 | |
60702341 | Buzhibujue | G2 | Sept. 17, 2019, 1:54 a.m. | OK | GNU C++11 | TESTS | 25 | 904 | 31334400 | 3200 | |
60774417 | luogu_bot4 | G2 | Sept. 18, 2019, 1:50 p.m. | OK | GNU C++11 | TESTS | 25 | 935 | 38912000 | 3200 | |
60671706 | AutumnKite | G2 | Sept. 16, 2019, 10:57 a.m. | OK | GNU C++11 | TESTS | 25 | 951 | 31334400 | 3200 | |
60680380 | spacevortex | G2 | Sept. 16, 2019, 1:45 p.m. | OK | GNU C++11 | TESTS | 25 | 1013 | 31334400 | 3200 | |
61450320 | lzoiexplorer2004 | G2 | Sept. 29, 2019, 2:01 a.m. | OK | GNU C++11 | TESTS | 25 | 1045 | 39321600 | 3200 | |
61043880 | Big_black_jujube | G2 | Sept. 22, 2019, 3 a.m. | OK | GNU C++11 | TESTS | 25 | 1060 | 31334400 | 3200 | |
60931326 | gina0605 | G2 | Sept. 20, 2019, 1:51 p.m. | OK | GNU C++14 | TESTS | 25 | 764 | 26419200 | 3200 | |
60673988 | gtrhetr | G2 | Sept. 16, 2019, 11:49 a.m. | OK | GNU C++14 | TESTS | 25 | 826 | 31436800 | 3200 | |
60956696 | Itst | G2 | Sept. 21, 2019, 3:05 a.m. | OK | GNU C++14 | TESTS | 25 | 967 | 50688000 | 3200 | |
60706473 | mayaohua2003 | G2 | Sept. 17, 2019, 5:34 a.m. | OK | GNU C++14 | TESTS | 25 | 1029 | 31436800 | 3200 | |
60666210 | jerome_wei | G2 | Sept. 16, 2019, 8:12 a.m. | OK | GNU C++14 | TESTS | 25 | 1029 | 31436800 | 3200 | |
60900921 | Motarack | G2 | Sept. 19, 2019, 9:27 p.m. | OK | GNU C++14 | TESTS | 25 | 1044 | 31436800 | 3200 | |
61037783 | 860579 | G2 | Sept. 21, 2019, 8:55 p.m. | OK | GNU C++14 | TESTS | 25 | 1045 | 28262400 | 3200 | |
60690299 | qiqi20021026 | G2 | Sept. 16, 2019, 5:03 p.m. | OK | GNU C++14 | TESTS | 25 | 1060 | 39116800 | 3200 | |
61595793 | wakaka | G2 | Oct. 1, 2019, 8:46 a.m. | OK | GNU C++14 | TESTS | 25 | 1075 | 33280000 | 3200 | |
61042690 | jambow | G2 | Sept. 22, 2019, 2:03 a.m. | OK | GNU C++14 | TESTS | 25 | 1122 | 31436800 | 3200 | |
60742678 | misztsu | G2 | Sept. 17, 2019, 9:31 p.m. | OK | GNU C++17 | TESTS | 25 | 858 | 30720000 | 3200 | |
60648996 | Swiftending | G2 | Sept. 15, 2019, 6:19 p.m. | OK | GNU C++17 | TESTS | 25 | 920 | 33075200 | 3200 | |
60752950 | Elegia | G2 | Sept. 18, 2019, 7:23 a.m. | OK | GNU C++17 | TESTS | 25 | 951 | 29900800 | 3200 | |
60647953 | Swiftending | G2 | Sept. 15, 2019, 5:54 p.m. | OK | GNU C++17 | TESTS | 25 | 1013 | 33075200 | 3200 | |
60647121 | Swiftending | G2 | Sept. 15, 2019, 5:35 p.m. | OK | GNU C++17 | TESTS | 25 | 1029 | 33075200 | 3200 | |
60747757 | xz153531 | G2 | Sept. 18, 2019, 3:32 a.m. | OK | GNU C++17 | TESTS | 25 | 1044 | 31436800 | 3200 | |
62063565 | Super_M. | G2 | Oct. 7, 2019, 2:26 p.m. | OK | GNU C++17 | TESTS | 25 | 1060 | 39526400 | 3200 | |
60666837 | AuqaKyz | G2 | Sept. 16, 2019, 8:34 a.m. | OK | GNU C++17 | TESTS | 25 | 1075 | 33075200 | 3200 | |
60659465 | saketh | G2 | Sept. 16, 2019, 3:28 a.m. | OK | GNU C++17 | TESTS | 25 | 1091 | 22732800 | 3200 | |
64507448 | 9baka_Cirno | G2 | Nov. 8, 2019, 7:29 a.m. | OK | GNU C++17 | TESTS | 25 | 1123 | 36249600 | 3200 | |
60726312 | vjudge4 | G2 | Sept. 17, 2019, 2:01 p.m. | OK | MS C++ | TESTS | 25 | 2027 | 46592000 | 3200 |
Back to search problems