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 |
---|---|---|---|---|---|---|
1969 | Educational Codeforces Round 165 (Rated for Div. 2) | FINISHED | False | 7200 | 22778663 | April 29, 2024, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1478 ) | E | Unique Array | PROGRAMMING | binary search data structures divide and conquer dp greedy | 2400 |
B"You are given an integer array a of length n . A subarray of a is one of its contiguous subsequences (i. xe2 x80 x89e. an array [a_l, a_{l+1}, ... , a_r] for some integers l and r such that 1 <= l < r <= n ). Let's call a subarray unique if there is an integer that occurs exactly once in the subarray. You can perform the following operation any number of times (possibly zero): choose an element of the array and replace it with any integer. Your task is to calculate the minimum number of aforementioned operation in order for all the subarrays of the array a to be unique. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The first line of each test case contains a single integer n ( 1 <= n <= 3 cdot 10^5 ). The second line contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= n ). Additional constraint on the input: the sum of n over all test cases doesn't exceed 3 cdot 10^5 . For each test case, print a single integer -- the minimum number of aforementioned operation in order for all the subarrays of the array a to be unique. In the second test case, you can replace the 1 -st and the 3 -rd element, for example, like this: [3, 4, 1, 4] . In the third test case, you can replace the 4 -th element, for example, like this: [3, 1, 2, 3, 2] . "... |
Educational Codeforces Round 165 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
260506695 | g1ove | E | May 11, 2024, 7:52 a.m. | OK | C++14 (GCC 6-32) | TESTS | 36 | 374 | 12083200 | 2400 | |
260608999 | OctoberEstuary | E | May 12, 2024, 4:58 a.m. | OK | C++14 (GCC 6-32) | TESTS | 36 | 390 | 22835200 | 2400 | |
260791334 | lxeason | E | May 13, 2024, 11:58 a.m. | OK | C++14 (GCC 6-32) | TESTS | 36 | 405 | 27955200 | 2400 | |
261003299 | luogu_bot2 | E | May 15, 2024, 4:51 a.m. | OK | C++14 (GCC 6-32) | TESTS | 36 | 406 | 24064000 | 2400 | |
260603793 | luogu_bot4 | E | May 12, 2024, 3:47 a.m. | OK | C++14 (GCC 6-32) | TESTS | 36 | 406 | 46899200 | 2400 | |
261337517 | c1120241919 | E | May 17, 2024, 1:39 p.m. | OK | C++14 (GCC 6-32) | TESTS | 36 | 421 | 13209600 | 2400 | |
263694517 | beginner1010 | E | June 2, 2024, 3:15 a.m. | OK | C++14 (GCC 6-32) | TESTS | 36 | 421 | 21708800 | 2400 | |
260079559 | luogu_bot2 | E | May 9, 2024, 6:29 a.m. | OK | C++14 (GCC 6-32) | TESTS | 36 | 421 | 22835200 | 2400 | |
260864449 | vinaka_prime | E | May 14, 2024, 12:54 a.m. | OK | C++14 (GCC 6-32) | TESTS | 36 | 437 | 18227200 | 2400 | |
262020615 | include_c | E | May 21, 2024, 12:59 p.m. | OK | C++14 (GCC 6-32) | TESTS | 36 | 468 | 13209600 | 2400 | |
260844554 | __koala__ | E | May 13, 2024, 6:33 p.m. | OK | C++17 (GCC 7-32) | TESTS | 36 | 187 | 10752000 | 2400 | |
260091710 | wwlw | E | May 9, 2024, 8:26 a.m. | OK | C++17 (GCC 7-32) | TESTS | 36 | 265 | 12083200 | 2400 | |
262489517 | vjudge.3 | E | May 25, 2024, 9:34 a.m. | OK | C++17 (GCC 7-32) | TESTS | 36 | 265 | 14438400 | 2400 | |
262489471 | BeYourSven | E | May 25, 2024, 9:34 a.m. | OK | C++17 (GCC 7-32) | TESTS | 36 | 311 | 14438400 | 2400 | |
262112239 | MyLittle_Su | E | May 22, 2024, 8:19 a.m. | OK | C++17 (GCC 7-32) | TESTS | 36 | 343 | 9625600 | 2400 | |
260179963 | maqi_maqi | E | May 9, 2024, 9:30 p.m. | OK | C++17 (GCC 7-32) | TESTS | 36 | 343 | 32153600 | 2400 | |
260362103 | Emma194 | E | May 10, 2024, 3:37 p.m. | OK | C++17 (GCC 7-32) | TESTS | 36 | 358 | 27648000 | 2400 | |
261116572 | Mona_4715 | E | May 16, 2024, 2:10 a.m. | OK | C++17 (GCC 7-32) | TESTS | 36 | 359 | 7270400 | 2400 | |
262218242 | Raisen_zhx | E | May 23, 2024, 6:45 a.m. | OK | C++17 (GCC 7-32) | TESTS | 36 | 359 | 13209600 | 2400 | |
260902702 | December456 | E | May 14, 2024, 9:15 a.m. | OK | C++17 (GCC 7-32) | TESTS | 36 | 359 | 13209600 | 2400 | |
260020987 | lujjinalhaj2003 | E | May 8, 2024, 3:41 p.m. | OK | C++20 (GCC 13-64) | TESTS | 36 | 109 | 7270400 | 2400 | |
260020753 | lujjinalhaj2003 | E | May 8, 2024, 3:38 p.m. | OK | C++20 (GCC 13-64) | TESTS | 36 | 124 | 7270400 | 2400 | |
260721208 | canine | E | May 13, 2024, 12:01 a.m. | OK | C++20 (GCC 13-64) | TESTS | 36 | 156 | 14848000 | 2400 | |
263185734 | IVO_12 | E | May 29, 2024, 9:16 p.m. | OK | C++20 (GCC 13-64) | TESTS | 36 | 218 | 14745600 | 2400 | |
262697290 | rxlfd314 | E | May 26, 2024, 11:38 a.m. | OK | C++20 (GCC 13-64) | TESTS | 36 | 233 | 13824000 | 2400 | |
260729689 | gaga999 | E | May 13, 2024, 3:32 a.m. | OK | C++20 (GCC 13-64) | TESTS | 36 | 234 | 13312000 | 2400 | |
262271332 | UltramanDecker | E | May 23, 2024, 2:16 p.m. | OK | C++20 (GCC 13-64) | TESTS | 36 | 249 | 9830400 | 2400 | |
261190505 | shift. | E | May 16, 2024, 11:57 a.m. | OK | C++20 (GCC 13-64) | TESTS | 36 | 265 | 9625600 | 2400 | |
260926277 | 45645A | E | May 14, 2024, 12:33 p.m. | OK | C++20 (GCC 13-64) | TESTS | 36 | 281 | 13209600 | 2400 | |
261329034 | _Sherbiny | E | May 17, 2024, 12:32 p.m. | OK | C++20 (GCC 13-64) | TESTS | 36 | 296 | 7168000 | 2400 | |
259997270 | timiss | E | May 8, 2024, 12:23 p.m. | OK | GNU C11 | TESTS | 36 | 155 | 12083200 | 2400 | |
259880555 | sleepntsheep | E | May 7, 2024, 1:18 p.m. | OK | GNU C11 | TESTS | 36 | 749 | 27545600 | 2400 | |
259880622 | bkifhr8 | E | May 7, 2024, 1:19 p.m. | OK | GNU C11 | TESTS | 36 | 842 | 27545600 | 2400 | |
261955238 | nguyenquocthao00 | E | May 21, 2024, 3:12 a.m. | OK | Go | TESTS | 36 | 77 | 16588800 | 2400 | |
261955908 | nguyenquocthao00 | E | May 21, 2024, 3:21 a.m. | OK | Go | TESTS | 36 | 108 | 16588800 | 2400 | |
260951667 | cc4414 | E | May 14, 2024, 3:57 p.m. | OK | Java 21 | TESTS | 36 | 733 | 12595200 | 2400 | |
260436508 | golions | E | May 10, 2024, 5:51 p.m. | OK | Java 8 | TESTS | 36 | 1358 | 92262400 | 2400 | |
260436193 | golions | E | May 10, 2024, 5:49 p.m. | OK | Java 8 | TESTS | 36 | 1359 | 128512000 | 2400 | |
261543366 | SoleProprietor | E | May 18, 2024, 2:32 p.m. | OK | PyPy 3-64 | TESTS | 36 | 1234 | 49049600 | 2400 | |
260731115 | pennymagic156 | E | May 13, 2024, 3:57 a.m. | OK | PyPy 3-64 | TESTS | 36 | 1436 | 74956800 | 2400 | |
261111726 | Synaptic_Savant | E | May 16, 2024, 12:15 a.m. | OK | PyPy 3-64 | TESTS | 36 | 1624 | 163328000 | 2400 | |
263190604 | camc | E | May 29, 2024, 11:22 p.m. | OK | Rust 2021 | TESTS | 36 | 452 | 25702400 | 2400 |
Back to search problems