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 |
---|---|---|---|---|---|---|
1443 | Codeforces Round 681 (Div. 2, based on VK Cup 2019-2020 - Final) | FINISHED | False | 7200 | 133025111 | Nov. 2, 2020, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1276 ) | E | Long Permutation | PROGRAMMING | brute force combinatorics math |
B'A permutation is a sequence of integers from 1 to n of length n containing each number exactly once. For example, [1] , [4, 3, 5, 1, 2] , [3, 2, 1] -- are permutations, and [1, 1] , [4, 3, 1] , [2, 3, 4] -- no. Permutation a is lexicographically smaller than permutation b (they have the same length n ), if in the first index i in which they differ, a[i] < b[i] . For example, the permutation [1, 3, 2, 4] is lexicographically smaller than the permutation [1, 3, 4, 2] , because the first two elements are equal, and the third element in the first permutation is smaller than in the second. The next permutation for a permutation a of length n -- is the lexicographically smallest permutation b of length n that lexicographically larger than a . For example: You are given the number n -- the length of the initial permutation. The initial permutation has the form a = [1, 2, ldots, n] . In other words, a[i] = i ( 1 <= i <= n ). You need to process q queries of two types: For each query of the 1 -st type output the required sum. The first line contains two integers n ( 2 <= n <= 2 cdot 10^5 ) and q ( 1 <= q <= 2 cdot 10^5 ), where n -- the length of the initial permutation, and q -- the number of queries. The next q lines contain a single query of the 1 -st or 2 -nd type. The 1 -st type query consists of three integers 1 , l and r (1 <= l <= r <= n) , the 2 -nd type query consists of two integers 2 and x (1 <= x <= 10^5) . It is guaranteed that all requests of the 2 -nd type are possible to process. For each query of the 1 -st type, output on a separate line one integer -- the required sum. Initially, the permutation has the form [1, 2, 3, 4] . Queries processing is as follows: '... |
VK Cup 2019-2020 -- Engine Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
97525628 | luogu_bot4 | E | Nov. 3, 2020, 4:50 a.m. | OK | GNU C++11 | TESTS | 7 | 78 | 4505600 | ||
97522085 | xwd456 | E | Nov. 3, 2020, 3:26 a.m. | OK | GNU C++11 | TESTS | 7 | 78 | 12083200 | ||
97518625 | 2018liuzhiyuan | E | Nov. 3, 2020, 2:02 a.m. | OK | GNU C++11 | TESTS | 7 | 93 | 4812800 | ||
97480362 | xwd654 | E | Nov. 2, 2020, 4:07 p.m. | OK | GNU C++11 | TESTS | 7 | 93 | 12083200 | ||
97518741 | liberShip | E | Nov. 3, 2020, 2:07 a.m. | OK | GNU C++11 | TESTS | 7 | 108 | 4812800 | ||
97519448 | lszxj | E | Nov. 3, 2020, 2:29 a.m. | OK | GNU C++11 | TESTS | 7 | 109 | 0 | ||
97484308 | wddmahe | E | Nov. 2, 2020, 4:17 p.m. | OK | GNU C++11 | TESTS | 7 | 109 | 12083200 | ||
97518709 | clbclb | E | Nov. 3, 2020, 2:06 a.m. | OK | GNU C++11 | TESTS | 7 | 124 | 1638400 | ||
97527640 | white_album2 | E | Nov. 3, 2020, 5:28 a.m. | OK | GNU C++11 | TESTS | 7 | 140 | 0 | ||
97522419 | panhuachao | E | Nov. 3, 2020, 3:32 a.m. | OK | GNU C++11 | TESTS | 7 | 140 | 0 | ||
97509959 | mehtaji | E | Nov. 2, 2020, 8:40 p.m. | OK | GNU C++14 | TESTS | 7 | 155 | 204800 | ||
97529441 | usernameson | E | Nov. 3, 2020, 5:58 a.m. | OK | GNU C++14 | TESTS | 7 | 171 | 204800 | ||
97497384 | SpringsVGC | E | Nov. 2, 2020, 5:35 p.m. | OK | GNU C++14 | TESTS | 7 | 171 | 3379200 | ||
97494829 | zzz_txdy | E | Nov. 2, 2020, 5:15 p.m. | OK | GNU C++14 | TESTS | 7 | 186 | 2560000 | ||
97490445 | CraniXort | E | Nov. 2, 2020, 4:31 p.m. | OK | GNU C++14 | TESTS | 7 | 187 | 6553600 | ||
97488921 | xacotasamata | E | Nov. 2, 2020, 4:28 p.m. | OK | GNU C++14 | TESTS | 7 | 202 | 7475200 | ||
97528480 | czswez | E | Nov. 3, 2020, 5:43 a.m. | OK | GNU C++14 | TESTS | 7 | 218 | 24166400 | ||
97511226 | chellam | E | Nov. 2, 2020, 9:14 p.m. | OK | GNU C++14 | TESTS | 7 | 233 | 6451200 | ||
97483176 | SKT-T1_Faker | E | Nov. 2, 2020, 4:14 p.m. | OK | GNU C++14 | TESTS | 7 | 233 | 9625600 | ||
97519545 | HanTroid | E | Nov. 3, 2020, 2:31 a.m. | OK | GNU C++14 | TESTS | 7 | 234 | 1740800 | ||
97526900 | ShiinaMahiru | E | Nov. 3, 2020, 5:14 a.m. | OK | GNU C++17 | TESTS | 7 | 77 | 1843200 | ||
97521506 | blondie | E | Nov. 3, 2020, 3:13 a.m. | OK | GNU C++17 | TESTS | 7 | 139 | 102400 | ||
97521474 | blondie | E | Nov. 3, 2020, 3:13 a.m. | OK | GNU C++17 | TESTS | 7 | 140 | 102400 | ||
97520085 | Turkey | E | Nov. 3, 2020, 2:44 a.m. | OK | GNU C++17 | TESTS | 7 | 155 | 0 | ||
97486754 | kud | E | Nov. 2, 2020, 4:23 p.m. | OK | GNU C++17 | TESTS | 7 | 155 | 4812800 | ||
97527508 | Avny | E | Nov. 3, 2020, 5:26 a.m. | OK | GNU C++17 | TESTS | 7 | 155 | 26419200 | ||
97522409 | Jyqjyq1 | E | Nov. 3, 2020, 3:32 a.m. | OK | GNU C++17 | TESTS | 7 | 171 | 4812800 | ||
97508824 | Dr.Dendro | E | Nov. 2, 2020, 8:14 p.m. | OK | GNU C++17 | TESTS | 7 | 171 | 6041600 | ||
97511569 | VEGAnn | E | Nov. 2, 2020, 9:23 p.m. | OK | GNU C++17 | TESTS | 7 | 187 | 0 | ||
97501593 | Taffyz | E | Nov. 2, 2020, 6:20 p.m. | OK | GNU C++17 | TESTS | 7 | 187 | 3379200 | ||
97512836 | june_waves | E | Nov. 2, 2020, 10:03 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 93 | 0 | ||
97526611 | vjudge1 | E | Nov. 3, 2020, 5:09 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 93 | 4505600 | ||
97512768 | june_waves | E | Nov. 2, 2020, 10 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 108 | 0 | ||
97508389 | lsantire | E | Nov. 2, 2020, 8:06 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 109 | 0 | ||
97525479 | memset0c | E | Nov. 3, 2020, 4:47 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 109 | 4505600 | ||
97512349 | june_waves | E | Nov. 2, 2020, 9:46 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 124 | 0 | ||
97486605 | PaliLo | E | Nov. 2, 2020, 4:22 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 124 | 3174400 | ||
97503177 | the_hyp0cr1t3 | E | Nov. 2, 2020, 6:41 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 140 | 0 | ||
97519147 | haruki_K | E | Nov. 3, 2020, 2:19 a.m. | OK | GNU C++17 (64) | TESTS | 7 | 140 | 1638400 | ||
97512214 | smax | E | Nov. 2, 2020, 9:42 p.m. | OK | GNU C++17 (64) | TESTS | 7 | 140 | 1638400 | ||
97514791 | mphillotry | E | Nov. 2, 2020, 11:29 p.m. | OK | Java 11 | TESTS | 7 | 451 | 0 | ||
97519882 | iamavalon | E | Nov. 3, 2020, 2:40 a.m. | OK | Java 8 | TESTS | 7 | 187 | 0 | ||
97511607 | 2020akadaver | E | Nov. 2, 2020, 9:25 p.m. | OK | Java 8 | TESTS | 7 | 233 | 0 | ||
97518958 | iamavalon | E | Nov. 3, 2020, 2:14 a.m. | OK | Java 8 | TESTS | 7 | 296 | 0 | ||
97489044 | fancy_lettuce | E | Nov. 2, 2020, 4:28 p.m. | OK | .NET Core C# | TESTS | 7 | 795 | 16076800 | ||
97508091 | titia | E | Nov. 2, 2020, 8 p.m. | OK | PyPy 3 | TESTS | 7 | 685 | 24985600 | ||
97504705 | ebaalhuis | E | Nov. 2, 2020, 7:04 p.m. | OK | PyPy 3 | TESTS | 7 | 842 | 11161600 | ||
97504641 | ebaalhuis | E | Nov. 2, 2020, 7:02 p.m. | OK | PyPy 3 | TESTS | 7 | 2885 | 11776000 | ||
97529483 | silvertint | E | Nov. 3, 2020, 5:59 a.m. | OK | PyPy 3 | TESTS | 7 | 2886 | 23347200 | ||
97499484 | sh1194 | E | Nov. 2, 2020, 5:56 p.m. | OK | Python 3 | TESTS | 7 | 2480 | 2867200 |
Back to search problems