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 |
|---|---|---|---|---|---|---|
| 2201 | Codeforces Round 1082 (Div. 1) | FINISHED | False | 9000 | 4548323 | Feb. 23, 2026, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 744 ) | D | Binary Not Search and Queries | PROGRAMMING | data structures greedy implementation |
For a sequence (b) consisting of (m) integers, the set (S(b)) is defined as the set of tuples ((i,j,k)) that satisfy the following conditions: (i), (j), (k) are integers; (1 \le k \lt m); (1 \le i \lt j \le m-k+1); For every element (v) in (b), (v) appears the same number of times in (b_i,b_{i+1},\ldots,b_{i+k-1}) and (b_j,b_{j+1},\ldots,b_{j+k-1}). For example, when (b=1,2,1,2), the tuple ((1,3,2)) is an element of (S(b)) because (1) and (2) both appear once in (b_1,b_2) and (b_3,b_4). Additionally, we define two functions over sequences of positive integers: (k_\max(b)) is defined as the maximum value of (k) over all elements ((i,j,k)) of (S(b)); (f(b)) is defined as the number of different elements ((i,j,k)) of (S(b)) such that (k=k_\max(b)). Exceptionally , when the set (S(b)) is empty , they are defined as (k_\max(b)=0) and (f(b)=0). You are given a sequence (a) of (n) integers. Please answer (q) queries of the following kind: (i\;x): Change the value of (a_i) to (x). Then, find the values of (k_\max(a)) and (f(a)). Do note that the updates are persistent. In other words, the update from one query affects the later queries as well. Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 10^4)). The description of the test cases follows. The first line of each test case contains two integers (n) and (q) ((2 \le n \le 200\,000), (1 \le q \le 100\,000)). The second line of each test case contains (n) integers (a_1,a_2,\ldots,a_n) ((1 \le a_i \le n)). Each of the following (q) lines contains two integers (i_j) and (x_j) denoting the (j)-th query ((1 \le i_j,x_j \le n)). It is guaranteed that the sum of (n) over all test cases does not exceed (200\,000). It is guaranteed that |
| Codeforces Round 1082 (Div. 1, Div. 2) Complete Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 364106575 | Lawali | D | Feb. 23, 2026, 5:45 p.m. | OK | C++17 (GCC 7-32) | TESTS | 23 | 390 | 19353600 | ||
| 364087149 | Revived_xryjr233 | D | Feb. 23, 2026, 4:13 p.m. | OK | C++17 (GCC 7-32) | TESTS | 23 | 453 | 19046400 | ||
| 364120805 | clarinha | D | Feb. 23, 2026, 8:01 p.m. | OK | C++17 (GCC 7-32) | TESTS | 23 | 453 | 31027200 | ||
| 364100432 | sjtu-wya2007 | D | Feb. 23, 2026, 4:55 p.m. | OK | C++17 (GCC 7-32) | TESTS | 23 | 468 | 377241600 | ||
| 364078753 | 08kevin | D | Feb. 23, 2026, 3:52 p.m. | OK | C++17 (GCC 7-32) | TESTS | 23 | 484 | 19353600 | ||
| 364089827 | AntiBsayer | D | Feb. 23, 2026, 4:21 p.m. | OK | C++17 (GCC 7-32) | TESTS | 23 | 484 | 20172800 | ||
| 364077333 | HugeWide | D | Feb. 23, 2026, 3:48 p.m. | OK | C++17 (GCC 7-32) | TESTS | 23 | 484 | 34201600 | ||
| 364084297 | LiFar | D | Feb. 23, 2026, 4:06 p.m. | OK | C++17 (GCC 7-32) | TESTS | 23 | 500 | 33075200 | ||
| 364067476 | potato167 | D | Feb. 23, 2026, 3:28 p.m. | OK | C++17 (GCC 7-32) | TESTS | 23 | 500 | 37888000 | ||
| 364092263 | middle_man | D | Feb. 23, 2026, 4:28 p.m. | OK | C++17 (GCC 7-32) | TESTS | 23 | 500 | 74956800 | ||
| 364147743 | wenqizhi | D | Feb. 24, 2026, 4:03 a.m. | OK | C++20 (GCC 13-64) | TESTS | 23 | 328 | 33075200 | ||
| 364143567 | hakuuuuya | D | Feb. 24, 2026, 2:46 a.m. | OK | C++20 (GCC 13-64) | TESTS | 23 | 328 | 33075200 | ||
| 364095362 | SeptaCube | D | Feb. 23, 2026, 4:38 p.m. | OK | C++20 (GCC 13-64) | TESTS | 23 | 343 | 33792000 | ||
| 364083053 | CleinCc | D | Feb. 23, 2026, 4:02 p.m. | OK | C++20 (GCC 13-64) | TESTS | 23 | 343 | 37888000 | ||
| 364074344 | Rafi22 | D | Feb. 23, 2026, 3:42 p.m. | OK | C++20 (GCC 13-64) | TESTS | 23 | 343 | 38912000 | ||
| 364089711 | yangchang | D | Feb. 23, 2026, 4:21 p.m. | OK | C++20 (GCC 13-64) | TESTS | 23 | 359 | 32665600 | ||
| 364100223 | risujiroh | D | Feb. 23, 2026, 4:54 p.m. | OK | C++20 (GCC 13-64) | TESTS | 23 | 359 | 34406400 | ||
| 364069743 | _wrz_ | D | Feb. 23, 2026, 3:32 p.m. | OK | C++20 (GCC 13-64) | TESTS | 23 | 359 | 34508800 | ||
| 364093506 | turneja | D | Feb. 23, 2026, 4:32 p.m. | OK | C++20 (GCC 13-64) | TESTS | 23 | 359 | 37068800 | ||
| 364134506 | wabca | D | Feb. 23, 2026, 10:59 p.m. | OK | C++20 (GCC 13-64) | TESTS | 23 | 359 | 49049600 | ||
| 364062650 | ecnerwala | D | Feb. 23, 2026, 3:18 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 23 | 312 | 26726400 | ||
| 364112619 | VanshRA | D | Feb. 23, 2026, 6:34 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 23 | 312 | 29696000 | ||
| 364077727 | Sirantic | D | Feb. 23, 2026, 3:49 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 23 | 328 | 37068800 | ||
| 364068496 | maroonrk | D | Feb. 23, 2026, 3:30 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 23 | 328 | 40550400 | ||
| 364091870 | iforandom | D | Feb. 23, 2026, 4:27 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 23 | 328 | 47104000 | ||
| 364089568 | machine_solution | D | Feb. 23, 2026, 4:20 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 23 | 343 | 51609600 | ||
| 364088050 | Zhou_Hang | D | Feb. 23, 2026, 4:16 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 23 | 375 | 34099200 | ||
| 364088418 | Boboge | D | Feb. 23, 2026, 4:17 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 23 | 375 | 36761600 | ||
| 364089111 | phsads | D | Feb. 23, 2026, 4:19 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 23 | 375 | 38912000 | ||
| 364096803 | qusol | D | Feb. 23, 2026, 4:43 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 23 | 375 | 40448000 | ||
| 364106758 | iakovlev.zakhar | D | Feb. 23, 2026, 5:46 p.m. | OK | Java 8 | TESTS | 23 | 1218 | 77107200 | ||
| 364081057 | Tlatoani | D | Feb. 23, 2026, 3:57 p.m. | OK | Kotlin 2.2 | TESTS | 23 | 1562 | 118067200 | ||
| 364083969 | Darknef | D | Feb. 23, 2026, 4:05 p.m. | OK | Rust 2024 | TESTS | 23 | 296 | 55603200 | ||
| 364099602 | Mon_ster | D | Feb. 23, 2026, 4:52 p.m. | OK | Rust 2024 | TESTS | 23 | 328 | 56934400 | ||
| 364091202 | DanielAnker | D | Feb. 23, 2026, 4:25 p.m. | OK | Rust 2024 | TESTS | 23 | 375 | 58675200 |
Back to search problems