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 |
---|---|---|---|---|---|---|
1816 | Codeforces Round 865 (Div. 2) | FINISHED | False | 8100 | 56214863 | April 9, 2023, 2:45 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 15594 ) | B | Grid Reconstruction | PROGRAMMING | constructive algorithms greedy | 1000 |
B'Consider a 2 x n grid, where n is an even integer. You may place the integers 1, 2, ldots, 2n on the grid, using each integer exactly once. A path is a sequence of cells achieved by starting at (1, 1) , then repeatedly walking either downwards or to the right, and stopping when (2, n) is reached. The path should not extend beyond the grid. The cost of a path is the alternating sum of the numbers written on the cells in a path. That is, let the numbers written on the cells be a_1, a_2, ldots, a_k (in the order that it is visited), the cost of the path is a_1 - a_2 + a_3 - a_4 + ldots = sum_{i=1}^k a_i cdot (-1)^{i+1} . Construct a way to place the integers 1, 2, ldots, 2n on the grid, such that the minimum cost over all paths from (1, 1) to (2, n) is maximized. If there are multiple such grids that result in the maximum value, output any of them. The first line contains a single integer t ( 1 <= q t <= q 1000 ) -- the number of test cases. The description of test cases follows. The first and the only line of each test case contains a single integer n ( 2 <= q n <= q 10^5 , n is even) -- the number of the columns in the grid. It is guaranteed that the sum of n over all test cases does not exceed 10^5 . For each test case, output 2 lines, each containing n integers -- the desired grid. If there are multiple solutions, output any of them. In the first test case, there are only two paths from cell (1, 1) to cell (2, 2) . Their costs are 3-1+4=6 and 3-2+4=5 . Then the minimum cost is 5 , which is the maximum possible value. In the second test case, there are four paths from cell (1, 1) to cell (2, 4) . Their costs are 8-1+5-3+7=16 , 8-2+5-3+7=15 , 8-2+6-3+7=16 , and 8-2+6-4+7=15 . Then the minimum value is 15 , which is the maximum possible value. '... |
Editorial of Codeforces Round #865 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
201617521 | Dicode | B | April 10, 2023, 5:41 a.m. | OK | Clang++20 Diagnostics | TESTS | 14 | 623 | 819200 | 1000 | |
201576463 | ruban | B | April 9, 2023, 6:55 p.m. | OK | FPC | TESTS | 14 | 576 | 64921600 | 1000 | |
201555439 | Abhishek2022 | B | April 9, 2023, 4:41 p.m. | OK | GNU C++14 | TESTS | 14 | 31 | 0 | 1000 | |
201615487 | sunumbrella | B | April 10, 2023, 5:12 a.m. | OK | GNU C++14 | TESTS | 14 | 46 | 0 | 1000 | |
201613827 | Nahida__ | B | April 10, 2023, 4:49 a.m. | OK | GNU C++14 | TESTS | 14 | 46 | 0 | 1000 | |
201613749 | EdGrass | B | April 10, 2023, 4:48 a.m. | OK | GNU C++14 | TESTS | 14 | 46 | 0 | 1000 | |
201602782 | Alumin1um | B | April 10, 2023, 1:34 a.m. | OK | GNU C++14 | TESTS | 14 | 46 | 0 | 1000 | |
201601683 | Prakashhumain1212 | B | April 10, 2023, 1:10 a.m. | OK | GNU C++14 | TESTS | 14 | 46 | 0 | 1000 | |
201600163 | ashraf_022 | B | April 10, 2023, 12:39 a.m. | OK | GNU C++14 | TESTS | 14 | 46 | 0 | 1000 | |
201601150 | ModularBread | B | April 10, 2023, 12:59 a.m. | OK | GNU C++14 | TESTS | 14 | 46 | 0 | 1000 | |
201618828 | jaiprashanth7 | B | April 10, 2023, 5:58 a.m. | OK | GNU C++14 | TESTS | 14 | 46 | 0 | 1000 | |
201618615 | xiaozhi369 | B | April 10, 2023, 5:55 a.m. | OK | GNU C++14 | TESTS | 14 | 46 | 0 | 1000 | |
201565907 | guptamadhav2210 | B | April 9, 2023, 5:38 p.m. | OK | GNU C++17 | TESTS | 14 | 31 | 0 | 1000 | |
201616931 | Jimmyokok | B | April 10, 2023, 5:32 a.m. | OK | GNU C++17 | TESTS | 14 | 31 | 0 | 1000 | |
201601669 | hibye1217 | B | April 10, 2023, 1:10 a.m. | OK | GNU C++17 | TESTS | 14 | 31 | 0 | 1000 | |
201563128 | pele_3010 | B | April 9, 2023, 4:59 p.m. | OK | GNU C++17 | TESTS | 14 | 31 | 0 | 1000 | |
201561493 | 00_nULL_brAin | B | April 9, 2023, 4:56 p.m. | OK | GNU C++17 | TESTS | 14 | 31 | 819200 | 1000 | |
201583538 | Aluminatix | B | April 9, 2023, 8:10 p.m. | OK | GNU C++17 | TESTS | 14 | 31 | 819200 | 1000 | |
201578404 | iitp_rakesh | B | April 9, 2023, 7:14 p.m. | OK | GNU C++17 | TESTS | 14 | 31 | 819200 | 1000 | |
201574788 | abdelrahman_samir | B | April 9, 2023, 6:39 p.m. | OK | GNU C++17 | TESTS | 14 | 31 | 819200 | 1000 | |
201567576 | Suhail_Ali | B | April 9, 2023, 5:45 p.m. | OK | GNU C++17 | TESTS | 14 | 31 | 819200 | 1000 | |
201558451 | rakshitaryan4 | B | April 9, 2023, 4:49 p.m. | OK | GNU C++17 | TESTS | 14 | 31 | 819200 | 1000 | |
201573415 | pritish_001 | B | April 9, 2023, 6:27 p.m. | OK | GNU C++17 (64) | TESTS | 14 | 31 | 819200 | 1000 | |
201587097 | shubhamgrg1000 | B | April 9, 2023, 8:49 p.m. | OK | GNU C++17 (64) | TESTS | 14 | 31 | 819200 | 1000 | |
201572626 | meghanath852 | B | April 9, 2023, 6:20 p.m. | OK | GNU C++17 (64) | TESTS | 14 | 31 | 1228800 | 1000 | |
201571860 | mateusvrs | B | April 9, 2023, 6:14 p.m. | OK | GNU C++17 (64) | TESTS | 14 | 31 | 1228800 | 1000 | |
201553951 | srishti_7 | B | April 9, 2023, 4:37 p.m. | OK | GNU C++17 (64) | TESTS | 14 | 31 | 1433600 | 1000 | |
201566554 | ThunderXGod | B | April 9, 2023, 5:40 p.m. | OK | GNU C++17 (64) | TESTS | 14 | 31 | 1638400 | 1000 | |
201617730 | enslaved | B | April 10, 2023, 5:44 a.m. | OK | GNU C++17 (64) | TESTS | 14 | 31 | 1638400 | 1000 | |
201614254 | Am_my11 | B | April 10, 2023, 4:56 a.m. | OK | GNU C++17 (64) | TESTS | 14 | 31 | 1638400 | 1000 | |
201588171 | tanmayArora14 | B | April 9, 2023, 9:01 p.m. | OK | GNU C++17 (64) | TESTS | 14 | 31 | 2457600 | 1000 | |
201576890 | mePranav | B | April 9, 2023, 6:59 p.m. | OK | GNU C++17 (64) | TESTS | 14 | 31 | 2457600 | 1000 | |
201574899 | Rajiun_nabi | B | April 9, 2023, 6:40 p.m. | OK | GNU C++20 (64) | TESTS | 14 | 15 | 819200 | 1000 | |
201599139 | Ycy0fmine | B | April 10, 2023, 12:18 a.m. | OK | GNU C++20 (64) | TESTS | 14 | 15 | 819200 | 1000 | |
201567047 | s_jaskaran_s | B | April 9, 2023, 5:42 p.m. | OK | GNU C++20 (64) | TESTS | 14 | 15 | 819200 | 1000 | |
201568052 | why_me1 | B | April 9, 2023, 5:47 p.m. | OK | GNU C++20 (64) | TESTS | 14 | 15 | 1638400 | 1000 | |
201574121 | jora__war | B | April 9, 2023, 6:33 p.m. | OK | GNU C++20 (64) | TESTS | 14 | 15 | 1638400 | 1000 | |
201571869 | coder.ak | B | April 9, 2023, 6:14 p.m. | OK | GNU C++20 (64) | TESTS | 14 | 15 | 1638400 | 1000 | |
201571771 | AKesss | B | April 9, 2023, 6:13 p.m. | OK | GNU C++20 (64) | TESTS | 14 | 15 | 1638400 | 1000 | |
201553268 | Omarfarhan | B | April 9, 2023, 4:36 p.m. | OK | GNU C++20 (64) | TESTS | 14 | 15 | 1638400 | 1000 | |
201609000 | Od_Ali | B | April 10, 2023, 3:33 a.m. | OK | GNU C++20 (64) | TESTS | 14 | 15 | 2355200 | 1000 | |
201574896 | Wasi_Ur | B | April 9, 2023, 6:40 p.m. | OK | GNU C++20 (64) | TESTS | 14 | 15 | 3481600 | 1000 | |
201581612 | codingIsFun1234 | B | April 9, 2023, 7:48 p.m. | OK | Java 11 | TESTS | 14 | 217 | 0 | 1000 | |
201589352 | ETHANHUNTMI5 | B | April 9, 2023, 9:16 p.m. | OK | Java 11 | TESTS | 14 | 234 | 0 | 1000 | |
201592260 | kamranm | B | April 9, 2023, 9:59 p.m. | OK | Java 11 | TESTS | 14 | 249 | 119500800 | 1000 | |
201557537 | DivyG | B | April 9, 2023, 4:46 p.m. | OK | Java 11 | TESTS | 14 | 327 | 0 | 1000 | |
201616065 | dauletomarov1130 | B | April 10, 2023, 5:19 a.m. | OK | Java 11 | TESTS | 14 | 857 | 0 | 1000 | |
201563429 | rishabhsehgal_ep20a6_01 | B | April 9, 2023, 4:59 p.m. | OK | Java 11 | TESTS | 14 | 873 | 0 | 1000 | |
201556554 | vgnoob | B | April 9, 2023, 4:44 p.m. | OK | Java 11 | TESTS | 14 | 935 | 0 | 1000 | |
201581299 | ilasiawo | B | April 9, 2023, 7:45 p.m. | OK | Java 11 | TESTS | 14 | 951 | 0 | 1000 | |
201555886 | PlayDate | B | April 9, 2023, 4:42 p.m. | OK | Java 11 | TESTS | 14 | 951 | 307200 | 1000 | |
201611949 | Danger_Don | B | April 10, 2023, 4:20 a.m. | OK | Java 17 | TESTS | 14 | 249 | 512000 | 1000 | |
201557518 | koolkartik | B | April 9, 2023, 4:46 p.m. | OK | Java 17 | TESTS | 14 | 280 | 409600 | 1000 | |
201554436 | Mahesh_6174 | B | April 9, 2023, 4:38 p.m. | OK | Java 17 | TESTS | 14 | 280 | 41984000 | 1000 | |
201559939 | princesuman2211 | B | April 9, 2023, 4:53 p.m. | OK | Java 17 | TESTS | 14 | 296 | 614400 | 1000 | |
201555831 | daksh_02 | B | April 9, 2023, 4:42 p.m. | OK | Java 17 | TESTS | 14 | 311 | 614400 | 1000 | |
201568897 | saras_11 | B | April 9, 2023, 5:52 p.m. | OK | Java 17 | TESTS | 14 | 592 | 921600 | 1000 | |
201581590 | Nagendravarma | B | April 9, 2023, 7:48 p.m. | OK | Java 17 | TESTS | 14 | 858 | 716800 | 1000 | |
201554120 | Pavan8010 | B | April 9, 2023, 4:38 p.m. | OK | Java 17 | TESTS | 14 | 904 | 19558400 | 1000 | |
201572791 | SugoiTurtle | B | April 9, 2023, 6:22 p.m. | OK | Java 17 | TESTS | 14 | 919 | 716800 | 1000 | |
201560086 | xretsam | B | April 9, 2023, 4:53 p.m. | OK | Java 17 | TESTS | 14 | 935 | 716800 | 1000 | |
201616485 | vkukretiwork | B | April 10, 2023, 5:26 a.m. | OK | Java 8 | TESTS | 14 | 139 | 0 | 1000 | |
201589021 | SweetAsCocaine | B | April 9, 2023, 9:12 p.m. | OK | Java 8 | TESTS | 14 | 140 | 0 | 1000 | |
201616360 | vkukretiwork | B | April 10, 2023, 5:24 a.m. | OK | Java 8 | TESTS | 14 | 155 | 0 | 1000 | |
201579646 | Juhaied_nabid | B | April 9, 2023, 7:27 p.m. | OK | Java 8 | TESTS | 14 | 155 | 0 | 1000 | |
201616926 | gautam_st | B | April 10, 2023, 5:32 a.m. | OK | Java 8 | TESTS | 14 | 764 | 0 | 1000 | |
201613514 | chuquwan9964 | B | April 10, 2023, 4:45 a.m. | OK | Java 8 | TESTS | 14 | 795 | 0 | 1000 | |
201559071 | monk_eye_looking | B | April 9, 2023, 4:50 p.m. | OK | Java 8 | TESTS | 14 | 842 | 0 | 1000 | |
201607932 | wly666... | B | April 10, 2023, 3:14 a.m. | OK | MS C++ 2017 | TESTS | 14 | 124 | 409600 | 1000 | |
201559780 | incuiio | B | April 9, 2023, 4:52 p.m. | OK | MS C++ 2017 | TESTS | 14 | 156 | 1024000 | 1000 | |
201559093 | EbuYandex | B | April 9, 2023, 4:50 p.m. | OK | MS C++ 2017 | TESTS | 14 | 171 | 1638400 | 1000 | |
201566318 | rsFalse | B | April 9, 2023, 5:39 p.m. | OK | Perl | TESTS | 14 | 171 | 21811200 | 1000 | |
201603996 | jinzew | B | April 10, 2023, 2:01 a.m. | OK | PyPy 3 | TESTS | 14 | 140 | 11776000 | 1000 | |
201566736 | rajeshpenugonda | B | April 9, 2023, 5:41 p.m. | OK | PyPy 3 | TESTS | 14 | 202 | 14233600 | 1000 | |
201561918 | Sigma_V | B | April 9, 2023, 4:57 p.m. | OK | PyPy 3 | TESTS | 14 | 265 | 10956800 | 1000 | |
201558751 | append._code | B | April 9, 2023, 4:50 p.m. | OK | PyPy 3 | TESTS | 14 | 326 | 10240000 | 1000 | |
201575862 | SoleProprietor | B | April 9, 2023, 6:49 p.m. | OK | PyPy 3-64 | TESTS | 14 | 77 | 7884800 | 1000 | |
201576043 | rmr | B | April 9, 2023, 6:51 p.m. | OK | PyPy 3-64 | TESTS | 14 | 77 | 8806400 | 1000 | |
201575950 | rmr | B | April 9, 2023, 6:50 p.m. | OK | PyPy 3-64 | TESTS | 14 | 93 | 9625600 | 1000 | |
201571536 | isekun | B | April 9, 2023, 6:11 p.m. | OK | PyPy 3-64 | TESTS | 14 | 108 | 15052800 | 1000 | |
201610225 | abhipandey9315 | B | April 10, 2023, 3:53 a.m. | OK | PyPy 3-64 | TESTS | 14 | 109 | 13516800 | 1000 | |
201617286 | Yansou | B | April 10, 2023, 5:38 a.m. | OK | PyPy 3-64 | TESTS | 14 | 109 | 13721600 | 1000 | |
201571072 | Peacalm | B | April 9, 2023, 6:08 p.m. | OK | PyPy 3-64 | TESTS | 14 | 109 | 14540800 | 1000 | |
201570433 | bronze_coder | B | April 9, 2023, 6:03 p.m. | OK | PyPy 3-64 | TESTS | 14 | 124 | 12902400 | 1000 | |
201604995 | Vishnu_Actual | B | April 10, 2023, 2:22 a.m. | OK | PyPy 3-64 | TESTS | 14 | 124 | 13516800 | 1000 | |
201556037 | ayush190 | B | April 9, 2023, 4:43 p.m. | OK | PyPy 3-64 | TESTS | 14 | 124 | 13516800 | 1000 | |
201560203 | 2000032233_Trivikram | B | April 9, 2023, 4:53 p.m. | OK | Python 3 | TESTS | 14 | 156 | 8908800 | 1000 | |
201553877 | HAKI2 | B | April 9, 2023, 4:37 p.m. | OK | Python 3 | TESTS | 14 | 171 | 8294400 | 1000 | |
201555995 | Adarsh_N | B | April 9, 2023, 4:42 p.m. | OK | Python 3 | TESTS | 14 | 171 | 9420800 | 1000 | |
201610783 | the_pyhulk | B | April 10, 2023, 4:02 a.m. | OK | Python 3 | TESTS | 14 | 202 | 4198400 | 1000 | |
201574204 | BabyBlue0514 | B | April 9, 2023, 6:34 p.m. | OK | Python 3 | TESTS | 14 | 295 | 0 | 1000 | |
201616312 | duongdau | B | April 10, 2023, 5:23 a.m. | OK | Python 3 | TESTS | 14 | 296 | 5734400 | 1000 | |
201589894 | Jocca | B | April 9, 2023, 9:24 p.m. | OK | Python 3 | TESTS | 14 | 296 | 6246400 | 1000 | |
201577665 | Goldeneye534 | B | April 9, 2023, 7:07 p.m. | OK | Python 3 | TESTS | 14 | 311 | 0 | 1000 | |
201573209 | greyhat113 | B | April 9, 2023, 6:25 p.m. | OK | Python 3 | TESTS | 14 | 311 | 0 | 1000 | |
201609390 | momenelmesady4803 | B | April 10, 2023, 3:39 a.m. | OK | Python 3 | TESTS | 14 | 311 | 6246400 | 1000 | |
201617370 | manchik | B | April 10, 2023, 5:39 a.m. | OK | Rust 2021 | TESTS | 14 | 31 | 0 | 1000 |
Back to search problems