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 |
---|---|---|---|---|---|---|
( 5726 ) | D | Permutation Restoration | PROGRAMMING | binary search data structures greedy math sortings |
B'Monocarp had a permutation a of n integers 1 , 2 , ..., n (a permutation is an array where each element from 1 to n occurs exactly once). Then Monocarp calculated an array of integers b of size n , where b_i = <= ft lfloor frac{i}{a_i} right rfloor . For example, if the permutation a is [2, 1, 4, 3] , then the array b is equal to <= ft[ <= ft lfloor frac{1}{2} right rfloor, <= ft lfloor frac{2}{1} right rfloor, <= ft lfloor frac{3}{4} right rfloor, <= ft lfloor frac{4}{3} right rfloor right] = [0, 2, 0, 1] . Unfortunately, the Monocarp has lost his permutation, so he wants to restore it. Your task is to find a permutation a that corresponds to the given array b . If there are multiple possible permutations, then print any of them. The tests are constructed in such a way that least one suitable permutation exists. The first line contains a single integer t ( 1 <= t <= 10^5 ) -- number of test cases. The first line of each test case contains a single integer n ( 1 <= n <= 5 cdot 10^5 ). The second line contains n integers b_1, b_2, ... , b_n ( 0 <= b_i <= n ). Additional constrains on the input: For each test case, print n integers -- a permutation a that corresponds to the given array b . If there are multiple possible permutations, 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 |
---|---|---|---|---|---|---|---|---|---|---|---|
163328762 | cyrus_msk | D | July 9, 2022, 1:09 a.m. | OK | D | TESTS | 14 | 358 | 72089600 | ||
163328884 | cyrus_msk | D | July 9, 2022, 1:13 a.m. | OK | D | TESTS | 14 | 420 | 92569600 | ||
163328940 | cyrus_msk | D | July 9, 2022, 1:14 a.m. | OK | D | TESTS | 14 | 436 | 72192000 | ||
163304169 | cbdsopa | D | July 8, 2022, 4:54 p.m. | OK | GNU C++14 | TESTS | 13 | 171 | 15872000 | ||
163302551 | PikaZhu_ | D | July 8, 2022, 4:45 p.m. | OK | GNU C++14 | TESTS | 13 | 202 | 13209600 | ||
163336932 | alkido | D | July 9, 2022, 4 a.m. | OK | GNU C++14 | TESTS | 14 | 233 | 18534400 | ||
163302586 | Kano1224 | D | July 8, 2022, 4:45 p.m. | OK | GNU C++14 | TESTS | 13 | 234 | 12185600 | ||
163306669 | tttyyylll | D | July 8, 2022, 5:16 p.m. | OK | GNU C++14 | TESTS | 13 | 249 | 15257600 | ||
163330786 | pzjNB | D | July 9, 2022, 2:02 a.m. | OK | GNU C++14 | TESTS | 14 | 249 | 16384000 | ||
163337192 | gaoyucheng | D | July 9, 2022, 4:05 a.m. | OK | GNU C++14 | TESTS | 14 | 265 | 11161600 | ||
163343468 | jangjie | D | July 9, 2022, 5:42 a.m. | OK | GNU C++14 | TESTS | 14 | 265 | 14336000 | ||
163315982 | Yugi.Hacker | D | July 8, 2022, 7:14 p.m. | OK | GNU C++14 | TESTS | 13 | 265 | 15257600 | ||
163311117 | MAKLN | D | July 8, 2022, 6:06 p.m. | OK | GNU C++14 | TESTS | 13 | 265 | 19046400 | ||
163328839 | zweix | D | July 9, 2022, 1:11 a.m. | OK | GNU C++17 | TESTS | 14 | 249 | 12083200 | ||
163345138 | emptyset | D | July 9, 2022, 6:01 a.m. | OK | GNU C++17 | TESTS | 14 | 249 | 19046400 | ||
163336173 | EunBin | D | July 9, 2022, 3:45 a.m. | OK | GNU C++17 | TESTS | 14 | 264 | 19046400 | ||
163337429 | liuxiangbin | D | July 9, 2022, 4:10 a.m. | OK | GNU C++17 | TESTS | 14 | 264 | 21094400 | ||
163336091 | zengqingxindsg | D | July 9, 2022, 3:43 a.m. | OK | GNU C++17 | TESTS | 14 | 264 | 24166400 | ||
163335883 | AcqingX | D | July 9, 2022, 3:38 a.m. | OK | GNU C++17 | TESTS | 14 | 265 | 11161600 | ||
163330401 | jhc_123 | D | July 9, 2022, 1:53 a.m. | OK | GNU C++17 | TESTS | 14 | 265 | 23347200 | ||
163303738 | verynewabie | D | July 8, 2022, 4:52 p.m. | OK | GNU C++17 | TESTS | 13 | 265 | 24780800 | ||
163313496 | _Ahmed_Yasser_ | D | July 8, 2022, 6:36 p.m. | OK | GNU C++17 | TESTS | 13 | 280 | 11161600 | ||
163297974 | EunBin | D | July 8, 2022, 4:31 p.m. | OK | GNU C++17 | TESTS | 13 | 280 | 11673600 | ||
163305230 | acwing_shilezhi | D | July 8, 2022, 5:03 p.m. | OK | GNU C++17 (64) | TESTS | 13 | 187 | 36044800 | ||
163303652 | illume2021 | D | July 8, 2022, 4:51 p.m. | OK | GNU C++17 (64) | TESTS | 13 | 202 | 13209600 | ||
163331657 | zszz3 | D | July 9, 2022, 2:20 a.m. | OK | GNU C++17 (64) | TESTS | 14 | 202 | 18329600 | ||
163305115 | YuJiahe | D | July 8, 2022, 5:02 p.m. | OK | GNU C++17 (64) | TESTS | 13 | 218 | 10137600 | ||
163338579 | OTTFF | D | July 9, 2022, 4:30 a.m. | OK | GNU C++17 (64) | TESTS | 14 | 218 | 12697600 | ||
163302830 | 130229nbnb | D | July 8, 2022, 4:46 p.m. | OK | GNU C++17 (64) | TESTS | 13 | 218 | 26828800 | ||
163336905 | mbdbr | D | July 9, 2022, 4 a.m. | OK | GNU C++17 (64) | TESTS | 14 | 233 | 12288000 | ||
163301126 | OnMyZenith | D | July 8, 2022, 4:37 p.m. | OK | GNU C++17 (64) | TESTS | 13 | 233 | 21299200 | ||
163318192 | Argon18 | D | July 8, 2022, 7:52 p.m. | OK | GNU C++17 (64) | TESTS | 13 | 233 | 23449600 | ||
163320054 | SatyaChaitanya | D | July 8, 2022, 8:27 p.m. | OK | GNU C++17 (64) | TESTS | 13 | 233 | 24166400 | ||
163328176 | lx_tyin | D | July 9, 2022, 12:50 a.m. | OK | GNU C++20 (64) | TESTS | 14 | 139 | 10035200 | ||
163312256 | pseong | D | July 8, 2022, 6:21 p.m. | OK | GNU C++20 (64) | TESTS | 13 | 156 | 13926400 | ||
163312195 | pseong | D | July 8, 2022, 6:20 p.m. | OK | GNU C++20 (64) | TESTS | 13 | 156 | 13926400 | ||
163332556 | ftiasch | D | July 9, 2022, 2:37 a.m. | OK | GNU C++20 (64) | TESTS | 14 | 171 | 12288000 | ||
163306665 | lemonilemon | D | July 8, 2022, 5:16 p.m. | OK | GNU C++20 (64) | TESTS | 13 | 171 | 14233600 | ||
163336207 | Kaztaev_Alisher | D | July 9, 2022, 3:45 a.m. | OK | GNU C++20 (64) | TESTS | 14 | 171 | 21913600 | ||
163335784 | KDVinit | D | July 9, 2022, 3:36 a.m. | OK | GNU C++20 (64) | TESTS | 14 | 186 | 43520000 | ||
163298474 | gzhugoodguy | D | July 8, 2022, 4:32 p.m. | OK | GNU C++20 (64) | TESTS | 13 | 202 | 14336000 | ||
163305045 | Ja_king | D | July 8, 2022, 5:01 p.m. | OK | GNU C++20 (64) | TESTS | 13 | 202 | 24268800 | ||
163331689 | killerddy | D | July 9, 2022, 2:20 a.m. | OK | GNU C++20 (64) | TESTS | 14 | 202 | 24576000 | ||
163302823 | TCchen | D | July 8, 2022, 4:46 p.m. | OK | Java 11 | TESTS | 13 | 608 | 31744000 | ||
163318065 | NO__OB | D | July 8, 2022, 7:49 p.m. | OK | Java 11 | TESTS | 13 | 639 | 32460800 | ||
163299430 | zoro_hiyori | D | July 8, 2022, 4:33 p.m. | OK | Java 11 | TESTS | 13 | 686 | 22835200 | ||
163326358 | GoldenShadow | D | July 8, 2022, 11:39 p.m. | OK | Java 11 | TESTS | 14 | 779 | 73216000 | ||
163328515 | shojin_pro | D | July 9, 2022, 1:02 a.m. | OK | Java 11 | TESTS | 14 | 842 | 50892800 | ||
163326858 | programmingnoob69 | D | July 9, 2022, midnight | OK | Java 11 | TESTS | 14 | 982 | 95436800 | ||
163318234 | soumit915 | D | July 8, 2022, 7:53 p.m. | OK | Java 17 | TESTS | 13 | 546 | 43520000 | ||
163323221 | themadknight45 | D | July 8, 2022, 9:45 p.m. | OK | Java 8 | TESTS | 13 | 483 | 26316800 | ||
163307790 | cjcjcjcj | D | July 8, 2022, 5:28 p.m. | OK | Java 8 | TESTS | 13 | 592 | 30515200 | ||
163307116 | EndlessVoid | D | July 8, 2022, 5:20 p.m. | OK | Java 8 | TESTS | 13 | 748 | 23244800 | ||
163299531 | DylanSmith | D | July 8, 2022, 4:33 p.m. | OK | Java 8 | TESTS | 13 | 920 | 26828800 | ||
163316592 | Omar_Mohammad | D | July 8, 2022, 7:23 p.m. | OK | Java 8 | TESTS | 13 | 951 | 74137600 | ||
163301746 | z_zhaojun | D | July 8, 2022, 4:40 p.m. | OK | Java 8 | TESTS | 13 | 1372 | 78131200 | ||
163302564 | misaka12435 | D | July 8, 2022, 4:45 p.m. | OK | MS C++ 2017 | TESTS | 13 | 452 | 10649600 | ||
163334288 | tarattata1 | D | July 9, 2022, 3:08 a.m. | OK | MS C++ 2017 | TESTS | 14 | 498 | 22630400 | ||
163335661 | dan.kormilin | D | July 9, 2022, 3:33 a.m. | OK | MS C++ 2017 | TESTS | 14 | 998 | 35430400 | ||
163345212 | f0xiam | D | July 9, 2022, 6:02 a.m. | OK | MS C++ 2017 | TESTS | 14 | 1107 | 38297600 | ||
163307558 | XYShaoKang | D | July 8, 2022, 5:25 p.m. | OK | Node.js | TESTS | 13 | 1403 | 99942400 | ||
163336864 | zouyu9631 | D | July 9, 2022, 3:59 a.m. | OK | PyPy 3 | TESTS | 14 | 1169 | 85606400 | ||
163300669 | Adroit_001 | D | July 8, 2022, 4:36 p.m. | OK | PyPy 3 | TESTS | 13 | 2199 | 95027200 | ||
163308776 | i8nd5t | D | July 8, 2022, 5:39 p.m. | OK | PyPy 3-64 | TESTS | 13 | 1170 | 100044800 | ||
163337256 | zouyu9631 | D | July 9, 2022, 4:06 a.m. | OK | PyPy 3-64 | TESTS | 14 | 1294 | 143257600 | ||
163338701 | shiviDON | D | July 9, 2022, 4:32 a.m. | OK | PyPy 3-64 | TESTS | 14 | 1481 | 131174400 | ||
163319816 | ossau_guildo | D | July 8, 2022, 8:22 p.m. | OK | PyPy 3-64 | TESTS | 13 | 1715 | 112435200 | ||
163307857 | SophieHatter | D | July 8, 2022, 5:28 p.m. | OK | PyPy 3-64 | TESTS | 13 | 1762 | 116736000 | ||
163306222 | kryptosx | D | July 8, 2022, 5:12 p.m. | OK | PyPy 3-64 | TESTS | 13 | 2059 | 129843200 | ||
163328183 | Lhohelhohehmm | D | July 9, 2022, 12:50 a.m. | OK | PyPy 3-64 | TESTS | 14 | 2152 | 114892800 | ||
163319144 | ronitsingh | D | July 8, 2022, 8:09 p.m. | OK | PyPy 3-64 | TESTS | 13 | 2495 | 155955200 | ||
163319370 | ronitsingh | D | July 8, 2022, 8:13 p.m. | OK | PyPy 3-64 | TESTS | 13 | 2527 | 168140800 | ||
163333627 | mwen | D | July 9, 2022, 2:56 a.m. | OK | PyPy 3-64 | TESTS | 14 | 2979 | 146841600 | ||
163335366 | yylele | D | July 9, 2022, 3:28 a.m. | OK | Python 3 | TESTS | 14 | 2402 | 61952000 | ||
163328188 | Lhohelhohehmm | D | July 9, 2022, 12:51 a.m. | OK | Python 3 | TESTS | 14 | 2417 | 63897600 | ||
163310042 | Lhohelhohehmm | D | July 8, 2022, 5:53 p.m. | OK | Python 3 | TESTS | 13 | 2448 | 74547200 | ||
163305454 | yylele | D | July 8, 2022, 5:05 p.m. | OK | Python 3 | TESTS | 13 | 2464 | 61952000 | ||
163309311 | Lhohelhohehmm | D | July 8, 2022, 5:45 p.m. | OK | Python 3 | TESTS | 13 | 2604 | 74752000 | ||
163310731 | Thallium54 | D | July 8, 2022, 6:01 p.m. | OK | Rust 2021 | TESTS | 13 | 139 | 29491200 | ||
163306912 | xttt | D | July 8, 2022, 5:18 p.m. | OK | Rust 2021 | TESTS | 13 | 171 | 48844800 | ||
163311709 | Thallium54 | D | July 8, 2022, 6:14 p.m. | OK | Rust 2021 | TESTS | 13 | 171 | 52633600 | ||
163306902 | kena0ki | D | July 8, 2022, 5:18 p.m. | OK | Rust 2021 | TESTS | 13 | 187 | 38297600 | ||
163306637 | xttt | D | July 8, 2022, 5:16 p.m. | OK | Rust 2021 | TESTS | 13 | 795 | 48742400 |
Back to search problems