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 |
---|---|---|---|---|---|---|
1712 | Codeforces Round 813 (Div. 2) | FINISHED | False | 8100 | 76778663 | Aug. 13, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 21772 ) | B | Woeful Permutation | PROGRAMMING | constructive algorithms greedy number theory |
B'You are given a positive integer n . Find any permutation p of length n such that the sum operatorname{lcm}(1,p_1) + operatorname{lcm}(2, p_2) + ldots + operatorname{lcm}(n, p_n) is as large as possible. Here operatorname{lcm}(x, y) denotes the least common multiple (LCM) of integers x and y . A permutation 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 contains the number of test cases t ( 1 <= t <= 1 ,000 ). Description of the test cases follows. The only line for each test case contains a single integer n ( 1 <= n <= 10^5 ). It is guaranteed that the sum of n over all test cases does not exceed 10^5 . For each test case print n integers p_1 , p_2 , ldots , p_n -- the permutation with the maximum possible value of operatorname{lcm}(1,p_1) + operatorname{lcm}(2, p_2) + ldots + operatorname{lcm}(n, p_n) . If there are multiple answers, print any of them. For n = 1 , there is only one permutation, so the answer is [1] . For n = 2 , there are two permutations: '... |
Codeforces Round #813 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
168182222 | TheILICH | B | Aug. 13, 2022, 5:36 p.m. | OK | C# 10 | TESTS | 8 | 62 | 15769600 | ||
168185395 | CLown1331 | B | Aug. 13, 2022, 5:57 p.m. | OK | C# 10 | TESTS | 8 | 124 | 4198400 | ||
168222240 | Muhammad.exe | B | Aug. 14, 2022, 4:20 a.m. | OK | C# 10 | TESTS | 8 | 171 | 2867200 | ||
168215327 | bluemegane | B | Aug. 14, 2022, 2:02 a.m. | OK | C# 8 | TESTS | 8 | 77 | 4403200 | ||
168222782 | YiLinG | B | Aug. 14, 2022, 4:30 a.m. | OK | GNU C11 | TESTS | 8 | 218 | 0 | ||
168176317 | swati21568 | B | Aug. 13, 2022, 4:44 p.m. | OK | GNU C11 | TESTS | 8 | 218 | 409600 | ||
168195744 | shootoon | B | Aug. 13, 2022, 7:27 p.m. | OK | GNU C11 | TESTS | 8 | 390 | 409600 | ||
168184258 | _Paradox_ | B | Aug. 13, 2022, 5:49 p.m. | OK | GNU C11 | TESTS | 8 | 405 | 0 | ||
168193201 | Aisha993 | B | Aug. 13, 2022, 7:01 p.m. | OK | GNU C11 | TESTS | 8 | 421 | 409600 | ||
168193421 | SAFIN07 | B | Aug. 13, 2022, 7:03 p.m. | OK | GNU C11 | TESTS | 8 | 421 | 409600 | ||
168174608 | Urobag | B | Aug. 13, 2022, 4:40 p.m. | OK | GNU C11 | TESTS | 8 | 452 | 0 | ||
168216334 | Gourav1642 | B | Aug. 14, 2022, 2:23 a.m. | OK | GNU C++14 | TESTS | 8 | 15 | 0 | ||
168215885 | MartinHou | B | Aug. 14, 2022, 2:13 a.m. | OK | GNU C++14 | TESTS | 8 | 15 | 0 | ||
168215822 | hcy_nb | B | Aug. 14, 2022, 2:12 a.m. | OK | GNU C++14 | TESTS | 8 | 15 | 0 | ||
168216493 | rohit_65 | B | Aug. 14, 2022, 2:26 a.m. | OK | GNU C++14 | TESTS | 8 | 15 | 0 | ||
168219195 | metalRo | B | Aug. 14, 2022, 3:23 a.m. | OK | GNU C++14 | TESTS | 8 | 15 | 0 | ||
168220719 | zxtikes | B | Aug. 14, 2022, 3:52 a.m. | OK | GNU C++14 | TESTS | 8 | 15 | 0 | ||
168228104 | amit_p39 | B | Aug. 14, 2022, 5:53 a.m. | OK | GNU C++14 | TESTS | 8 | 15 | 0 | ||
168223353 | idonthatephy | B | Aug. 14, 2022, 4:40 a.m. | OK | GNU C++14 | TESTS | 8 | 15 | 0 | ||
168222203 | Pious | B | Aug. 14, 2022, 4:20 a.m. | OK | GNU C++14 | TESTS | 8 | 15 | 0 | ||
168223010 | zhicheng | B | Aug. 14, 2022, 4:34 a.m. | OK | GNU C++14 | TESTS | 8 | 15 | 0 | ||
168219370 | Mann_Vora1729 | B | Aug. 14, 2022, 3:27 a.m. | OK | GNU C++17 | TESTS | 8 | 15 | 0 | ||
168217630 | dkkhai2007hcm | B | Aug. 14, 2022, 2:51 a.m. | OK | GNU C++17 | TESTS | 8 | 15 | 0 | ||
168213695 | saimineesh_786 | B | Aug. 14, 2022, 1:25 a.m. | OK | GNU C++17 | TESTS | 8 | 15 | 0 | ||
168226985 | NikanGh | B | Aug. 14, 2022, 5:39 a.m. | OK | GNU C++17 | TESTS | 8 | 15 | 0 | ||
168225764 | letgo8 | B | Aug. 14, 2022, 5:20 a.m. | OK | GNU C++17 | TESTS | 8 | 15 | 0 | ||
168223447 | hanabihana | B | Aug. 14, 2022, 4:42 a.m. | OK | GNU C++17 | TESTS | 8 | 15 | 0 | ||
168221792 | swami_guruji | B | Aug. 14, 2022, 4:12 a.m. | OK | GNU C++17 | TESTS | 8 | 15 | 0 | ||
168221546 | Dhruba0135 | B | Aug. 14, 2022, 4:07 a.m. | OK | GNU C++17 | TESTS | 8 | 15 | 0 | ||
168221388 | HideInTheSea | B | Aug. 14, 2022, 4:05 a.m. | OK | GNU C++17 | TESTS | 8 | 15 | 0 | ||
168219579 | ducbrick | B | Aug. 14, 2022, 3:31 a.m. | OK | GNU C++17 | TESTS | 8 | 15 | 0 | ||
168181739 | abhaybisht9412 | B | Aug. 13, 2022, 5:34 p.m. | OK | GNU C++17 (64) | TESTS | 8 | 15 | 0 | ||
168226510 | ayush176 | B | Aug. 14, 2022, 5:32 a.m. | OK | GNU C++17 (64) | TESTS | 8 | 15 | 0 | ||
168224057 | XHYU61 | B | Aug. 14, 2022, 4:53 a.m. | OK | GNU C++17 (64) | TESTS | 8 | 15 | 0 | ||
168223884 | Ahnaf_ | B | Aug. 14, 2022, 4:50 a.m. | OK | GNU C++17 (64) | TESTS | 8 | 15 | 0 | ||
168209527 | TrendBattles | B | Aug. 13, 2022, 11:27 p.m. | OK | GNU C++17 (64) | TESTS | 8 | 15 | 0 | ||
168188526 | ryad9898 | B | Aug. 13, 2022, 6:20 p.m. | OK | GNU C++17 (64) | TESTS | 8 | 15 | 0 | ||
168199194 | Rafso_Soni | B | Aug. 13, 2022, 8:09 p.m. | OK | GNU C++17 (64) | TESTS | 8 | 15 | 409600 | ||
168219703 | WWWangYuze | B | Aug. 14, 2022, 3:33 a.m. | OK | GNU C++17 (64) | TESTS | 8 | 15 | 409600 | ||
168221098 | BraumAce | B | Aug. 14, 2022, 3:59 a.m. | OK | GNU C++17 (64) | TESTS | 8 | 15 | 409600 | ||
168226116 | invincible_0 | B | Aug. 14, 2022, 5:26 a.m. | OK | GNU C++17 (64) | TESTS | 8 | 15 | 409600 | ||
168223679 | nottellingthename | B | Aug. 14, 2022, 4:46 a.m. | OK | GNU C++20 (64) | TESTS | 8 | 15 | 0 | ||
168223280 | HuParry | B | Aug. 14, 2022, 4:39 a.m. | OK | GNU C++20 (64) | TESTS | 8 | 15 | 0 | ||
168222323 | rohit_7 | B | Aug. 14, 2022, 4:21 a.m. | OK | GNU C++20 (64) | TESTS | 8 | 15 | 0 | ||
168227925 | antreaskalli06 | B | Aug. 14, 2022, 5:51 a.m. | OK | GNU C++20 (64) | TESTS | 8 | 15 | 0 | ||
168228655 | Zeyad_Nasef | B | Aug. 14, 2022, 6:01 a.m. | OK | GNU C++20 (64) | TESTS | 8 | 15 | 0 | ||
168228687 | abhishek_8303 | B | Aug. 14, 2022, 6:01 a.m. | OK | GNU C++20 (64) | TESTS | 8 | 15 | 0 | ||
168227711 | nirjhorJU | B | Aug. 14, 2022, 5:48 a.m. | OK | GNU C++20 (64) | TESTS | 8 | 15 | 0 | ||
168226372 | proffl | B | Aug. 14, 2022, 5:30 a.m. | OK | GNU C++20 (64) | TESTS | 8 | 15 | 0 | ||
168224706 | watashi_ssb | B | Aug. 14, 2022, 5:04 a.m. | OK | GNU C++20 (64) | TESTS | 8 | 15 | 0 | ||
168224616 | saurabh1102 | B | Aug. 14, 2022, 5:02 a.m. | OK | GNU C++20 (64) | TESTS | 8 | 15 | 0 | ||
168216603 | Longgggggggg | B | Aug. 14, 2022, 2:28 a.m. | OK | Java 11 | TESTS | 8 | 171 | 0 | ||
168214558 | aditya2024 | B | Aug. 14, 2022, 1:46 a.m. | OK | Java 11 | TESTS | 8 | 186 | 0 | ||
168192185 | Srisaivamshi | B | Aug. 13, 2022, 6:52 p.m. | OK | Java 11 | TESTS | 8 | 186 | 0 | ||
168187104 | mcrash12 | B | Aug. 13, 2022, 6:10 p.m. | OK | Java 11 | TESTS | 8 | 186 | 0 | ||
168225217 | sf14t | B | Aug. 14, 2022, 5:12 a.m. | OK | Java 11 | TESTS | 8 | 202 | 0 | ||
168201669 | yudi23 | B | Aug. 13, 2022, 8:44 p.m. | OK | Java 11 | TESTS | 8 | 202 | 0 | ||
168172101 | brstplayer | B | Aug. 13, 2022, 4:32 p.m. | OK | Java 11 | TESTS | 8 | 264 | 0 | ||
168220815 | rajneesh.osho | B | Aug. 14, 2022, 3:53 a.m. | OK | Java 11 | TESTS | 8 | 343 | 0 | ||
168186802 | tanish_1131 | B | Aug. 13, 2022, 6:07 p.m. | OK | Java 11 | TESTS | 8 | 498 | 0 | ||
168186217 | cRuSaDeR | B | Aug. 13, 2022, 6:03 p.m. | OK | Java 11 | TESTS | 8 | 530 | 0 | ||
168227092 | bkifhr10 | B | Aug. 14, 2022, 5:40 a.m. | OK | Java 17 | TESTS | 8 | 296 | 716800 | ||
168177782 | harshaltaory1111 | B | Aug. 13, 2022, 4:48 p.m. | OK | Java 17 | TESTS | 8 | 405 | 512000 | ||
168197069 | Melsonic | B | Aug. 13, 2022, 7:42 p.m. | OK | Java 17 | TESTS | 8 | 514 | 307200 | ||
168190643 | nurs13 | B | Aug. 13, 2022, 6:38 p.m. | OK | Java 17 | TESTS | 8 | 592 | 921600 | ||
168188484 | ak_ankit_ | B | Aug. 13, 2022, 6:19 p.m. | OK | Java 8 | TESTS | 8 | 93 | 0 | ||
168184093 | Sussykin | B | Aug. 13, 2022, 5:48 p.m. | OK | Java 8 | TESTS | 8 | 93 | 0 | ||
168183434 | gssakash | B | Aug. 13, 2022, 5:43 p.m. | OK | Java 8 | TESTS | 8 | 93 | 0 | ||
168208834 | ahmedtawfik | B | Aug. 13, 2022, 11:08 p.m. | OK | Java 8 | TESTS | 8 | 108 | 0 | ||
168227081 | Atuer | B | Aug. 14, 2022, 5:40 a.m. | OK | Java 8 | TESTS | 8 | 109 | 0 | ||
168213628 | mohamedhassan_c | B | Aug. 14, 2022, 1:24 a.m. | OK | Java 8 | TESTS | 8 | 109 | 0 | ||
168197679 | adi_7861 | B | Aug. 13, 2022, 7:50 p.m. | OK | Java 8 | TESTS | 8 | 109 | 0 | ||
168190499 | ved20 | B | Aug. 13, 2022, 6:37 p.m. | OK | Java 8 | TESTS | 8 | 109 | 0 | ||
168181115 | Mohamed308 | B | Aug. 13, 2022, 5:31 p.m. | OK | Java 8 | TESTS | 8 | 109 | 0 | ||
168222450 | Koka | B | Aug. 14, 2022, 4:24 a.m. | OK | Java 8 | TESTS | 8 | 124 | 0 | ||
168193470 | bhawani0910 | B | Aug. 13, 2022, 7:03 p.m. | OK | Kotlin 1.6 | TESTS | 8 | 202 | 512000 | ||
168207916 | forecaster | B | Aug. 13, 2022, 10:45 p.m. | OK | Kotlin 1.6 | TESTS | 8 | 811 | 0 | ||
168201329 | Sushi0077 | B | Aug. 13, 2022, 8:39 p.m. | OK | MS C++ 2017 | TESTS | 8 | 62 | 409600 | ||
168189484 | gkukanov | B | Aug. 13, 2022, 6:27 p.m. | OK | MS C++ 2017 | TESTS | 8 | 62 | 409600 | ||
168178394 | huanghu_s | B | Aug. 13, 2022, 4:49 p.m. | OK | MS C++ 2017 | TESTS | 8 | 62 | 819200 | ||
168174503 | cjh970422 | B | Aug. 13, 2022, 4:39 p.m. | OK | MS C++ 2017 | TESTS | 8 | 77 | 0 | ||
168173740 | khrystyna_dol | B | Aug. 13, 2022, 4:37 p.m. | OK | MS C++ 2017 | TESTS | 8 | 77 | 819200 | ||
168217604 | lyqhh88 | B | Aug. 14, 2022, 2:50 a.m. | OK | MS C++ 2017 | TESTS | 8 | 78 | 0 | ||
168194700 | YoghurtPL | B | Aug. 13, 2022, 7:15 p.m. | OK | MS C++ 2017 | TESTS | 8 | 78 | 0 | ||
168188349 | Crimson_Quasar | B | Aug. 13, 2022, 6:19 p.m. | OK | MS C++ 2017 | TESTS | 8 | 78 | 409600 | ||
168178544 | Gautam01 | B | Aug. 13, 2022, 4:49 p.m. | OK | MS C++ 2017 | TESTS | 8 | 78 | 819200 | ||
168204084 | WalrusRamen21 | B | Aug. 13, 2022, 9:23 p.m. | OK | PHP | TESTS | 8 | 312 | 10547200 | ||
168182355 | 1_2_3_4_5_9 | B | Aug. 13, 2022, 5:37 p.m. | OK | PyPy 2 | TESTS | 8 | 108 | 5632000 | ||
168207145 | voicon | B | Aug. 13, 2022, 10:25 p.m. | OK | PyPy 3 | TESTS | 8 | 124 | 9830400 | ||
168187959 | macdod | B | Aug. 13, 2022, 6:16 p.m. | OK | PyPy 3 | TESTS | 8 | 155 | 7782400 | ||
168176169 | Sadock_Chakma | B | Aug. 13, 2022, 4:44 p.m. | OK | PyPy 3 | TESTS | 8 | 155 | 10137600 | ||
168187866 | sami02jain | B | Aug. 13, 2022, 6:15 p.m. | OK | PyPy 3 | TESTS | 8 | 170 | 9216000 | ||
168217073 | mrx_2006 | B | Aug. 14, 2022, 2:39 a.m. | OK | PyPy 3 | TESTS | 8 | 202 | 7475200 | ||
168228237 | rajbunsha | B | Aug. 14, 2022, 5:55 a.m. | OK | PyPy 3 | TESTS | 8 | 343 | 7884800 | ||
168190428 | Yusif | B | Aug. 13, 2022, 6:36 p.m. | OK | PyPy 3-64 | TESTS | 8 | 77 | 9113600 | ||
168226787 | Yansou | B | Aug. 14, 2022, 5:36 a.m. | OK | PyPy 3-64 | TESTS | 8 | 92 | 9830400 | ||
168171566 | mohamedsamirtkd | B | Aug. 13, 2022, 4:31 p.m. | OK | PyPy 3-64 | TESTS | 8 | 93 | 4096000 | ||
168207284 | ysc007 | B | Aug. 13, 2022, 10:29 p.m. | OK | PyPy 3-64 | TESTS | 8 | 93 | 9625600 | ||
168206927 | BeBeBe66666 | B | Aug. 13, 2022, 10:18 p.m. | OK | PyPy 3-64 | TESTS | 8 | 93 | 10547200 | ||
168186107 | BobChuckyJoe | B | Aug. 13, 2022, 6:02 p.m. | OK | PyPy 3-64 | TESTS | 8 | 108 | 8089600 | ||
168187006 | Whoami2003 | B | Aug. 13, 2022, 6:09 p.m. | OK | PyPy 3-64 | TESTS | 8 | 108 | 8192000 | ||
168221450 | chnaveen | B | Aug. 14, 2022, 4:06 a.m. | OK | PyPy 3-64 | TESTS | 8 | 109 | 9318400 | ||
168208699 | EDCTY | B | Aug. 13, 2022, 11:04 p.m. | OK | PyPy 3-64 | TESTS | 8 | 109 | 9625600 | ||
168197041 | abhu.krish59 | B | Aug. 13, 2022, 7:42 p.m. | OK | PyPy 3-64 | TESTS | 8 | 109 | 9625600 | ||
168175405 | Blackfrost | B | Aug. 13, 2022, 4:42 p.m. | OK | Python 3 | TESTS | 8 | 78 | 6656000 | ||
168172473 | ruhi933 | B | Aug. 13, 2022, 4:33 p.m. | OK | Python 3 | TESTS | 8 | 93 | 5324800 | ||
168177197 | detour | B | Aug. 13, 2022, 4:47 p.m. | OK | Python 3 | TESTS | 8 | 93 | 7680000 | ||
168172198 | anjalibarnwal31 | B | Aug. 13, 2022, 4:32 p.m. | OK | Python 3 | TESTS | 8 | 108 | 5324800 | ||
168173808 | mt_cs | B | Aug. 13, 2022, 4:37 p.m. | OK | Python 3 | TESTS | 8 | 140 | 2252800 | ||
168195708 | Dhruv_Viradiya | B | Aug. 13, 2022, 7:26 p.m. | OK | Python 3 | TESTS | 8 | 155 | 0 | ||
168181424 | H_Raja | B | Aug. 13, 2022, 5:32 p.m. | OK | Python 3 | TESTS | 8 | 155 | 0 | ||
168188055 | lekzA | B | Aug. 13, 2022, 6:17 p.m. | OK | Python 3 | TESTS | 8 | 155 | 2969600 | ||
168202738 | 2017331033 | B | Aug. 13, 2022, 9:01 p.m. | OK | Python 3 | TESTS | 8 | 155 | 3686400 | ||
168191479 | williamcz | B | Aug. 13, 2022, 6:46 p.m. | OK | Python 3 | TESTS | 8 | 155 | 5529600 | ||
168192745 | LittleFall | B | Aug. 13, 2022, 6:57 p.m. | OK | Rust 2021 | TESTS | 8 | 15 | 2150400 | ||
168222894 | sansen | B | Aug. 14, 2022, 4:32 a.m. | OK | Rust 2021 | TESTS | 8 | 31 | 2969600 |
Back to search problems