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 |
---|---|---|---|---|---|---|
1540 | Codeforces Round 728 (Div. 1) | FINISHED | False | 8100 | 107187899 | June 25, 2021, 3:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 282 ) | D | Inverse Inversions | PROGRAMMING | binary search brute force data structures |
B"You were playing with permutation p of length n , but you lost it in Blair, Alabama! Luckily, you remember some information about the permutation. More specifically, you remember an array b of length n , where b_i is the number of indices j such that j < i and p_j > p_i . You have the array b , and you want to find the permutation p . However, your memory isn't perfect, and you constantly change the values of b as you learn more. For the next q seconds, one of the following things happen: Answer the queries, so you can remember the array! The first line contains a single integer n ( 1 <= q n <= q 10^5 ) -- the size of permutation. The second line contains n integers b_1, b_2 ldots, b_n ( 0 <= q b_i < i ) -- your initial memory of the array b . The third line contains a single integer q ( 1 <= q q <= q 10^5 ) -- the number of queries. The next q lines contain the queries, each with one of the following formats: It is guaranteed that there's at least one query of type 2 . For each query of type 2 , print one integer -- the answer to the query. For the first sample, there's initially only one possible permutation that satisfies the constraints: [1, 2, 3] , as it must have 0 inversions. After the query of type 1 , the array b is [0, 1, 0] . The only permutation p that produces this array is [2, 1, 3] . With this permutation, b_2 is equal to 1 as p_1 > p_2 . "... |
Tutorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
120606685 | Alice_foo_foo | D | June 25, 2021, 5:41 p.m. | OK | GNU C++11 | TESTS | 68 | 1528 | 2457600 | ||
120583734 | Misericorde | D | June 25, 2021, 4:40 p.m. | OK | GNU C++11 | TESTS | 68 | 2854 | 5120000 | ||
120600348 | peehs_moorhsum | D | June 25, 2021, 5:21 p.m. | OK | GNU C++14 | TESTS | 68 | 2604 | 10240000 | ||
120607507 | caoyue | D | June 25, 2021, 5:44 p.m. | OK | GNU C++14 | TESTS | 68 | 4492 | 410726400 | ||
120602293 | Radewoosh | D | June 25, 2021, 5:27 p.m. | OK | GNU C++14 | TESTS | 68 | 4711 | 29184000 | ||
120612729 | Tlatoani | D | June 25, 2021, 6:32 p.m. | OK | GNU C++17 | TESTS | 70 | 998 | 8499200 | ||
120611700 | Tlatoani | D | June 25, 2021, 6:22 p.m. | OK | GNU C++17 | TESTS | 68 | 1263 | 9216000 | ||
120638818 | sh1194 | D | June 26, 2021, 5:49 a.m. | OK | GNU C++17 | TESTS | 71 | 1591 | 2252800 | ||
120637325 | pegasus25 | D | June 26, 2021, 5:26 a.m. | OK | GNU C++17 | TESTS | 71 | 1621 | 2252800 | ||
120632877 | deafff | D | June 26, 2021, 4:11 a.m. | OK | GNU C++17 | TESTS | 71 | 1621 | 2252800 | ||
120632825 | deafff | D | June 26, 2021, 4:10 a.m. | OK | GNU C++17 | TESTS | 71 | 2152 | 2252800 | ||
120624064 | SHZhang2 | D | June 25, 2021, 11:08 p.m. | OK | GNU C++17 | TESTS | 71 | 3213 | 7065600 | ||
120637556 | xtqqwq | D | June 26, 2021, 5:30 a.m. | OK | GNU C++17 | TESTS | 71 | 4086 | 487014400 | ||
120610881 | ksun48 | D | June 25, 2021, 6:16 p.m. | OK | GNU C++17 | TESTS | 68 | 4211 | 472780800 | ||
120609085 | noimi | D | June 25, 2021, 5:49 p.m. | OK | GNU C++17 | TESTS | 68 | 4212 | 101376000 | ||
120591057 | maroonrk | D | June 25, 2021, 4:56 p.m. | OK | GNU C++17 (64) | TESTS | 68 | 1606 | 11673600 | ||
120632456 | _Isaunoya_ | D | June 26, 2021, 4:03 a.m. | OK | GNU C++17 (64) | TESTS | 71 | 2152 | 1331200 | ||
120602670 | tourist | D | June 25, 2021, 5:28 p.m. | OK | GNU C++17 (64) | TESTS | 68 | 2183 | 1331200 | ||
120610832 | Ormlis | D | June 25, 2021, 6:15 p.m. | OK | GNU C++17 (64) | TESTS | 68 | 2542 | 1331200 | ||
120629364 | wleung_bvg | D | June 26, 2021, 2:54 a.m. | OK | GNU C++17 (64) | TESTS | 71 | 2667 | 921600 | ||
120635727 | luogu_bot3 | D | June 26, 2021, 5 a.m. | OK | GNU C++17 (64) | TESTS | 71 | 2683 | 6246400 | ||
120610840 | jiangly | D | June 25, 2021, 6:16 p.m. | OK | GNU C++17 (64) | TESTS | 68 | 2979 | 2457600 | ||
120589579 | NotaMotuaQAQ | D | June 25, 2021, 4:52 p.m. | OK | GNU C++17 (64) | TESTS | 68 | 3462 | 14643200 | ||
120627824 | p_b_p_b | D | June 26, 2021, 2:10 a.m. | OK | GNU C++17 (64) | TESTS | 71 | 3759 | 5017600 | ||
120608380 | ko_osaga | D | June 25, 2021, 5:47 p.m. | OK | GNU C++17 (64) | TESTS | 68 | 4134 | 1228800 | ||
120636168 | b2jena | D | June 26, 2021, 5:08 a.m. | OK | Kotlin | TESTS | 71 | 2323 | 6041600 | ||
120611645 | Tlatoani | D | June 25, 2021, 6:22 p.m. | OK | Kotlin | TESTS | 68 | 2324 | 6144000 | ||
120612645 | Tlatoani | D | June 25, 2021, 6:32 p.m. | OK | Kotlin | TESTS | 70 | 2496 | 13516800 | ||
120614202 | Tlatoani | D | June 25, 2021, 6:50 p.m. | OK | Kotlin | TESTS | 70 | 2620 | 15052800 | ||
120592331 | qwerty787788 | D | June 25, 2021, 4:59 p.m. | OK | Rust | TESTS | 68 | 3806 | 5120000 |
Back to search problems