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 |
---|---|---|---|---|---|---|
1831 | Codeforces Round 875 (Div. 2) | FINISHED | False | 9000 | 51981863 | May 28, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 28841 ) | A | Twin Permutations | PROGRAMMING | constructive algorithms |
B'You are given a permutation ^ dagger a of length n . Find any permutation b of length n such that a_1+b_1 <= a_2+b_2 <= a_3+b_3 <= ldots <= a_n+b_n . It can be proven that a permutation b that satisfies the condition above always exists. ^ dagger 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). Each test contains multiple test cases. The first line of input contains a single integer t ( 1 <= t <= 2000 ) -- the number of test cases. The description of test cases follows. The first line of each test case contains a single integer n ( 1 <= n <= 100 ) -- the length of permutations a and b . The second line of each test case contains n distinct integers a_1,a_2, ldots,a_n ( 1 <= a_i <= n ) -- the elements of permutation a . All elements of a are distinct. Note that there is no bound on the sum of n over all test cases. For each test case, output any permutation b which satisfies the constraints mentioned in the statement. It can be proven that a permutation b that satisfies the condition above always exists. In the first test case a=[1, 2, 4, 5, 3] . Then the permutation b=[1, 2, 4, 3, 5] satisfies the condition because 1 + 1 <= 2 + 2 <= 4 + 4 <= 5 + 3 <= 3 + 5 . '... |
Codeforces Round #875 (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 |
---|---|---|---|---|---|---|---|---|---|---|---|
207694679 | bluemegane | A | May 29, 2023, 1:18 a.m. | OK | C# 8 | TESTS | 7 | 108 | 3174400 | ||
207694719 | guoguo... | A | May 29, 2023, 1:19 a.m. | OK | Clang++20 Diagnostics | TESTS | 7 | 124 | 0 | ||
207660380 | Gamer-OP | A | May 28, 2023, 4:47 p.m. | OK | GNU C11 | TESTS | 7 | 748 | 0 | ||
207660611 | Subham-Maurya | A | May 28, 2023, 4:47 p.m. | OK | GNU C11 | TESTS | 7 | 748 | 0 | ||
207661633 | WASIF_74 | A | May 28, 2023, 4:50 p.m. | OK | GNU C11 | TESTS | 7 | 764 | 0 | ||
207695809 | lream2 | A | May 29, 2023, 1:45 a.m. | OK | GNU C11 | TESTS | 7 | 764 | 0 | ||
207663283 | h_2000031740 | A | May 28, 2023, 4:54 p.m. | OK | GNU C11 | TESTS | 7 | 779 | 0 | ||
207679993 | mananchichra | A | May 28, 2023, 7:12 p.m. | OK | GNU C11 | TESTS | 7 | 780 | 0 | ||
207663612 | yash_ka | A | May 28, 2023, 4:55 p.m. | OK | GNU C11 | TESTS | 7 | 780 | 0 | ||
207680139 | nish_07 | A | May 28, 2023, 7:15 p.m. | OK | GNU C11 | TESTS | 7 | 795 | 0 | ||
207693418 | wahahayyds | A | May 29, 2023, 12:41 a.m. | OK | GNU C11 | TESTS | 7 | 795 | 0 | ||
207660931 | Sharif_Uddin | A | May 28, 2023, 4:48 p.m. | OK | GNU C11 | TESTS | 7 | 811 | 0 | ||
207697031 | Cujoh_Jolyne | A | May 29, 2023, 2:11 a.m. | OK | GNU C++14 | TESTS | 7 | 46 | 0 | ||
207715187 | M.A.D_17 | A | May 29, 2023, 5:27 a.m. | OK | GNU C++14 | TESTS | 7 | 46 | 0 | ||
207714880 | LiuYang1 | A | May 29, 2023, 5:23 a.m. | OK | GNU C++14 | TESTS | 7 | 46 | 0 | ||
207711095 | OMG_78 | A | May 29, 2023, 4:24 a.m. | OK | GNU C++14 | TESTS | 7 | 46 | 0 | ||
207708855 | Ds110 | A | May 29, 2023, 3:46 a.m. | OK | GNU C++14 | TESTS | 7 | 46 | 0 | ||
207697327 | NgVanMinh | A | May 29, 2023, 2:17 a.m. | OK | GNU C++14 | TESTS | 7 | 46 | 0 | ||
207693404 | 2018ljw | A | May 29, 2023, 12:41 a.m. | OK | GNU C++14 | TESTS | 7 | 46 | 0 | ||
207690605 | ahmedmekawyxa | A | May 28, 2023, 10:57 p.m. | OK | GNU C++14 | TESTS | 7 | 46 | 0 | ||
207681132 | prateek2172 | A | May 28, 2023, 7:28 p.m. | OK | GNU C++14 | TESTS | 7 | 46 | 0 | ||
207677302 | Shariar67 | A | May 28, 2023, 6:39 p.m. | OK | GNU C++14 | TESTS | 7 | 46 | 0 | ||
207682450 | ___HunTeR_ | A | May 28, 2023, 7:46 p.m. | OK | GNU C++17 | TESTS | 7 | 31 | 102400 | ||
207688791 | Haroka__ | A | May 28, 2023, 9:57 p.m. | OK | GNU C++17 | TESTS | 7 | 31 | 102400 | ||
207670226 | itz_saptarshi | A | May 28, 2023, 5:44 p.m. | OK | GNU C++17 | TESTS | 7 | 31 | 102400 | ||
207680441 | y.avinav | A | May 28, 2023, 7:18 p.m. | OK | GNU C++17 | TESTS | 7 | 31 | 204800 | ||
207698585 | KRISH_FOUSC | A | May 29, 2023, 2:40 a.m. | OK | GNU C++17 | TESTS | 7 | 31 | 1638400 | ||
207714501 | DR389 | A | May 29, 2023, 5:17 a.m. | OK | GNU C++17 | TESTS | 7 | 46 | 0 | ||
207714450 | x_DARK_ | A | May 29, 2023, 5:16 a.m. | OK | GNU C++17 | TESTS | 7 | 46 | 0 | ||
207716240 | chilen_qa_ga | A | May 29, 2023, 5:42 a.m. | OK | GNU C++17 | TESTS | 7 | 46 | 0 | ||
207713479 | raiwat_7 | A | May 29, 2023, 5:01 a.m. | OK | GNU C++17 | TESTS | 7 | 46 | 0 | ||
207716037 | stonecode | A | May 29, 2023, 5:39 a.m. | OK | GNU C++17 | TESTS | 7 | 46 | 0 | ||
207696831 | Susie.Rain | A | May 29, 2023, 2:07 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 30 | 102400 | ||
207671286 | Krzychuo | A | May 28, 2023, 5:50 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 30 | 819200 | ||
207707009 | guan0923 | A | May 29, 2023, 3:16 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 31 | 0 | ||
207698790 | AnthonyZ | A | May 29, 2023, 2:44 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 31 | 0 | ||
207697447 | kevinyang | A | May 29, 2023, 2:19 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 31 | 0 | ||
207696822 | KivenKill | A | May 29, 2023, 2:07 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 31 | 0 | ||
207688152 | MarcosK | A | May 28, 2023, 9:37 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 31 | 0 | ||
207683965 | Binary_Titanoboa | A | May 28, 2023, 8:11 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 31 | 0 | ||
207683943 | Abu_ALchayeD | A | May 28, 2023, 8:10 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 31 | 0 | ||
207710782 | DevinX | A | May 29, 2023, 4:19 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 31 | 0 | ||
207692816 | singhabhishek6 | A | May 29, 2023, 12:24 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 15 | 0 | ||
207707571 | yingluosanqian | A | May 29, 2023, 3:24 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 15 | 0 | ||
207670803 | Moham6d_Fathy | A | May 28, 2023, 5:47 p.m. | OK | GNU C++20 (64) | TESTS | 7 | 15 | 0 | ||
207670883 | -whoami | A | May 28, 2023, 5:48 p.m. | OK | GNU C++20 (64) | TESTS | 7 | 15 | 0 | ||
207672824 | EnterYourName | A | May 28, 2023, 6 p.m. | OK | GNU C++20 (64) | TESTS | 7 | 15 | 0 | ||
207675756 | striker_45 | A | May 28, 2023, 6:24 p.m. | OK | GNU C++20 (64) | TESTS | 7 | 15 | 102400 | ||
207677734 | Aryan200902 | A | May 28, 2023, 6:44 p.m. | OK | GNU C++20 (64) | TESTS | 7 | 15 | 102400 | ||
207690470 | abhay_adm | A | May 28, 2023, 10:51 p.m. | OK | GNU C++20 (64) | TESTS | 7 | 15 | 204800 | ||
207715483 | gko1089 | A | May 29, 2023, 5:31 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 30 | 0 | ||
207712031 | guojiasheng | A | May 29, 2023, 4:40 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 30 | 0 | ||
207675506 | Nikscorp | A | May 28, 2023, 6:22 p.m. | OK | Go | TESTS | 7 | 15 | 4915200 | ||
207715305 | kimpro | A | May 29, 2023, 5:29 a.m. | OK | Java 11 | TESTS | 7 | 187 | 0 | ||
207690053 | InfinitePath | A | May 28, 2023, 10:37 p.m. | OK | Java 11 | TESTS | 7 | 217 | 0 | ||
207692189 | tonyn10 | A | May 29, 2023, 12:01 a.m. | OK | Java 11 | TESTS | 7 | 234 | 0 | ||
207684549 | biu_biu_biu | A | May 28, 2023, 8:20 p.m. | OK | Java 11 | TESTS | 7 | 389 | 0 | ||
207716805 | adarshssoni | A | May 29, 2023, 5:49 a.m. | OK | Java 11 | TESTS | 7 | 405 | 0 | ||
207672398 | April2021 | A | May 28, 2023, 5:57 p.m. | OK | Java 11 | TESTS | 7 | 982 | 0 | ||
207693609 | mansoorsyedcodes | A | May 29, 2023, 12:48 a.m. | OK | Java 11 | TESTS | 7 | 997 | 0 | ||
207677452 | MK68 | A | May 28, 2023, 6:41 p.m. | OK | Java 11 | TESTS | 7 | 998 | 0 | ||
207674592 | Vrutik_2809 | A | May 28, 2023, 6:14 p.m. | OK | Java 17 | TESTS | 7 | 233 | 102400 | ||
207674960 | SuprHUlk | A | May 28, 2023, 6:17 p.m. | OK | Java 17 | TESTS | 7 | 233 | 307200 | ||
207697600 | VIVEK_8877 | A | May 29, 2023, 2:22 a.m. | OK | Java 17 | TESTS | 7 | 280 | 819200 | ||
207681425 | Mostafa_Murad | A | May 28, 2023, 7:31 p.m. | OK | Java 17 | TESTS | 7 | 295 | 819200 | ||
207714352 | fightingxjz | A | May 29, 2023, 5:14 a.m. | OK | Java 17 | TESTS | 7 | 296 | 512000 | ||
207708217 | rmakash999 | A | May 29, 2023, 3:35 a.m. | OK | Java 17 | TESTS | 7 | 546 | 921600 | ||
207715118 | rishabhkumrawat02 | A | May 29, 2023, 5:26 a.m. | OK | Java 17 | TESTS | 7 | 810 | 614400 | ||
207680422 | AcornTahboub | A | May 28, 2023, 7:18 p.m. | OK | Java 17 | TESTS | 7 | 841 | 0 | ||
207676596 | AKhacks | A | May 28, 2023, 6:32 p.m. | OK | Java 17 | TESTS | 7 | 842 | 614400 | ||
207706918 | BrisS | A | May 29, 2023, 3:14 a.m. | OK | Java 17 | TESTS | 7 | 919 | 512000 | ||
207697747 | leonlian | A | May 29, 2023, 2:25 a.m. | OK | Java 8 | TESTS | 7 | 108 | 0 | ||
207688615 | NerfThis | A | May 28, 2023, 9:52 p.m. | OK | Java 8 | TESTS | 7 | 109 | 0 | ||
207707819 | chuquwan9964 | A | May 29, 2023, 3:28 a.m. | OK | Java 8 | TESTS | 7 | 124 | 0 | ||
207680745 | harsh_1806 | A | May 28, 2023, 7:23 p.m. | OK | Java 8 | TESTS | 7 | 124 | 0 | ||
207712237 | altynbek.nurgaziyev | A | May 29, 2023, 4:43 a.m. | OK | Java 8 | TESTS | 7 | 140 | 0 | ||
207692784 | ahmedhosny2002 | A | May 29, 2023, 12:23 a.m. | OK | Java 8 | TESTS | 7 | 140 | 0 | ||
207674075 | ahmedhosny2002 | A | May 28, 2023, 6:09 p.m. | OK | Java 8 | TESTS | 7 | 140 | 0 | ||
207695731 | vamsigv96 | A | May 29, 2023, 1:43 a.m. | OK | Java 8 | TESTS | 7 | 155 | 0 | ||
207675279 | Juhaied_nabid | A | May 28, 2023, 6:20 p.m. | OK | Java 8 | TESTS | 7 | 280 | 0 | ||
207671765 | bleach__ | A | May 28, 2023, 5:53 p.m. | OK | Java 8 | TESTS | 7 | 732 | 2150400 | ||
207685769 | 21jansel | A | May 28, 2023, 8:42 p.m. | OK | Kotlin 1.7 | TESTS | 7 | 592 | 54169600 | ||
207672316 | Zeyad.AnkhAmon99 | A | May 28, 2023, 5:56 p.m. | OK | MS C++ 2017 | TESTS | 7 | 234 | 0 | ||
207683490 | darkus-_- | A | May 28, 2023, 8:03 p.m. | OK | MS C++ 2017 | TESTS | 7 | 779 | 0 | ||
207660065 | gumbervarshit21 | A | May 28, 2023, 4:46 p.m. | OK | MS C++ 2017 | TESTS | 7 | 842 | 0 | ||
207688676 | andy0liang | A | May 28, 2023, 9:53 p.m. | OK | PyPy 3 | TESTS | 7 | 234 | 8294400 | ||
207693758 | supersid2000 | A | May 29, 2023, 12:52 a.m. | OK | PyPy 3 | TESTS | 7 | 265 | 8294400 | ||
207715079 | gesuta | A | May 29, 2023, 5:26 a.m. | OK | PyPy 3 | TESTS | 7 | 265 | 9625600 | ||
207673846 | VidGa | A | May 28, 2023, 6:08 p.m. | OK | PyPy 3 | TESTS | 7 | 280 | 8294400 | ||
207670000 | Ayushman_123 | A | May 28, 2023, 5:43 p.m. | OK | PyPy 3 | TESTS | 7 | 358 | 11571200 | ||
207666050 | bagulavamshivi | A | May 28, 2023, 5:01 p.m. | OK | PyPy 3 | TESTS | 7 | 390 | 9625600 | ||
207690865 | kavorka | A | May 28, 2023, 11:07 p.m. | OK | PyPy 3-64 | TESTS | 7 | 93 | 4300800 | ||
207678287 | SoleProprietor | A | May 28, 2023, 6:51 p.m. | OK | PyPy 3-64 | TESTS | 7 | 93 | 7270400 | ||
207715324 | kwin | A | May 29, 2023, 5:29 a.m. | OK | PyPy 3-64 | TESTS | 7 | 109 | 9830400 | ||
207685906 | layzer | A | May 28, 2023, 8:45 p.m. | OK | PyPy 3-64 | TESTS | 7 | 109 | 10137600 | ||
207715042 | pennymagic156 | A | May 29, 2023, 5:25 a.m. | OK | PyPy 3-64 | TESTS | 7 | 124 | 9830400 | ||
207691183 | Quick-One | A | May 28, 2023, 11:20 p.m. | OK | PyPy 3-64 | TESTS | 7 | 124 | 9932800 | ||
207714734 | BlackSpectre | A | May 29, 2023, 5:20 a.m. | OK | PyPy 3-64 | TESTS | 7 | 124 | 10035200 | ||
207682258 | Remineva | A | May 28, 2023, 7:43 p.m. | OK | PyPy 3-64 | TESTS | 7 | 124 | 10035200 | ||
207674915 | gardengnome | A | May 28, 2023, 6:17 p.m. | OK | PyPy 3-64 | TESTS | 7 | 124 | 10035200 | ||
207715064 | gesuta | A | May 29, 2023, 5:26 a.m. | OK | PyPy 3-64 | TESTS | 7 | 139 | 10240000 | ||
207674929 | ShadhinAshraf | A | May 28, 2023, 6:17 p.m. | OK | Python 3 | TESTS | 7 | 155 | 102400 | ||
207659403 | vivek.chatani2006 | A | May 28, 2023, 4:44 p.m. | OK | Python 3 | TESTS | 7 | 171 | 102400 | ||
207715090 | gesuta | A | May 29, 2023, 5:26 a.m. | OK | Python 3 | TESTS | 7 | 218 | 1126400 | ||
207695881 | vishwam_02 | A | May 29, 2023, 1:47 a.m. | OK | Python 3 | TESTS | 7 | 233 | 204800 | ||
207687508 | asan_aLi | A | May 28, 2023, 9:20 p.m. | OK | Python 3 | TESTS | 7 | 233 | 204800 | ||
207699477 | XenoSky | A | May 29, 2023, 2:57 a.m. | OK | Python 3 | TESTS | 7 | 233 | 614400 | ||
207677459 | Komali0214 | A | May 28, 2023, 6:41 p.m. | OK | Python 3 | TESTS | 7 | 233 | 1024000 | ||
207672886 | eugalt | A | May 28, 2023, 6 p.m. | OK | Python 3 | TESTS | 7 | 233 | 1024000 | ||
207673152 | andiamironmanu | A | May 28, 2023, 6:02 p.m. | OK | Python 3 | TESTS | 7 | 234 | 204800 | ||
207710856 | phanhuykhang | A | May 29, 2023, 4:20 a.m. | OK | Python 3 | TESTS | 7 | 249 | 204800 | ||
207678695 | 0npata | A | May 28, 2023, 6:56 p.m. | OK | Rust 2021 | TESTS | 7 | 15 | 0 | ||
207675118 | A_G | A | May 28, 2023, 6:18 p.m. | OK | Rust 2021 | TESTS | 7 | 15 | 0 | ||
207672361 | ilyshana | A | May 28, 2023, 5:57 p.m. | OK | Rust 2021 | TESTS | 7 | 31 | 0 | ||
207714807 | jinmatakich84 | A | May 29, 2023, 5:22 a.m. | OK | Rust 2021 | TESTS | 7 | 31 | 2150400 | ||
207688393 | SlavaG | A | May 28, 2023, 9:45 p.m. | OK | Rust 2021 | TESTS | 7 | 46 | 102400 | ||
207686595 | SlavaG | A | May 28, 2023, 8:59 p.m. | OK | Rust 2021 | TESTS | 7 | 46 | 102400 | ||
207686889 | SlavaG | A | May 28, 2023, 9:05 p.m. | OK | Rust 2021 | TESTS | 7 | 46 | 204800 |
Back to search problems