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 |
---|---|---|---|---|---|---|
1288 | Educational Codeforces Round 80 (Rated for Div. 2) | FINISHED | False | 7200 | 158340311 | Jan. 14, 2020, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 3642 ) | E | Messenger Simulator | PROGRAMMING | data structures two pointers | 2100 |
B"Polycarp is a frequent user of the very popular messenger. He's chatting with his friends all the time. He has n friends, numbered from 1 to n . Recall that a permutation of size n is an array of size n such that each integer from 1 to n occurs exactly once in this array. So his recent chat list can be represented with a permutation p of size n . p_1 is the most recent friend Polycarp talked to, p_2 is the second most recent and so on. Initially, Polycarp's recent chat list p looks like 1, 2, ... , n (in other words, it is an identity permutation). After that he receives m messages, the j -th message comes from the friend a_j . And that causes friend a_j to move to the first position in a permutation, shifting everyone between the first position and the current position of a_j by 1 . Note that if the friend a_j is in the first position already then nothing happens. For example, let the recent chat list be p = [4, 1, 5, 3, 2] : For each friend consider all position he has been at in the beginning and after receiving each message. Polycarp wants to know what were the minimum and the maximum positions. The first line contains two integers n and m ( 1 <= n, m <= 3 cdot 10^5 ) -- the number of Polycarp's friends and the number of received messages, respectively. The second line contains m integers a_1, a_2, ... , a_m ( 1 <= a_i <= n ) -- the descriptions of the received messages. Print n pairs of integers. For each friend output the minimum and the maximum positions he has been in the beginning and after receiving each message. In the first example, Polycarp's recent chat list looks like this: So, for example, the positions of the friend 2 are 2, 3, 4, 4, 5 , respectively. Out of these 2 is the minimum one and 5 is the maximum one. Thus, the answer for the friend 2 i"... |
Educational Codeforces Round 80 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
68864599 | avm | E | Jan. 15, 2020, 1:10 p.m. | OK | D | TESTS | 32 | 1871 | 47411200 | 2100 | |
68866135 | avm | E | Jan. 15, 2020, 1:40 p.m. | OK | D | TESTS | 32 | 2043 | 47411200 | 2100 | |
69060018 | rainboy | E | Jan. 18, 2020, 4:07 p.m. | OK | GNU C11 | TESTS | 32 | 1169 | 6041600 | 2100 | |
68866544 | xht37 | E | Jan. 15, 2020, 1:47 p.m. | OK | GNU C++11 | TESTS | 32 | 77 | 10240000 | 2100 | |
68843202 | chenyewei_1234 | E | Jan. 15, 2020, 6:32 a.m. | OK | GNU C++11 | TESTS | 32 | 78 | 8806400 | 2100 | |
69027617 | csj | E | Jan. 18, 2020, 7:30 a.m. | OK | GNU C++11 | TESTS | 32 | 78 | 16076800 | 2100 | |
69072430 | csj | E | Jan. 18, 2020, 11:25 p.m. | OK | GNU C++11 | TESTS | 32 | 93 | 16076800 | 2100 | |
68864906 | shuashuawan | E | Jan. 15, 2020, 1:16 p.m. | OK | GNU C++11 | TESTS | 32 | 124 | 21606400 | 2100 | |
68841910 | kekxy | E | Jan. 15, 2020, 6:05 a.m. | OK | GNU C++11 | TESTS | 32 | 139 | 8294400 | 2100 | |
69089748 | luogu_bot4 | E | Jan. 19, 2020, 9:42 a.m. | OK | GNU C++11 | TESTS | 32 | 139 | 21094400 | 2100 | |
68871547 | Feng | E | Jan. 15, 2020, 3:23 p.m. | OK | GNU C++11 | TESTS | 32 | 140 | 8396800 | 2100 | |
69510655 | codycode2006 | E | Jan. 25, 2020, 10:22 a.m. | OK | GNU C++11 | TESTS | 32 | 140 | 8396800 | 2100 | |
68843225 | luogu_bot4 | E | Jan. 15, 2020, 6:32 a.m. | OK | GNU C++11 | TESTS | 32 | 140 | 9625600 | 2100 | |
68811592 | nehnait | E | Jan. 14, 2020, 4:09 p.m. | OK | GNU C++14 | TESTS | 32 | 108 | 10240000 | 2100 | |
68871885 | Feng | E | Jan. 15, 2020, 3:31 p.m. | OK | GNU C++14 | TESTS | 32 | 139 | 9420800 | 2100 | |
68797193 | natsugiri | E | Jan. 14, 2020, 3:16 p.m. | OK | GNU C++14 | TESTS | 32 | 171 | 7270400 | 2100 | |
69515171 | Origenes | E | Jan. 25, 2020, 11:44 a.m. | OK | GNU C++14 | TESTS | 32 | 186 | 7475200 | 2100 | |
69277111 | K_K | E | Jan. 22, 2020, 3:10 a.m. | OK | GNU C++14 | TESTS | 32 | 186 | 11980800 | 2100 | |
69587887 | Tudor67 | E | Jan. 26, 2020, 8:33 p.m. | OK | GNU C++14 | TESTS | 32 | 187 | 5017600 | 2100 | |
68889218 | Light | E | Jan. 16, 2020, 1:04 a.m. | OK | GNU C++14 | TESTS | 32 | 187 | 6041600 | 2100 | |
69021819 | Ice_Cream | E | Jan. 18, 2020, 6:29 a.m. | OK | GNU C++14 | TESTS | 32 | 187 | 6041600 | 2100 | |
69050820 | rawatds | E | Jan. 18, 2020, 12:40 p.m. | OK | GNU C++14 | TESTS | 32 | 187 | 6041600 | 2100 | |
69007181 | Alisa_0228 | E | Jan. 18, 2020, 12:46 a.m. | OK | GNU C++14 | TESTS | 32 | 187 | 6041600 | 2100 | |
68828570 | neal | E | Jan. 14, 2020, 8:28 p.m. | OK | GNU C++17 | TESTS | 32 | 77 | 6656000 | 2100 | |
68828548 | neal | E | Jan. 14, 2020, 8:27 p.m. | OK | GNU C++17 | TESTS | 32 | 93 | 6656000 | 2100 | |
68828508 | neal | E | Jan. 14, 2020, 8:26 p.m. | OK | GNU C++17 | TESTS | 32 | 93 | 6656000 | 2100 | |
68828678 | neal | E | Jan. 14, 2020, 8:31 p.m. | OK | GNU C++17 | TESTS | 32 | 108 | 6656000 | 2100 | |
69088448 | Qingyu | E | Jan. 19, 2020, 9:14 a.m. | OK | GNU C++17 | TESTS | 32 | 139 | 21094400 | 2100 | |
68817137 | peterr | E | Jan. 14, 2020, 4:34 p.m. | OK | GNU C++17 | TESTS | 32 | 171 | 15769600 | 2100 | |
68796155 | chenyeyuan | E | Jan. 14, 2020, 3:14 p.m. | OK | GNU C++17 | TESTS | 32 | 186 | 4812800 | 2100 | |
68887216 | krijgertje | E | Jan. 15, 2020, 10:40 p.m. | OK | GNU C++17 | TESTS | 32 | 186 | 7270400 | 2100 | |
68986853 | Szki | E | Jan. 17, 2020, 12:48 p.m. | OK | GNU C++17 | TESTS | 32 | 186 | 12083200 | 2100 | |
68860618 | PhantasmDragon | E | Jan. 15, 2020, 11:58 a.m. | OK | GNU C++17 | TESTS | 32 | 186 | 16076800 | 2100 | |
69036744 | NotNight | E | Jan. 18, 2020, 9:12 a.m. | OK | Go | TESTS | 32 | 1201 | 35737600 | 2100 | |
69071047 | TheSawan | E | Jan. 18, 2020, 9:53 p.m. | OK | Java 11 | TESTS | 32 | 373 | 7168000 | 2100 | |
69060017 | Dukkha | E | Jan. 18, 2020, 4:07 p.m. | OK | Java 11 | TESTS | 32 | 639 | 3276800 | 2100 | |
68791393 | ZeyadKhattab | E | Jan. 14, 2020, 3:03 p.m. | OK | Java 11 | TESTS | 32 | 670 | 91443200 | 2100 | |
68868845 | avijit_agarwal | E | Jan. 15, 2020, 2:28 p.m. | OK | Java 11 | TESTS | 32 | 780 | 23347200 | 2100 | |
68875967 | kr1210 | E | Jan. 15, 2020, 4:56 p.m. | OK | Java 11 | TESTS | 32 | 794 | 0 | 2100 | |
68826963 | lightseba | E | Jan. 14, 2020, 7:38 p.m. | OK | Java 11 | TESTS | 32 | 857 | 65433600 | 2100 | |
68912770 | codingalways | E | Jan. 16, 2020, 7:57 a.m. | OK | Java 11 | TESTS | 32 | 997 | 75366400 | 2100 | |
68812550 | barakraganosungam | E | Jan. 14, 2020, 4:14 p.m. | OK | Java 8 | TESTS | 32 | 248 | 20787200 | 2100 | |
69386588 | unicorn20141 | E | Jan. 22, 2020, 11:16 p.m. | OK | Java 8 | TESTS | 32 | 249 | 24576000 | 2100 | |
69093047 | luchy0120 | E | Jan. 19, 2020, 10:56 a.m. | OK | Java 8 | TESTS | 32 | 265 | 0 | 2100 | |
68794296 | uwi | E | Jan. 14, 2020, 3:09 p.m. | OK | Java 8 | TESTS | 32 | 265 | 3686400 | 2100 | |
68889295 | gouh9qn | E | Jan. 16, 2020, 1:09 a.m. | OK | Java 8 | TESTS | 32 | 280 | 13004800 | 2100 | |
69077808 | mufaddalnaya | E | Jan. 19, 2020, 4:39 a.m. | OK | Java 8 | TESTS | 32 | 295 | 3788800 | 2100 | |
68822327 | KharYusuf | E | Jan. 14, 2020, 5:52 p.m. | OK | Java 8 | TESTS | 32 | 311 | 0 | 2100 | |
68889258 | gouh9qn | E | Jan. 16, 2020, 1:07 a.m. | OK | Java 8 | TESTS | 32 | 311 | 13004800 | 2100 | |
68828357 | about | E | Jan. 14, 2020, 8:21 p.m. | OK | Java 8 | TESTS | 32 | 311 | 19660800 | 2100 | |
68819170 | gouh9qn | E | Jan. 14, 2020, 4:56 p.m. | OK | Java 8 | TESTS | 32 | 343 | 13107200 | 2100 | |
68927113 | Spheniscine | E | Jan. 16, 2020, 10:35 a.m. | OK | Kotlin | TESTS | 32 | 343 | 20992000 | 2100 | |
68926840 | Spheniscine | E | Jan. 16, 2020, 10:31 a.m. | OK | Kotlin | TESTS | 32 | 343 | 20992000 | 2100 | |
68926293 | Spheniscine | E | Jan. 16, 2020, 10:25 a.m. | OK | Kotlin | TESTS | 32 | 452 | 20992000 | 2100 | |
68818181 | Tlatoani | E | Jan. 14, 2020, 4:44 p.m. | OK | Kotlin | TESTS | 32 | 452 | 28569600 | 2100 | |
68934490 | yakamoto | E | Jan. 16, 2020, 12:23 p.m. | OK | Kotlin | TESTS | 32 | 670 | 49049600 | 2100 | |
69452793 | Heltion | E | Jan. 24, 2020, 7:03 a.m. | OK | Kotlin | TESTS | 32 | 2480 | 29388800 | 2100 | |
68805529 | riantkb | E | Jan. 14, 2020, 3:42 p.m. | OK | Mono C# | TESTS | 32 | 311 | 37376000 | 2100 | |
68799045 | camypaper | E | Jan. 14, 2020, 3:21 p.m. | OK | Mono C# | TESTS | 32 | 1201 | 12697600 | 2100 | |
68891709 | nauynehc | E | Jan. 16, 2020, 2:36 a.m. | OK | MS C++ | TESTS | 32 | 187 | 12083200 | 2100 | |
68890898 | vjudge4 | E | Jan. 16, 2020, 2:13 a.m. | OK | MS C++ | TESTS | 32 | 202 | 9625600 | 2100 | |
68812110 | tarattata1 | E | Jan. 14, 2020, 4:11 p.m. | OK | MS C++ | TESTS | 32 | 498 | 26521600 | 2100 | |
68878572 | kwfumou1242 | E | Jan. 15, 2020, 5:50 p.m. | OK | MS C++ | TESTS | 32 | 1777 | 27340800 | 2100 | |
68826957 | AleksanderBalobanov | E | Jan. 14, 2020, 7:38 p.m. | OK | MS C++ 2017 | TESTS | 32 | 217 | 8396800 | 2100 | |
68890750 | vjudge5 | E | Jan. 16, 2020, 2:07 a.m. | OK | MS C++ 2017 | TESTS | 32 | 249 | 8396800 | 2100 | |
68834537 | youx | E | Jan. 15, 2020, 2:04 a.m. | OK | MS C++ 2017 | TESTS | 32 | 280 | 6041600 | 2100 | |
68842037 | yorky | E | Jan. 15, 2020, 6:08 a.m. | OK | MS C++ 2017 | TESTS | 32 | 592 | 7270400 | 2100 | |
69032591 | yudedako | E | Jan. 18, 2020, 8:26 a.m. | OK | MS C++ 2017 | TESTS | 32 | 639 | 6041600 | 2100 | |
68811404 | AlexanderL | E | Jan. 14, 2020, 4:08 p.m. | OK | MS C++ 2017 | TESTS | 32 | 654 | 6041600 | 2100 | |
68874385 | q8514199 | E | Jan. 15, 2020, 4:23 p.m. | OK | MS C++ 2017 | TESTS | 32 | 920 | 13209600 | 2100 | |
68798172 | pichulia | E | Jan. 14, 2020, 3:19 p.m. | OK | MS C++ 2017 | TESTS | 32 | 1279 | 14438400 | 2100 | |
68806976 | jjang36524 | E | Jan. 14, 2020, 3:48 p.m. | OK | MS C++ 2017 | TESTS | 32 | 1980 | 40652800 | 2100 | |
68803649 | pajenegod | E | Jan. 14, 2020, 3:35 p.m. | OK | PyPy 2 | TESTS | 32 | 623 | 49356800 | 2100 | |
68971599 | mitribunskiy | E | Jan. 17, 2020, 7:13 a.m. | OK | PyPy 3 | TESTS | 32 | 779 | 25395200 | 2100 | |
68886495 | chayapatlbs | E | Jan. 15, 2020, 9:52 p.m. | OK | PyPy 3 | TESTS | 32 | 842 | 32665600 | 2100 | |
69005158 | tycyd | E | Jan. 17, 2020, 10:27 p.m. | OK | PyPy 3 | TESTS | 32 | 904 | 31436800 | 2100 | |
68844420 | Firepaw | E | Jan. 15, 2020, 6:55 a.m. | OK | PyPy 3 | TESTS | 32 | 935 | 52224000 | 2100 | |
69203958 | cftt | E | Jan. 20, 2020, 5:25 p.m. | OK | PyPy 3 | TESTS | 32 | 936 | 34816000 | 2100 | |
68813533 | dn6049949 | E | Jan. 14, 2020, 4:19 p.m. | OK | PyPy 3 | TESTS | 32 | 951 | 31129600 | 2100 | |
68976407 | nagitaosu | E | Jan. 17, 2020, 9 a.m. | OK | PyPy 3 | TESTS | 32 | 1185 | 39526400 | 2100 | |
68991275 | SinKing | E | Jan. 17, 2020, 3:17 p.m. | OK | PyPy 3 | TESTS | 32 | 1372 | 36454400 | 2100 | |
69257380 | satyamcse | E | Jan. 21, 2020, 4:02 p.m. | OK | PyPy 3 | TESTS | 32 | 1435 | 92876800 | 2100 | |
69043253 | addammy | E | Jan. 18, 2020, 10:31 a.m. | OK | PyPy 3 | TESTS | 32 | 2854 | 181555200 | 2100 | |
68845188 | idgaf | E | Jan. 15, 2020, 7:10 a.m. | OK | Ruby | TESTS | 32 | 2807 | 91238400 | 2100 | |
68801744 | sansen | E | Jan. 14, 2020, 3:29 p.m. | OK | Rust | TESTS | 32 | 109 | 11366400 | 2100 | |
69258266 | bmerry | E | Jan. 21, 2020, 4:17 p.m. | OK | Rust | TESTS | 32 | 233 | 35123200 | 2100 | |
69243497 | bmerry | E | Jan. 21, 2020, 12:12 p.m. | OK | Rust | TESTS | 32 | 2823 | 35123200 | 2100 | |
69251085 | bmerry | E | Jan. 21, 2020, 2:17 p.m. | OK | Rust | TESTS | 32 | 2870 | 35123200 | 2100 | |
68944229 | yoshrc | E | Jan. 16, 2020, 3:32 p.m. | OK | Rust | TESTS | 32 | 2901 | 38092800 | 2100 | |
68944075 | yoshrc | E | Jan. 16, 2020, 3:28 p.m. | OK | Rust | TESTS | 32 | 2901 | 38092800 | 2100 |
Back to search problems