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 |
|---|---|---|---|---|---|---|
| 2031 | Codeforces Round 987 (Div. 2) | FINISHED | False | 7200 | 44731523 | Nov. 15, 2024, 12:35 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 449 ) | F | Penchick and Even Medians | PROGRAMMING | binary search constructive algorithms interactive |
This is an interactive problem. Returning from a restful vacation on Australia's Gold Coast, Penchick forgot to bring home gifts for his pet duck Duong Canh! But perhaps a beautiful problem crafted through deep thought on the scenic beaches could be the perfect souvenir. There is a hidden permutation(^{\text{∗}}) (p) of length (n), where (n) is even. You are allowed to make the following query: Choose a subsequence(^{\text{†}}) of the permutation (p) with even length (4\le k\le n). The interactor will return the value of the two medians(^{\text{‡}}) in the chosen subsequence. Find the index of the two medians in permutation (p) using at most (80) queries. Note that the interactor is non-adaptive . This means that the permutation (p) is fixed at the beginning and will not change based on your queries. (^{\text{∗}})A permutation of length (n) is an array consisting of (n) distinct integers from (1) to (n) 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 (1,3,4) is also not a permutation ((n=3) but there is (4) in the array). (^{\text{†}})A sequence (a) is a subsequence of a sequence (b) if (a) can be obtained from (b) by the deletion of several (possibly, zero or all) element from arbitrary positions. (^{\text{‡}})The two medians of an array (a) with even length (k) are defined as the (\frac{k}{2})-th and (\left(\frac{k}{2} + 1\right))-th smallest element in the array ((1)-indexed). Each test contains multiple test cases. The first line contains the number of test cases (t) ((1 \le t \le 1000)). The description of the test cases follows. The only line of each test case contains a single integer (n) ((6 \le n \le 100), (n) is even) — the length of the hidden permutation (p). For each test case, after reading the inte |
| Codeforces Round 987 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 291735282 | pengyantong | F | Nov. 16, 2024, 4:14 a.m. | OK | C++17 (GCC 7-32) | TESTS | 48 | 109 | 102400 | ||
| 291722202 | bro_jie | F | Nov. 16, 2024, 12:58 a.m. | OK | C++17 (GCC 7-32) | TESTS | 48 | 140 | 102400 | ||
| 291732334 | Peppa____Pig | F | Nov. 16, 2024, 3:34 a.m. | OK | C++17 (GCC 7-32) | TESTS | 48 | 156 | 4096000 | ||
| 291665797 | Kilani | F | Nov. 15, 2024, 3:57 p.m. | OK | C++17 (GCC 7-32) | TESTS | 48 | 156 | 4096000 | ||
| 291730246 | hahawang | F | Nov. 16, 2024, 3:06 a.m. | OK | C++17 (GCC 7-32) | TESTS | 48 | 171 | 102400 | ||
| 291686302 | Chenly | F | Nov. 15, 2024, 5:47 p.m. | OK | C++17 (GCC 7-32) | TESTS | 48 | 171 | 102400 | ||
| 291673288 | 244mhq | F | Nov. 15, 2024, 4:35 p.m. | OK | C++17 (GCC 7-32) | TESTS | 48 | 171 | 102400 | ||
| 291682295 | Mier_ | F | Nov. 15, 2024, 5:25 p.m. | OK | C++17 (GCC 7-32) | TESTS | 48 | 171 | 3276800 | ||
| 291708179 | kartavyain2006 | F | Nov. 15, 2024, 8:38 p.m. | OK | C++17 (GCC 7-32) | TESTS | 48 | 186 | 102400 | ||
| 291689440 | qwsin | F | Nov. 15, 2024, 6:03 p.m. | OK | C++17 (GCC 7-32) | TESTS | 48 | 186 | 102400 | ||
| 291723683 | white_paperdog | F | Nov. 16, 2024, 1:15 a.m. | OK | C++20 (GCC 13-64) | TESTS | 48 | 109 | 4096000 | ||
| 291725954 | 2018LZY | F | Nov. 16, 2024, 1:57 a.m. | OK | C++20 (GCC 13-64) | TESTS | 48 | 124 | 0 | ||
| 291725900 | 2018liuzhiyuan | F | Nov. 16, 2024, 1:56 a.m. | OK | C++20 (GCC 13-64) | TESTS | 48 | 124 | 0 | ||
| 291729624 | kimoyami | F | Nov. 16, 2024, 2:57 a.m. | OK | C++20 (GCC 13-64) | TESTS | 48 | 124 | 102400 | ||
| 291724603 | 0x0002 | F | Nov. 16, 2024, 1:33 a.m. | OK | C++20 (GCC 13-64) | TESTS | 48 | 124 | 102400 | ||
| 291709607 | Michael533 | F | Nov. 15, 2024, 8:54 p.m. | OK | C++20 (GCC 13-64) | TESTS | 48 | 124 | 102400 | ||
| 291703581 | mychecksdead | F | Nov. 15, 2024, 7:52 p.m. | OK | C++20 (GCC 13-64) | TESTS | 48 | 124 | 102400 | ||
| 291662493 | ShanMaitzzzz | F | Nov. 15, 2024, 3:42 p.m. | OK | C++20 (GCC 13-64) | TESTS | 48 | 124 | 102400 | ||
| 291744572 | gdf_yhm | F | Nov. 16, 2024, 5:59 a.m. | OK | C++20 (GCC 13-64) | TESTS | 48 | 124 | 3276800 | ||
| 291708034 | egge | F | Nov. 15, 2024, 8:37 p.m. | OK | C++20 (GCC 13-64) | TESTS | 48 | 139 | 102400 | ||
| 291735380 | tzl_Dedicatus545 | F | Nov. 16, 2024, 4:15 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 48 | 124 | 102400 | ||
| 291734710 | binminh01 | F | Nov. 16, 2024, 4:06 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 48 | 124 | 102400 | ||
| 291723454 | Pashechka | F | Nov. 16, 2024, 1:10 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 48 | 124 | 102400 | ||
| 291669317 | Pemguimn | F | Nov. 15, 2024, 4:16 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 48 | 124 | 102400 | ||
| 291663551 | Wael_Zaiback | F | Nov. 15, 2024, 3:46 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 48 | 124 | 102400 | ||
| 291723757 | Pashechka | F | Nov. 16, 2024, 1:16 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 48 | 140 | 102400 | ||
| 291723398 | Qzong | F | Nov. 16, 2024, 1:09 a.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 48 | 155 | 102400 | ||
| 291683949 | tosivanmak | F | Nov. 15, 2024, 5:35 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 48 | 155 | 102400 | ||
| 291655678 | Farhod | F | Nov. 15, 2024, 2:32 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 48 | 155 | 512000 | ||
| 291688782 | Iceberg | F | Nov. 15, 2024, 6 p.m. | OK | C++23 (GCC 14-64, msys2) | TESTS | 48 | 171 | 102400 | ||
| 291731634 | golions | F | Nov. 16, 2024, 3:25 a.m. | OK | Java 8 | TESTS | 48 | 749 | 102400 | ||
| 291665706 | VitalyKo | F | Nov. 15, 2024, 3:56 p.m. | OK | PyPy 3 | TESTS | 48 | 812 | 10444800 | ||
| 291712327 | Jrke | F | Nov. 15, 2024, 9:28 p.m. | OK | PyPy 3-64 | TESTS | 48 | 468 | 7475200 | ||
| 291718975 | xxx.ego | F | Nov. 15, 2024, 11:29 p.m. | OK | PyPy 3-64 | TESTS | 48 | 530 | 9318400 |
Back to search problems