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 |
|---|---|---|---|---|---|---|
| 2152 | Squarepoint Challenge (Codeforces Round 1055, Div. 1 + Div. 2) | FINISHED | False | 10800 | 16903523 | Oct. 3, 2025, 2:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 2757 ) | E | Monotone Subsequence | PROGRAMMING | brute force constructive algorithms dp graphs interactive math |
This is an interactive problem. Faker is being naughty again. You asked him to create a nice query problem, but he created an interactive problem where he is answering a query instead! Faker hid a permutation from you, and you have to infer some interesting information by interacting with him. You are given an integer (n). Faker hid a hidden permutation(^{\text{∗}}) (p_1, p_2, \ldots, p_{n^2+1}) of length (n^2+1). Your goal is to find a monotone subsequence (either increasing or decreasing) of the hidden permutation, with length exactly (n+1). It can be proved that every permutation of length (n^2 + 1) contains a monotone subsequence of length (n+1). For more information about the proof, you can check out this Wikipedia page . To find it, you can make at most (n) skyscraper queries to the interactor, which is defined as follows: You provide a set of (k) indices as a strictly increasing sequence: (i_1, i_2, \ldots, i_k). The interactor considers the values of the hidden permutation at these indices: (p_{i_1}, p_{i_2}, \ldots, p_{i_k}). The interactor then returns the indices corresponding to the visible skyscrapers from this set. An index (i_j) is visible if its value (p_{i_j}) is greater than the values of all preceding elements in your query, i.e., (p_{i_j} > p_{i_m}) for all (1 \le m < j). This is equivalent to finding the indices of the left-to-right maxima of the sequence ((p_{i_1}, \ldots, p_{i_k})). After making at most (n) queries, you must report a valid monotone subsequence of length exactly (n+1). Note that the permutation (p) is fixed before any queries are made and does not depend on the queries. (^{\text{∗}})A permutation of length (m) is an array consisting of (m) distinct integers from (1) to (m) in arbitrary order. For example, (2,3,1,5,4) is a permutation, but (1,2,2) is not a permutation ((2) appears twice in the array), and $$$ |
| Squarepoint Challenge (Codeforces Round 1055, Div. 1 + Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 341771996 | wujijlc | E | Oct. 4, 2025, 2:27 a.m. | OK | C++17 (GCC 7-32) | TESTS | 34 | 171 | 0 | ||
| 341745686 | zyb_txdy | E | Oct. 3, 2025, 6:47 p.m. | OK | C++17 (GCC 7-32) | TESTS | 34 | 171 | 102400 | ||
| 341760177 | Mystery2000 | E | Oct. 3, 2025, 9:37 p.m. | OK | C++17 (GCC 7-32) | TESTS | 34 | 186 | 0 | ||
| 341727362 | Kalaiyarasu_T | E | Oct. 3, 2025, 5:01 p.m. | OK | C++17 (GCC 7-32) | TESTS | 34 | 186 | 102400 | ||
| 341729236 | Micro_Sun | E | Oct. 3, 2025, 5:07 p.m. | OK | C++17 (GCC 7-32) | TESTS | 34 | 186 | 307200 | ||
| 341721883 | _FAUST_ | E | Oct. 3, 2025, 4:45 p.m. | OK | C++17 (GCC 7-32) | TESTS | 34 | 186 | 307200 | ||
| 341734872 | derug_ | E | Oct. 3, 2025, 5:25 p.m. | OK | C++17 (GCC 7-32) | TESTS | 34 | 187 | 102400 | ||
| 341734030 | Kavin-105 | E | Oct. 3, 2025, 5:22 p.m. | OK | C++17 (GCC 7-32) | TESTS | 34 | 187 | 102400 | ||
| 341731570 | kaviya_106 | E | Oct. 3, 2025, 5:15 p.m. | OK | C++17 (GCC 7-32) | TESTS | 34 | 187 | 102400 | ||
| 341729892 | Gokila014 | E | Oct. 3, 2025, 5:09 p.m. | OK | C++17 (GCC 7-32) | TESTS | 34 | 187 | 102400 | ||
| 341735517 | adityapadhi233 | E | Oct. 3, 2025, 5:27 p.m. | OK | C++20 (GCC 13-64) | TESTS | 34 | 139 | 0 | ||
| 341734906 | ahmedalaa22 | E | Oct. 3, 2025, 5:25 p.m. | OK | C++20 (GCC 13-64) | TESTS | 34 | 140 | 0 | ||
| 341729662 | CHATTY-Bebob | E | Oct. 3, 2025, 5:09 p.m. | OK | C++20 (GCC 13-64) | TESTS | 34 | 140 | 102400 | ||
| 341745869 | Salah7_a | E | Oct. 3, 2025, 6:48 p.m. | OK | C++20 (GCC 13-64) | TESTS | 34 | 155 | 0 | ||
| 341734977 | VitalyKo | E | Oct. 3, 2025, 5:25 p.m. | OK | C++20 (GCC 13-64) | TESTS | 34 | 156 | 0 | ||
| 341735139 | CYhuang | E | Oct. 3, 2025, 5:26 p.m. | OK | C++20 (GCC 13-64) | TESTS | 34 | 156 | 10547200 | ||
| 341725733 | pikaka | E | Oct. 3, 2025, 4:56 p.m. | OK | C++20 (GCC 13-64) | TESTS | 34 | 171 | 0 | ||
| 341742955 | 77z77 | E | Oct. 3, 2025, 6:29 p.m. | OK | C++20 (GCC 13-64) | TESTS | 34 | 171 | 102400 | ||
| 341735263 | dingdong | E | Oct. 3, 2025, 5:26 p.m. | OK | C++20 (GCC 13-64) | TESTS | 34 | 171 | 102400 | ||
| 341746086 | ctdd | E | Oct. 3, 2025, 6:50 p.m. | OK | C++20 (GCC 13-64) | TESTS | 34 | 171 | 409600 | ||
| 341745836 | 1egend | E | Oct. 3, 2025, 6:48 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 34 | 140 | 102400 | ||
| 341730756 | beny_kh | E | Oct. 3, 2025, 5:12 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 34 | 140 | 409600 | ||
| 341735694 | jiangn | E | Oct. 3, 2025, 5:27 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 34 | 155 | 0 | ||
| 341734470 | etherinmatic | E | Oct. 3, 2025, 5:24 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 34 | 155 | 102400 | ||
| 341735926 | Ksenobait | E | Oct. 3, 2025, 5:28 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 34 | 156 | 0 | ||
| 341735299 | TeletubiGaim33 | E | Oct. 3, 2025, 5:26 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 34 | 156 | 0 | ||
| 341735457 | ckuhn222theend | E | Oct. 3, 2025, 5:27 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 34 | 156 | 102400 | ||
| 341733694 | CoderAbhi27 | E | Oct. 3, 2025, 5:21 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 34 | 156 | 102400 | ||
| 341730994 | Aboalkasim | E | Oct. 3, 2025, 5:13 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 34 | 171 | 0 | ||
| 341723605 | ks-iitjmu | E | Oct. 3, 2025, 4:50 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 34 | 171 | 0 | ||
| 341726633 | wenbozh | E | Oct. 3, 2025, 4:59 p.m. | OK | Java 21 | TESTS | 34 | 499 | 819200 | ||
| 341755319 | vineetiwari | E | Oct. 3, 2025, 8:24 p.m. | OK | Java 21 | TESTS | 34 | 499 | 1331200 | ||
| 341734242 | Animesh1008 | E | Oct. 3, 2025, 5:23 p.m. | OK | Java 21 | TESTS | 34 | 530 | 2662400 | ||
| 341786954 | NpHardcore_05 | E | Oct. 4, 2025, 5:39 a.m. | OK | Java 21 | TESTS | 34 | 546 | 1945600 | ||
| 341744198 | Ab_hoga_real_Cumback | E | Oct. 3, 2025, 6:36 p.m. | OK | Java 21 | TESTS | 34 | 577 | 2355200 | ||
| 341743494 | Samyajit125 | E | Oct. 3, 2025, 6:32 p.m. | OK | Java 21 | TESTS | 34 | 578 | 1638400 | ||
| 341735928 | MagentaCobra | E | Oct. 3, 2025, 5:28 p.m. | OK | Java 8 | TESTS | 34 | 312 | 0 | ||
| 341727636 | knhatdev | E | Oct. 3, 2025, 5:02 p.m. | OK | Kotlin 2.2 | TESTS | 34 | 1875 | 0 | ||
| 341731690 | P_Bansal | E | Oct. 3, 2025, 5:15 p.m. | OK | Node.js | TESTS | 34 | 733 | 9728000 | ||
| 341727891 | cuongdev2711 | E | Oct. 3, 2025, 5:03 p.m. | OK | Perl | TESTS | 34 | 953 | 1228800 | ||
| 341758472 | diss_quack | E | Oct. 3, 2025, 9:06 p.m. | OK | PyPy 3-64 | TESTS | 34 | 327 | 9318400 | ||
| 341761355 | czjnbb | E | Oct. 3, 2025, 10:03 p.m. | OK | PyPy 3-64 | TESTS | 34 | 328 | 10035200 | ||
| 341725691 | Pie854 | E | Oct. 3, 2025, 4:56 p.m. | OK | PyPy 3-64 | TESTS | 34 | 343 | 9625600 | ||
| 341732472 | yxu18yxu18 | E | Oct. 3, 2025, 5:17 p.m. | OK | PyPy 3-64 | TESTS | 34 | 343 | 10854400 | ||
| 341737911 | CalculusDecimusMeridius | E | Oct. 3, 2025, 5:33 p.m. | OK | PyPy 3-64 | TESTS | 34 | 359 | 21401600 | ||
| 341733348 | eepsilon | E | Oct. 3, 2025, 5:20 p.m. | OK | PyPy 3-64 | TESTS | 34 | 374 | 9830400 | ||
| 341744948 | alexwice | E | Oct. 3, 2025, 6:41 p.m. | OK | PyPy 3-64 | TESTS | 34 | 389 | 9625600 | ||
| 341758430 | diss_quack | E | Oct. 3, 2025, 9:06 p.m. | OK | PyPy 3-64 | TESTS | 34 | 390 | 9216000 | ||
| 341726348 | ThatOnePythonUser | E | Oct. 3, 2025, 4:58 p.m. | OK | PyPy 3-64 | TESTS | 34 | 390 | 9728000 | ||
| 341729551 | titia | E | Oct. 3, 2025, 5:08 p.m. | OK | PyPy 3-64 | TESTS | 34 | 390 | 9830400 | ||
| 341721485 | Kaiju_Numer_8 | E | Oct. 3, 2025, 4:44 p.m. | OK | Python 3 | TESTS | 34 | 343 | 3174400 | ||
| 341725267 | hbjp_2007 | E | Oct. 3, 2025, 4:55 p.m. | OK | Python 3 | TESTS | 34 | 718 | 3686400 | ||
| 341733697 | doramon2005 | E | Oct. 3, 2025, 5:21 p.m. | OK | Python 3 | TESTS | 34 | 796 | 3788800 | ||
| 341742833 | KidusHawoltu | E | Oct. 3, 2025, 6:29 p.m. | OK | Python 3 | TESTS | 34 | 1078 | 163020800 | ||
| 341728408 | hieusiu | E | Oct. 3, 2025, 5:04 p.m. | OK | Ruby 3 | TESTS | 34 | 671 | 1843200 | ||
| 341752131 | Ming_Xu | E | Oct. 3, 2025, 7:48 p.m. | OK | Rust 2024 | TESTS | 34 | 249 | 24166400 | ||
| 341766595 | null_lambda | E | Oct. 4, 2025, 12:44 a.m. | OK | Rust 2024 | TESTS | 34 | 250 | 0 | ||
| 341752183 | Ming_Xu | E | Oct. 3, 2025, 7:49 p.m. | OK | Rust 2024 | TESTS | 34 | 265 | 24268800 |
Back to search problems