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 |
---|---|---|---|---|---|---|
1701 | Educational Codeforces Round 131 (Rated for Div. 2) | FINISHED | False | 7200 | 74532299 | July 8, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 20238 ) | B | Permutation | PROGRAMMING | greedy |
B"Recall that a permutation of length n is an array where each element from 1 to n occurs exactly once. For a fixed positive integer d , let's define the cost of the permutation p of length n as the number of indices i (1 <= i < n) such that p_i cdot d = p_{i + 1} . For example, if d = 3 and p = [5, 2, 6, 7, 1, 3, 4] , then the cost of such a permutation is 2 , because p_2 cdot 3 = p_3 and p_5 cdot 3 = p_6 . Your task is the following one: for a given value n , find the permutation of length n and the value d with maximum possible cost (over all ways to choose the permutation and d ). If there are multiple answers, then print any of them. The first line contains a single integer t ( 1 <= t <= 500 ) -- the number of test cases. The single line of each test case contains a single integer n ( 2 <= n <= 2 cdot 10^5 ). The sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, print the value d in the first line, and n integers in the second line -- the permutation itself. If there are multiple answers, then print any of them. "... |
Educational Codeforces Round 131 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
163321624 | Nivas2003 | B | July 8, 2022, 9:02 p.m. | OK | Clang++20 Diagnostics | TESTS | 4 | 608 | 1638400 | ||
163331201 | moly_hhh | B | July 9, 2022, 2:11 a.m. | OK | Clang++20 Diagnostics | TESTS | 7 | 623 | 0 | ||
163322356 | eugalt | B | July 8, 2022, 9:21 p.m. | OK | GNU C11 | TESTS | 4 | 31 | 0 | ||
163304199 | eugalt | B | July 8, 2022, 4:55 p.m. | OK | GNU C11 | TESTS | 4 | 46 | 0 | ||
163314138 | Mostafizz | B | July 8, 2022, 6:45 p.m. | OK | GNU C11 | TESTS | 4 | 795 | 0 | ||
163298285 | akgarg119 | B | July 8, 2022, 4:31 p.m. | OK | GNU C11 | TESTS | 4 | 795 | 0 | ||
163305135 | Devansh2003 | B | July 8, 2022, 5:02 p.m. | OK | GNU C11 | TESTS | 4 | 795 | 0 | ||
163305150 | Devansh_2021460 | B | July 8, 2022, 5:02 p.m. | OK | GNU C11 | TESTS | 4 | 795 | 0 | ||
163311613 | codehunter_ | B | July 8, 2022, 6:12 p.m. | OK | GNU C11 | TESTS | 4 | 795 | 0 | ||
163335101 | chaitanya__dua | B | July 9, 2022, 3:23 a.m. | OK | GNU C11 | TESTS | 7 | 795 | 3993600 | ||
163329337 | shootoon | B | July 9, 2022, 1:26 a.m. | OK | GNU C11 | TESTS | 7 | 811 | 0 | ||
163342311 | antupa235 | B | July 9, 2022, 5:27 a.m. | OK | GNU C11 | TESTS | 7 | 811 | 0 | ||
163307435 | ducnhan84 | B | July 8, 2022, 5:24 p.m. | OK | GNU C++14 | TESTS | 4 | 15 | 0 | ||
163309459 | MahmoudSerag | B | July 8, 2022, 5:47 p.m. | OK | GNU C++14 | TESTS | 4 | 30 | 0 | ||
163318608 | pushpita_eee | B | July 8, 2022, 8 p.m. | OK | GNU C++14 | TESTS | 4 | 30 | 0 | ||
163297121 | harshpatel18.ha | B | July 8, 2022, 4:29 p.m. | OK | GNU C++14 | TESTS | 4 | 30 | 819200 | ||
163309814 | Muhammad_Alparslan | B | July 8, 2022, 5:51 p.m. | OK | GNU C++14 | TESTS | 4 | 30 | 819200 | ||
163343732 | HKZG | B | July 9, 2022, 5:44 a.m. | OK | GNU C++14 | TESTS | 7 | 30 | 1843200 | ||
163309733 | m3h3d1 | B | July 8, 2022, 5:50 p.m. | OK | GNU C++14 | TESTS | 4 | 30 | 5632000 | ||
163337909 | MEZBAH666 | B | July 9, 2022, 4:18 a.m. | OK | GNU C++14 | TESTS | 7 | 31 | 0 | ||
163340440 | nahid057 | B | July 9, 2022, 5:02 a.m. | OK | GNU C++14 | TESTS | 7 | 31 | 0 | ||
163344911 | Ashutosh_02 | B | July 9, 2022, 5:59 a.m. | OK | GNU C++14 | TESTS | 7 | 31 | 0 | ||
163309962 | 1prarthana | B | July 8, 2022, 5:52 p.m. | OK | GNU C++17 | TESTS | 4 | 15 | 0 | ||
163306662 | smolyanms2007 | B | July 8, 2022, 5:16 p.m. | OK | GNU C++17 | TESTS | 4 | 15 | 102400 | ||
163306956 | Kanishka006 | B | July 8, 2022, 5:19 p.m. | OK | GNU C++17 | TESTS | 4 | 15 | 819200 | ||
163323737 | capi2list | B | July 8, 2022, 10:02 p.m. | OK | GNU C++17 | TESTS | 4 | 15 | 1638400 | ||
163304372 | manurag_20 | B | July 8, 2022, 4:56 p.m. | OK | GNU C++17 | TESTS | 4 | 15 | 2355200 | ||
163306072 | Rohan28 | B | July 8, 2022, 5:11 p.m. | OK | GNU C++17 | TESTS | 4 | 15 | 2457600 | ||
163313009 | SO_NIK | B | July 8, 2022, 6:29 p.m. | OK | GNU C++17 | TESTS | 4 | 30 | 0 | ||
163343310 | yashgajalwar | B | July 9, 2022, 5:40 a.m. | OK | GNU C++17 | TESTS | 7 | 30 | 0 | ||
163324258 | zenaahmed480 | B | July 8, 2022, 10:19 p.m. | OK | GNU C++17 | TESTS | 4 | 30 | 0 | ||
163318793 | ashik763 | B | July 8, 2022, 8:03 p.m. | OK | GNU C++17 | TESTS | 4 | 30 | 0 | ||
163304098 | iAmShipul | B | July 8, 2022, 4:54 p.m. | OK | GNU C++17 (64) | TESTS | 4 | 15 | 0 | ||
163305141 | dewfr0st | B | July 8, 2022, 5:02 p.m. | OK | GNU C++17 (64) | TESTS | 4 | 15 | 0 | ||
163313532 | startrek4 | B | July 8, 2022, 6:36 p.m. | OK | GNU C++17 (64) | TESTS | 4 | 15 | 0 | ||
163320556 | udeshyaraj | B | July 8, 2022, 8:37 p.m. | OK | GNU C++17 (64) | TESTS | 4 | 15 | 0 | ||
163301863 | bi_chen | B | July 8, 2022, 4:41 p.m. | OK | GNU C++17 (64) | TESTS | 4 | 15 | 409600 | ||
163311424 | 1nj3ct0r_Ash | B | July 8, 2022, 6:10 p.m. | OK | GNU C++17 (64) | TESTS | 4 | 15 | 1843200 | ||
163298259 | toxicdumaloo | B | July 8, 2022, 4:31 p.m. | OK | GNU C++17 (64) | TESTS | 4 | 30 | 0 | ||
163298984 | yashnator | B | July 8, 2022, 4:32 p.m. | OK | GNU C++17 (64) | TESTS | 4 | 30 | 0 | ||
163308368 | Zima_queen | B | July 8, 2022, 5:34 p.m. | OK | GNU C++17 (64) | TESTS | 4 | 30 | 0 | ||
163311112 | sagar_sk007 | B | July 8, 2022, 6:06 p.m. | OK | GNU C++17 (64) | TESTS | 4 | 30 | 0 | ||
163319626 | Ahmed.Fathi | B | July 8, 2022, 8:18 p.m. | OK | GNU C++20 (64) | TESTS | 4 | 15 | 0 | ||
163340901 | Bitmaskman | B | July 9, 2022, 5:08 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 15 | 0 | ||
163340828 | UrAniMaTiX | B | July 9, 2022, 5:07 a.m. | OK | GNU C++20 (64) | TESTS | 7 | 15 | 0 | ||
163323662 | rafatoa | B | July 8, 2022, 9:59 p.m. | OK | GNU C++20 (64) | TESTS | 4 | 15 | 0 | ||
163319748 | PiRaJo4ek | B | July 8, 2022, 8:21 p.m. | OK | GNU C++20 (64) | TESTS | 4 | 15 | 0 | ||
163318708 | himanshu_jikadra | B | July 8, 2022, 8:01 p.m. | OK | GNU C++20 (64) | TESTS | 4 | 15 | 0 | ||
163317622 | wrongsubmission | B | July 8, 2022, 7:42 p.m. | OK | GNU C++20 (64) | TESTS | 4 | 15 | 0 | ||
163315343 | Vergil_God | B | July 8, 2022, 7:04 p.m. | OK | GNU C++20 (64) | TESTS | 4 | 15 | 0 | ||
163313601 | Syuzi777 | B | July 8, 2022, 6:37 p.m. | OK | GNU C++20 (64) | TESTS | 4 | 15 | 0 | ||
163311794 | v_parth7 | B | July 8, 2022, 6:15 p.m. | OK | GNU C++20 (64) | TESTS | 4 | 15 | 0 | ||
163317732 | a_dev | B | July 8, 2022, 7:44 p.m. | OK | Java 11 | TESTS | 4 | 171 | 0 | ||
163315529 | rajneesh.osho | B | July 8, 2022, 7:07 p.m. | OK | Java 11 | TESTS | 4 | 171 | 0 | ||
163340391 | vijender_8601 | B | July 9, 2022, 5:01 a.m. | OK | Java 11 | TESTS | 7 | 187 | 0 | ||
163334628 | its_indus | B | July 9, 2022, 3:14 a.m. | OK | Java 11 | TESTS | 7 | 202 | 0 | ||
163334650 | its_indus | B | July 9, 2022, 3:14 a.m. | OK | Java 11 | TESTS | 7 | 202 | 0 | ||
163311483 | skhammad | B | July 8, 2022, 6:11 p.m. | OK | Java 11 | TESTS | 4 | 217 | 0 | ||
163333111 | KarMa_ | B | July 9, 2022, 2:47 a.m. | OK | Java 11 | TESTS | 7 | 218 | 0 | ||
163329849 | jangkun217 | B | July 9, 2022, 1:40 a.m. | OK | Java 11 | TESTS | 7 | 218 | 0 | ||
163312281 | yudi23 | B | July 8, 2022, 6:21 p.m. | OK | Java 11 | TESTS | 4 | 218 | 0 | ||
163306545 | Lelouch20 | B | July 8, 2022, 5:15 p.m. | OK | Java 11 | TESTS | 4 | 233 | 0 | ||
163330342 | 17821147 | B | July 9, 2022, 1:52 a.m. | OK | Java 17 | TESTS | 7 | 327 | 307200 | ||
163309164 | _ryan18_ | B | July 8, 2022, 5:43 p.m. | OK | Java 17 | TESTS | 4 | 389 | 9523200 | ||
163335648 | heyharry | B | July 9, 2022, 3:33 a.m. | OK | Java 17 | TESTS | 7 | 935 | 614400 | ||
163303807 | Sussykin | B | July 8, 2022, 4:52 p.m. | OK | Java 8 | TESTS | 4 | 108 | 3379200 | ||
163313656 | liomsv | B | July 8, 2022, 6:38 p.m. | OK | Java 8 | TESTS | 4 | 124 | 3174400 | ||
163315346 | less_ordinary | B | July 8, 2022, 7:04 p.m. | OK | Java 8 | TESTS | 4 | 139 | 0 | ||
163305884 | PointSigma | B | July 8, 2022, 5:09 p.m. | OK | Java 8 | TESTS | 4 | 139 | 3174400 | ||
163323312 | Koka | B | July 8, 2022, 9:48 p.m. | OK | Java 8 | TESTS | 4 | 140 | 0 | ||
163311056 | Rayhan_ChowdhuRy | B | July 8, 2022, 6:05 p.m. | OK | Java 8 | TESTS | 4 | 155 | 0 | ||
163307715 | Mohamed308 | B | July 8, 2022, 5:27 p.m. | OK | Java 8 | TESTS | 4 | 171 | 8294400 | ||
163310500 | BhargavModha | B | July 8, 2022, 5:58 p.m. | OK | Java 8 | TESTS | 4 | 202 | 10137600 | ||
163341552 | ahmedTarek28 | B | July 9, 2022, 5:17 a.m. | OK | Java 8 | TESTS | 7 | 217 | 9216000 | ||
163309039 | ankit_0207 | B | July 8, 2022, 5:42 p.m. | OK | Java 8 | TESTS | 4 | 717 | 0 | ||
163330622 | xiangyi1 | B | July 9, 2022, 1:58 a.m. | OK | MS C++ 2017 | TESTS | 7 | 46 | 307200 | ||
163334594 | Nulor | B | July 9, 2022, 3:14 a.m. | OK | MS C++ 2017 | TESTS | 7 | 46 | 819200 | ||
163310851 | towin | B | July 8, 2022, 6:02 p.m. | OK | MS C++ 2017 | TESTS | 4 | 109 | 204800 | ||
163328722 | _Rimjhim_36 | B | July 9, 2022, 1:08 a.m. | OK | MS C++ 2017 | TESTS | 7 | 124 | 819200 | ||
163310048 | Nosov_Vovanus2022 | B | July 8, 2022, 5:54 p.m. | OK | MS C++ 2017 | TESTS | 4 | 140 | 819200 | ||
163312866 | progin | B | July 8, 2022, 6:28 p.m. | OK | PHP | TESTS | 4 | 62 | 18944000 | ||
163300938 | Adroit_001 | B | July 8, 2022, 4:37 p.m. | OK | PyPy 3 | TESTS | 4 | 124 | 13209600 | ||
163337609 | zouyu9631 | B | July 9, 2022, 4:13 a.m. | OK | PyPy 3 | TESTS | 7 | 170 | 10444800 | ||
163305015 | Usurper__ | B | July 8, 2022, 5:01 p.m. | OK | PyPy 3 | TESTS | 4 | 171 | 13004800 | ||
163317230 | zxcuser2 | B | July 8, 2022, 7:35 p.m. | OK | PyPy 3 | TESTS | 4 | 233 | 12288000 | ||
163312692 | Amulz_T | B | July 8, 2022, 6:26 p.m. | OK | PyPy 3 | TESTS | 4 | 233 | 16179200 | ||
163341527 | Bishwanath | B | July 9, 2022, 5:16 a.m. | OK | PyPy 3 | TESTS | 7 | 249 | 13619200 | ||
163304947 | Tim0287 | B | July 8, 2022, 5:01 p.m. | OK | PyPy 3 | TESTS | 4 | 264 | 9420800 | ||
163302336 | Ankush__Yadav | B | July 8, 2022, 4:43 p.m. | OK | PyPy 3 | TESTS | 4 | 265 | 9523200 | ||
163323803 | rasheed_ashen_one | B | July 8, 2022, 10:04 p.m. | OK | PyPy 3 | TESTS | 4 | 280 | 9523200 | ||
163320692 | Vt_code | B | July 8, 2022, 8:40 p.m. | OK | PyPy 3 | TESTS | 4 | 280 | 10342400 | ||
163318443 | mz1 | B | July 8, 2022, 7:57 p.m. | OK | PyPy 3-64 | TESTS | 4 | 93 | 15462400 | ||
163313325 | Andaloo | B | July 8, 2022, 6:34 p.m. | OK | PyPy 3-64 | TESTS | 4 | 108 | 7680000 | ||
163304504 | fan_of_tourist | B | July 8, 2022, 4:57 p.m. | OK | PyPy 3-64 | TESTS | 4 | 108 | 9216000 | ||
163320431 | MistaAsh | B | July 8, 2022, 8:35 p.m. | OK | PyPy 3-64 | TESTS | 4 | 108 | 17408000 | ||
163331474 | wanglijie | B | July 9, 2022, 2:17 a.m. | OK | PyPy 3-64 | TESTS | 7 | 109 | 16998400 | ||
163308537 | iwillgo | B | July 8, 2022, 5:36 p.m. | OK | PyPy 3-64 | TESTS | 4 | 109 | 17305600 | ||
163330880 | Youarenotgood | B | July 9, 2022, 2:04 a.m. | OK | PyPy 3-64 | TESTS | 7 | 109 | 17408000 | ||
163310688 | Ele_1 | B | July 8, 2022, 6 p.m. | OK | PyPy 3-64 | TESTS | 4 | 124 | 10854400 | ||
163308384 | SSCoding123 | B | July 8, 2022, 5:34 p.m. | OK | PyPy 3-64 | TESTS | 4 | 124 | 15052800 | ||
163331611 | wanglijie | B | July 9, 2022, 2:19 a.m. | OK | PyPy 3-64 | TESTS | 7 | 124 | 17612800 | ||
163327914 | MohaSa | B | July 9, 2022, 12:41 a.m. | OK | Python 3 | TESTS | 7 | 155 | 14028800 | ||
163301953 | mofhu | B | July 8, 2022, 4:41 p.m. | OK | Python 3 | TESTS | 4 | 202 | 14028800 | ||
163328535 | mnacf | B | July 9, 2022, 1:02 a.m. | OK | Python 3 | TESTS | 7 | 280 | 18329600 | ||
163309797 | GouthamSan | B | July 8, 2022, 5:51 p.m. | OK | Python 3 | TESTS | 4 | 311 | 6656000 | ||
163301895 | eugalt | B | July 8, 2022, 4:41 p.m. | OK | Python 3 | TESTS | 4 | 327 | 0 | ||
163320024 | aviratg.018 | B | July 8, 2022, 8:27 p.m. | OK | Python 3 | TESTS | 4 | 327 | 6451200 | ||
163342241 | Tanish08 | B | July 9, 2022, 5:26 a.m. | OK | Python 3 | TESTS | 7 | 327 | 10240000 | ||
163305602 | tempaccount123 | B | July 8, 2022, 5:06 p.m. | OK | Python 3 | TESTS | 4 | 327 | 12697600 | ||
163303083 | Rahulsust | B | July 8, 2022, 4:48 p.m. | OK | Python 3 | TESTS | 4 | 342 | 0 | ||
163342055 | suraj_kr | B | July 9, 2022, 5:23 a.m. | OK | Python 3 | TESTS | 7 | 342 | 7577600 | ||
163303804 | Hyrulia | B | July 8, 2022, 4:52 p.m. | OK | Rust 2021 | TESTS | 4 | 31 | 11468800 | ||
163336523 | Thallium54 | B | July 9, 2022, 3:52 a.m. | OK | Rust 2021 | TESTS | 7 | 46 | 5529600 |
Back to search problems