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 |
---|---|---|---|---|---|---|
1714 | Codeforces Round 811 (Div. 3) | FINISHED | False | 8100 | 77815463 | Aug. 1, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 30898 ) | B | Remove Prefix | PROGRAMMING | data structures implementation |
B'Polycarp was presented with some sequence of integers a of length n ( 1 <= a_i <= n ). A sequence can make Polycarp happy only if it consists of different numbers (i.e. distinct numbers). In order to make his sequence like this, Polycarp is going to make some (possibly zero) number of moves. In one move, he can: For example, in one move, the sequence [3, 1, 4, 3] will produce the sequence [1, 4, 3] , which consists of different numbers. Determine the minimum number of moves he needs to make so that in the remaining sequence all elements are different. In other words, find the length of the smallest prefix of the given sequence a , after removing which all values in the sequence will be unique. The first line of the input contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Each test case consists of two lines. The first line contains an integer n ( 1 <= n <= 2 cdot 10^5 ) -- the length of the given sequence a . The second line contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= n ) -- elements of the given sequence a . It is guaranteed that the sum of n values over all test cases does not exceed 2 cdot 10^5 . For each test case print your answer on a separate line -- the minimum number of elements that must be removed from the beginning of the sequence so that all remaining elements are different. The following are the sequences that will remain after the removal of prefixes: It is easy to see that all the remaining sequences contain only distinct elements. In each test case, the shortest matching prefix was removed. '... |
Codeforces Round #811 (Div. 3) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
166648138 | Muhammad.exe | B | Aug. 2, 2022, 4:26 a.m. | OK | C# 10 | TESTS | 13 | 108 | 23654400 | ||
166629493 | bluemegane | B | Aug. 1, 2022, 10:22 p.m. | OK | C# 8 | TESTS | 13 | 155 | 27750400 | ||
166630678 | LeonGymretzka | B | Aug. 1, 2022, 10:54 p.m. | OK | GNU C11 | TESTS | 13 | 93 | 1536000 | ||
166631536 | hcs1994 | B | Aug. 1, 2022, 11:18 p.m. | OK | GNU C++14 | TESTS | 13 | 46 | 819200 | ||
166646004 | yangyibufeng | B | Aug. 2, 2022, 3:50 a.m. | OK | GNU C++14 | TESTS | 13 | 46 | 1024000 | ||
166638980 | CYhuang | B | Aug. 2, 2022, 2:01 a.m. | OK | GNU C++14 | TESTS | 13 | 46 | 1024000 | ||
166651951 | Survivor_winner | B | Aug. 2, 2022, 5:23 a.m. | OK | GNU C++14 | TESTS | 13 | 46 | 1024000 | ||
166640083 | KWanLinggLin | B | Aug. 2, 2022, 2:18 a.m. | OK | GNU C++14 | TESTS | 13 | 46 | 1638400 | ||
166607116 | VinayakaB | B | Aug. 1, 2022, 5:32 p.m. | OK | GNU C++14 | TESTS | 7 | 46 | 1638400 | ||
166598512 | Cvam27 | B | Aug. 1, 2022, 4:49 p.m. | OK | GNU C++14 | TESTS | 5 | 46 | 1638400 | ||
166652704 | vector114514 | B | Aug. 2, 2022, 5:34 a.m. | OK | GNU C++14 | TESTS | 13 | 46 | 1638400 | ||
166651327 | KickAss | B | Aug. 2, 2022, 5:14 a.m. | OK | GNU C++14 | TESTS | 13 | 46 | 1843200 | ||
166643906 | kleincoder | B | Aug. 2, 2022, 3:17 a.m. | OK | GNU C++14 | TESTS | 13 | 46 | 2150400 | ||
166623603 | proof_by_ac | B | Aug. 1, 2022, 8:27 p.m. | OK | GNU C++17 | TESTS | 13 | 46 | 819200 | ||
166621417 | orcando | B | Aug. 1, 2022, 7:56 p.m. | OK | GNU C++17 | TESTS | 7 | 46 | 819200 | ||
166605447 | naowalr | B | Aug. 1, 2022, 5:20 p.m. | OK | GNU C++17 | TESTS | 7 | 46 | 819200 | ||
166641765 | XswPP | B | Aug. 2, 2022, 2:44 a.m. | OK | GNU C++17 | TESTS | 13 | 46 | 819200 | ||
166640232 | phanhuykhang | B | Aug. 2, 2022, 2:20 a.m. | OK | GNU C++17 | TESTS | 13 | 46 | 921600 | ||
166611829 | NegaTeeF | B | Aug. 1, 2022, 6:11 p.m. | OK | GNU C++17 | TESTS | 7 | 46 | 1024000 | ||
166628138 | jcccc | B | Aug. 1, 2022, 9:51 p.m. | OK | GNU C++17 | TESTS | 13 | 46 | 1638400 | ||
166624320 | Saraemad | B | Aug. 1, 2022, 8:38 p.m. | OK | GNU C++17 | TESTS | 13 | 46 | 1638400 | ||
166622833 | latanshuvarshney | B | Aug. 1, 2022, 8:17 p.m. | OK | GNU C++17 | TESTS | 13 | 46 | 1638400 | ||
166654763 | fengxingzhui | B | Aug. 2, 2022, 6:01 a.m. | OK | GNU C++17 | TESTS | 13 | 46 | 1638400 | ||
166604390 | Apelpul | B | Aug. 1, 2022, 5:13 p.m. | OK | GNU C++17 (64) | TESTS | 5 | 30 | 1638400 | ||
166618996 | enslaved | B | Aug. 1, 2022, 7:26 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 31 | 819200 | ||
166612913 | infiniteloop97 | B | Aug. 1, 2022, 6:21 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 31 | 819200 | ||
166647114 | TrendBattles | B | Aug. 2, 2022, 4:09 a.m. | OK | GNU C++17 (64) | TESTS | 13 | 31 | 1024000 | ||
166602096 | XHYU61 | B | Aug. 1, 2022, 5:01 p.m. | OK | GNU C++17 (64) | TESTS | 5 | 31 | 1638400 | ||
166613654 | HP_BenLadeN | B | Aug. 1, 2022, 6:28 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 31 | 3174400 | ||
166649228 | pavankalyanpallapolu | B | Aug. 2, 2022, 4:44 a.m. | OK | GNU C++17 (64) | TESTS | 13 | 46 | 1638400 | ||
166646502 | Siesta. | B | Aug. 2, 2022, 3:58 a.m. | OK | GNU C++17 (64) | TESTS | 13 | 46 | 1638400 | ||
166617178 | Beevo | B | Aug. 1, 2022, 7:06 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 46 | 1638400 | ||
166619017 | third_try | B | Aug. 1, 2022, 7:27 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 46 | 3174400 | ||
166603558 | Proofy | B | Aug. 1, 2022, 5:08 p.m. | OK | GNU C++20 (64) | TESTS | 5 | 15 | 819200 | ||
166602294 | NourEldinAhmed | B | Aug. 1, 2022, 5:02 p.m. | OK | GNU C++20 (64) | TESTS | 5 | 30 | 1638400 | ||
166610186 | Timur | B | Aug. 1, 2022, 5:57 p.m. | OK | GNU C++20 (64) | TESTS | 7 | 31 | 819200 | ||
166603294 | p.ferrari | B | Aug. 1, 2022, 5:07 p.m. | OK | GNU C++20 (64) | TESTS | 5 | 31 | 819200 | ||
166605076 | SpadeA261 | B | Aug. 1, 2022, 5:17 p.m. | OK | GNU C++20 (64) | TESTS | 7 | 31 | 1024000 | ||
166639832 | Shirci | B | Aug. 2, 2022, 2:14 a.m. | OK | GNU C++20 (64) | TESTS | 13 | 31 | 1638400 | ||
166641480 | rakshith21mohan | B | Aug. 2, 2022, 2:39 a.m. | OK | GNU C++20 (64) | TESTS | 13 | 31 | 1638400 | ||
166638983 | chiking | B | Aug. 2, 2022, 2:01 a.m. | OK | GNU C++20 (64) | TESTS | 13 | 31 | 1638400 | ||
166636467 | 0822 | B | Aug. 2, 2022, 1:21 a.m. | OK | GNU C++20 (64) | TESTS | 13 | 31 | 1638400 | ||
166633651 | my_god | B | Aug. 2, 2022, 12:21 a.m. | OK | GNU C++20 (64) | TESTS | 13 | 31 | 1638400 | ||
166616345 | deepaksach | B | Aug. 1, 2022, 6:56 p.m. | OK | Java 11 | TESTS | 7 | 233 | 12697600 | ||
166605890 | MrBruh420 | B | Aug. 1, 2022, 5:23 p.m. | OK | Java 11 | TESTS | 7 | 249 | 7577600 | ||
166629765 | nis1234 | B | Aug. 1, 2022, 10:29 p.m. | OK | Java 11 | TESTS | 13 | 249 | 12185600 | ||
166634415 | profchi | B | Aug. 2, 2022, 12:38 a.m. | OK | Java 11 | TESTS | 13 | 265 | 7577600 | ||
166620974 | Sikander_2000 | B | Aug. 1, 2022, 7:50 p.m. | OK | Java 11 | TESTS | 7 | 265 | 16793600 | ||
166611515 | Saurabh-Sharma | B | Aug. 1, 2022, 6:08 p.m. | OK | Java 11 | TESTS | 7 | 265 | 16896000 | ||
166628110 | as9274 | B | Aug. 1, 2022, 9:50 p.m. | OK | Java 11 | TESTS | 13 | 280 | 7577600 | ||
166602011 | BucketOfNubbins | B | Aug. 1, 2022, 5 p.m. | OK | Java 11 | TESTS | 5 | 280 | 15564800 | ||
166620420 | anand_a3b | B | Aug. 1, 2022, 7:43 p.m. | OK | Java 11 | TESTS | 7 | 280 | 16793600 | ||
166608026 | mcrash12 | B | Aug. 1, 2022, 5:39 p.m. | OK | Java 11 | TESTS | 7 | 280 | 20889600 | ||
166626315 | pili | B | Aug. 1, 2022, 9:13 p.m. | OK | Java 17 | TESTS | 13 | 202 | 4403200 | ||
166609531 | burning_summer | B | Aug. 1, 2022, 5:51 p.m. | OK | Java 17 | TESTS | 7 | 264 | 16281600 | ||
166618875 | soumit915 | B | Aug. 1, 2022, 7:25 p.m. | OK | Java 17 | TESTS | 7 | 265 | 17203200 | ||
166604976 | yogesh1415 | B | Aug. 1, 2022, 5:16 p.m. | OK | Java 17 | TESTS | 7 | 327 | 18227200 | ||
166615881 | eggag32 | B | Aug. 1, 2022, 6:51 p.m. | OK | Java 17 | TESTS | 7 | 436 | 819200 | ||
166617668 | Nihan | B | Aug. 1, 2022, 7:11 p.m. | OK | Java 17 | TESTS | 7 | 451 | 1126400 | ||
166621827 | why-you-should-Know | B | Aug. 1, 2022, 8:02 p.m. | OK | Java 17 | TESTS | 13 | 467 | 1024000 | ||
166613706 | pritamaichp317 | B | Aug. 1, 2022, 6:28 p.m. | OK | Java 17 | TESTS | 7 | 483 | 16384000 | ||
166612319 | pritamaichp317 | B | Aug. 1, 2022, 6:16 p.m. | OK | Java 17 | TESTS | 7 | 529 | 17817600 | ||
166601184 | Unreeve | B | Aug. 1, 2022, 4:57 p.m. | OK | Java 17 | TESTS | 5 | 655 | 23859200 | ||
166618570 | jkslyk | B | Aug. 1, 2022, 7:22 p.m. | OK | Java 8 | TESTS | 7 | 186 | 11161600 | ||
166608793 | Kaldaruly | B | Aug. 1, 2022, 5:45 p.m. | OK | Java 8 | TESTS | 7 | 186 | 11161600 | ||
166600302 | vaibhavgawad | B | Aug. 1, 2022, 4:53 p.m. | OK | Java 8 | TESTS | 5 | 186 | 11161600 | ||
166601315 | swaggy_baba | B | Aug. 1, 2022, 4:57 p.m. | OK | Java 8 | TESTS | 5 | 186 | 13721600 | ||
166605742 | OmarKenawi | B | Aug. 1, 2022, 5:21 p.m. | OK | Java 8 | TESTS | 7 | 187 | 11776000 | ||
166602582 | rish1896 | B | Aug. 1, 2022, 5:03 p.m. | OK | Java 8 | TESTS | 5 | 202 | 11161600 | ||
166634393 | muhammad_mehedi_hasan | B | Aug. 2, 2022, 12:37 a.m. | OK | Java 8 | TESTS | 13 | 343 | 0 | ||
166607330 | muhammad_mehedi_hasan | B | Aug. 1, 2022, 5:33 p.m. | OK | Java 8 | TESTS | 7 | 358 | 1126400 | ||
166649097 | shikhar_bij | B | Aug. 2, 2022, 4:42 a.m. | OK | Java 8 | TESTS | 13 | 373 | 5120000 | ||
166617818 | subhankar.majumdar.752 | B | Aug. 1, 2022, 7:13 p.m. | OK | Java 8 | TESTS | 7 | 373 | 11264000 | ||
166633811 | vv005 | B | Aug. 2, 2022, 12:25 a.m. | OK | Kotlin 1.4 | TESTS | 13 | 218 | 12390400 | ||
166613308 | hadin204 | B | Aug. 1, 2022, 6:25 p.m. | OK | MS C++ 2017 | TESTS | 7 | 140 | 1945600 | ||
166625142 | Crimson_Quasar | B | Aug. 1, 2022, 8:52 p.m. | OK | MS C++ 2017 | TESTS | 13 | 202 | 1126400 | ||
166616533 | Tan2K | B | Aug. 1, 2022, 6:58 p.m. | OK | MS C++ 2017 | TESTS | 7 | 202 | 7372800 | ||
166617535 | Charvi_17 | B | Aug. 1, 2022, 7:10 p.m. | OK | MS C++ 2017 | TESTS | 7 | 234 | 9728000 | ||
166624667 | adesh123 | B | Aug. 1, 2022, 8:44 p.m. | OK | MS C++ 2017 | TESTS | 13 | 249 | 7270400 | ||
166611504 | Oleja123 | B | Aug. 1, 2022, 6:08 p.m. | OK | MS C++ 2017 | TESTS | 7 | 249 | 7577600 | ||
166641851 | pursuita | B | Aug. 2, 2022, 2:45 a.m. | OK | MS C++ 2017 | TESTS | 13 | 327 | 1638400 | ||
166640369 | rttyuii | B | Aug. 2, 2022, 2:22 a.m. | OK | MS C++ 2017 | TESTS | 13 | 358 | 1638400 | ||
166621469 | hxu10 | B | Aug. 1, 2022, 7:57 p.m. | OK | PyPy 3 | TESTS | 7 | 155 | 18432000 | ||
166643794 | LarryNY | B | Aug. 2, 2022, 3:15 a.m. | OK | PyPy 3 | TESTS | 13 | 218 | 18022400 | ||
166653006 | abineth | B | Aug. 2, 2022, 5:38 a.m. | OK | PyPy 3 | TESTS | 13 | 218 | 18227200 | ||
166603952 | divk705 | B | Aug. 1, 2022, 5:11 p.m. | OK | PyPy 3 | TESTS | 5 | 327 | 22220800 | ||
166602106 | Homeo | B | Aug. 1, 2022, 5:01 p.m. | OK | PyPy 3 | TESTS | 5 | 358 | 20582400 | ||
166649889 | Srilekha3 | B | Aug. 2, 2022, 4:54 a.m. | OK | PyPy 3 | TESTS | 13 | 358 | 21913600 | ||
166626553 | SIGCHLD | B | Aug. 1, 2022, 9:17 p.m. | OK | PyPy 3 | TESTS | 13 | 404 | 16998400 | ||
166617089 | RAZE_TEAM | B | Aug. 1, 2022, 7:05 p.m. | OK | PyPy 3 | TESTS | 7 | 421 | 23040000 | ||
166608590 | esllam | B | Aug. 1, 2022, 5:44 p.m. | OK | PyPy 3-64 | TESTS | 7 | 108 | 26214400 | ||
166611460 | Varad2002 | B | Aug. 1, 2022, 6:08 p.m. | OK | PyPy 3-64 | TESTS | 7 | 109 | 26316800 | ||
166638314 | Youarenotgood | B | Aug. 2, 2022, 1:50 a.m. | OK | PyPy 3-64 | TESTS | 13 | 124 | 21811200 | ||
166651667 | HannibalLectar | B | Aug. 2, 2022, 5:19 a.m. | OK | PyPy 3-64 | TESTS | 13 | 140 | 27852800 | ||
166651514 | sheknows | B | Aug. 2, 2022, 5:17 a.m. | OK | PyPy 3-64 | TESTS | 13 | 140 | 29491200 | ||
166622950 | dunkin_shepherd | B | Aug. 1, 2022, 8:18 p.m. | OK | PyPy 3-64 | TESTS | 13 | 156 | 28672000 | ||
166600256 | _N_0_0_B_ | B | Aug. 1, 2022, 4:53 p.m. | OK | PyPy 3-64 | TESTS | 5 | 156 | 32460800 | ||
166614958 | Ayushman_123 | B | Aug. 1, 2022, 6:41 p.m. | OK | PyPy 3-64 | TESTS | 7 | 202 | 29491200 | ||
166652427 | OGgyR | B | Aug. 2, 2022, 5:30 a.m. | OK | PyPy 3-64 | TESTS | 13 | 218 | 42496000 | ||
166652352 | OGgyR | B | Aug. 2, 2022, 5:29 a.m. | OK | PyPy 3-64 | TESTS | 13 | 233 | 40243200 | ||
166601683 | gustavoo | B | Aug. 1, 2022, 4:59 p.m. | OK | Python 3 | TESTS | 5 | 139 | 14028800 | ||
166600838 | pruthvi717 | B | Aug. 1, 2022, 4:55 p.m. | OK | Python 3 | TESTS | 5 | 140 | 14028800 | ||
166628497 | Hunt40 | B | Aug. 1, 2022, 9:59 p.m. | OK | Python 3 | TESTS | 13 | 155 | 13516800 | ||
166602062 | AryanSehgal29 | B | Aug. 1, 2022, 5:01 p.m. | OK | Python 3 | TESTS | 5 | 155 | 13926400 | ||
166651480 | sheknows | B | Aug. 2, 2022, 5:16 a.m. | OK | Python 3 | TESTS | 13 | 156 | 14540800 | ||
166604022 | shayonop | B | Aug. 1, 2022, 5:11 p.m. | OK | Python 3 | TESTS | 5 | 170 | 17920000 | ||
166602715 | Rishita0 | B | Aug. 1, 2022, 5:04 p.m. | OK | Python 3 | TESTS | 5 | 171 | 13414400 | ||
166604339 | A_Lazar_A | B | Aug. 1, 2022, 5:13 p.m. | OK | Python 3 | TESTS | 5 | 171 | 13516800 | ||
166600217 | quangnhan2006 | B | Aug. 1, 2022, 4:53 p.m. | OK | Python 3 | TESTS | 5 | 171 | 14028800 | ||
166615279 | shivamch | B | Aug. 1, 2022, 6:44 p.m. | OK | Python 3 | TESTS | 7 | 186 | 13516800 | ||
166600842 | jakobrs | B | Aug. 1, 2022, 4:55 p.m. | OK | Rust 2021 | TESTS | 5 | 30 | 9830400 | ||
166600389 | kobae964 | B | Aug. 1, 2022, 4:53 p.m. | OK | Rust 2021 | TESTS | 5 | 46 | 6758400 | ||
166634619 | Hawawshy | B | Aug. 2, 2022, 12:43 a.m. | OK | Rust 2021 | TESTS | 13 | 109 | 9523200 | ||
166648026 | cycleke | B | Aug. 2, 2022, 4:24 a.m. | OK | Rust 2021 | TESTS | 13 | 124 | 5939200 |
Back to search problems