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 |
---|---|---|---|---|---|---|
1093 | Educational Codeforces Round 56 (Rated for Div. 2) | FINISHED | False | 7200 | 192641123 | Dec. 15, 2018, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1671 ) | E | Intersection of Permutations | PROGRAMMING | data structures | 2300 |
B'You are given two permutations a and b , both consisting of n elements. Permutation of n elements is such a integer sequence that each value from 1 to n appears exactly once in it. You are asked to perform two types of queries with them: Print the answer for each query of the first type. It is guaranteed that there will be at least one query of the first type in the input. The first line contains two integers n and m ( 2 <= n <= 2 cdot 10^5 , 1 <= m <= 2 cdot 10^5 ) -- the number of elements in both permutations and the number of queries. The second line contains n integers a_1, a_2, ... , a_n ( 1 <= a_i <= n ) -- permutation a . It is guaranteed that each value from 1 to n appears in a exactly once. The third line contains n integers b_1, b_2, ... , b_n ( 1 <= b_i <= n ) -- permutation b . It is guaranteed that each value from 1 to n appears in b exactly once. Each of the next m lines contains the description of a certain query. These are either: Print the answers for the queries of the first type, each answer in the new line -- the number of values which appear in both segment [l_a; r_a] of positions in permutation a and segment [l_b; r_b] of positions in permutation b . Consider the first query of the first example. Values on positions [1; 2] of a are [5, 1] and values on positions [4; 5] of b are [1, 4] . Only value 1 appears in both segments. After the first swap (the second query) permutation b becomes [2, 1, 3, 5, 4, 6] . After the second swap (the sixth query) permutation b becomes [5, 1, 3, 2, 4, 6] . '... |
63877 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
47702059 | rainboy | E | Dec. 29, 2018, 5:23 p.m. | OK | GNU C11 | TESTS | 27 | 1387 | 359936000 | 2300 | |
47687462 | rainboy | E | Dec. 29, 2018, 3:35 p.m. | OK | GNU C11 | TESTS | 27 | 1466 | 359936000 | 2300 | |
48484083 | luogu_bot1 | E | Jan. 17, 2019, 7:32 a.m. | OK | GNU C++11 | TESTS | 27 | 436 | 52940800 | 2300 | |
48484881 | GGAutomaton | E | Jan. 17, 2019, 7:55 a.m. | OK | GNU C++11 | TESTS | 27 | 452 | 52940800 | 2300 | |
48082884 | stal_xy23z7b8 | E | Jan. 8, 2019, 9:11 a.m. | OK | GNU C++11 | TESTS | 27 | 514 | 36864000 | 2300 | |
47144979 | luogu_bot4 | E | Dec. 17, 2018, 12:58 a.m. | OK | GNU C++11 | TESTS | 27 | 514 | 69734400 | 2300 | |
47331477 | luogu_bot5 | E | Dec. 21, 2018, 1:08 p.m. | OK | GNU C++11 | TESTS | 27 | 529 | 64921600 | 2300 | |
47098455 | PaulShi | E | Dec. 16, 2018, 9:32 a.m. | OK | GNU C++11 | TESTS | 27 | 530 | 69734400 | 2300 | |
47169897 | mysterynoip | E | Dec. 17, 2018, 2:23 p.m. | OK | GNU C++11 | TESTS | 27 | 545 | 84992000 | 2300 | |
47328626 | _zay | E | Dec. 21, 2018, 11:44 a.m. | OK | GNU C++11 | TESTS | 27 | 546 | 55296000 | 2300 | |
54225854 | codemaster11 | E | May 16, 2019, 6:14 a.m. | OK | GNU C++11 | TESTS | 27 | 561 | 67379200 | 2300 | |
47108210 | pxh612__________________ | E | Dec. 16, 2018, 2:06 p.m. | OK | GNU C++11 | TESTS | 27 | 561 | 405606400 | 2300 | |
47276384 | neal | E | Dec. 19, 2018, 7:38 p.m. | OK | GNU C++14 | TESTS | 27 | 420 | 43622400 | 2300 | |
47276110 | neal | E | Dec. 19, 2018, 7:27 p.m. | OK | GNU C++14 | TESTS | 27 | 436 | 43520000 | 2300 | |
47277093 | neal | E | Dec. 19, 2018, 8:06 p.m. | OK | GNU C++14 | TESTS | 27 | 436 | 43622400 | 2300 | |
48654466 | ReaLNero1 | E | Jan. 21, 2019, 1:34 a.m. | OK | GNU C++14 | TESTS | 27 | 451 | 43520000 | 2300 | |
47275982 | neal | E | Dec. 19, 2018, 7:22 p.m. | OK | GNU C++14 | TESTS | 27 | 561 | 43622400 | 2300 | |
47668032 | menjiantong | E | Dec. 29, 2018, 3:06 a.m. | OK | GNU C++14 | TESTS | 27 | 561 | 71475200 | 2300 | |
47374016 | dafeng | E | Dec. 22, 2018, 3:59 p.m. | OK | GNU C++14 | TESTS | 27 | 623 | 19456000 | 2300 | |
47275593 | neal | E | Dec. 19, 2018, 7:06 p.m. | OK | GNU C++14 | TESTS | 27 | 639 | 43622400 | 2300 | |
47249176 | neal | E | Dec. 19, 2018, 7:24 a.m. | OK | GNU C++14 | TESTS | 27 | 639 | 43622400 | 2300 | |
47275666 | neal | E | Dec. 19, 2018, 7:09 p.m. | OK | GNU C++14 | TESTS | 27 | 639 | 43622400 | 2300 | |
47353610 | pkgunboat | E | Dec. 22, 2018, 4:51 a.m. | OK | GNU C++17 | TESTS | 27 | 655 | 100966400 | 2300 | |
68888741 | vjudge5 | E | Jan. 16, 2020, 12:34 a.m. | OK | GNU C++17 | TESTS | 27 | 670 | 100966400 | 2300 | |
47319026 | CrazyDave | E | Dec. 21, 2018, 6:29 a.m. | OK | GNU C++17 | TESTS | 27 | 686 | 36352000 | 2300 | |
52765397 | TrivialMan | E | April 15, 2019, 2:46 a.m. | OK | GNU C++17 | TESTS | 27 | 779 | 410419200 | 2300 | |
52765335 | TrivialMan | E | April 15, 2019, 2:41 a.m. | OK | GNU C++17 | TESTS | 27 | 857 | 513024000 | 2300 | |
47315613 | yinwuxiao | E | Dec. 21, 2018, 2:54 a.m. | OK | GNU C++17 | TESTS | 27 | 919 | 157798400 | 2300 | |
47256375 | vjudge2 | E | Dec. 19, 2018, 10:37 a.m. | OK | GNU C++17 | TESTS | 27 | 935 | 54067200 | 2300 | |
47160352 | bktl1love | E | Dec. 17, 2018, 9:28 a.m. | OK | GNU C++17 | TESTS | 27 | 966 | 54886400 | 2300 | |
47103855 | markotee | E | Dec. 16, 2018, 11:59 a.m. | OK | GNU C++17 | TESTS | 27 | 982 | 328089600 | 2300 | |
47103653 | markotee | E | Dec. 16, 2018, 11:54 a.m. | OK | GNU C++17 | TESTS | 27 | 982 | 408064000 | 2300 | |
47314547 | qb2008 | E | Dec. 21, 2018, 12:54 a.m. | OK | Go | TESTS | 27 | 5990 | 248320000 | 2300 | |
47481824 | Morgan_Y | E | Dec. 25, 2018, 5:44 a.m. | OK | Java 8 | TESTS | 27 | 1310 | 70144000 | 2300 | |
47701984 | Dukkha | E | Dec. 29, 2018, 5:20 p.m. | OK | Java 8 | TESTS | 27 | 1840 | 528793600 | 2300 | |
47893041 | jiangzhiyu1987 | E | Jan. 4, 2019, 8:15 a.m. | OK | Java 8 | TESTS | 27 | 1996 | 472883200 | 2300 | |
47083870 | dusty.and.rusty | E | Dec. 15, 2018, 10:48 p.m. | OK | Java 8 | TESTS | 26 | 2277 | 15462400 | 2300 | |
47083522 | dusty.and.rusty | E | Dec. 15, 2018, 10:14 p.m. | OK | Java 8 | TESTS | 26 | 2511 | 15462400 | 2300 | |
48523378 | wadissimo | E | Jan. 18, 2019, 7:44 a.m. | OK | Java 8 | TESTS | 27 | 5553 | 59904000 | 2300 | |
47106766 | elizarov | E | Dec. 16, 2018, 1:19 p.m. | OK | Kotlin | TESTS | 27 | 2448 | 7577600 | 2300 | |
47106740 | elizarov | E | Dec. 16, 2018, 1:18 p.m. | OK | Kotlin | TESTS | 27 | 2542 | 7577600 | 2300 | |
47106298 | elizarov | E | Dec. 16, 2018, 1:05 p.m. | OK | Kotlin | TESTS | 27 | 2698 | 7577600 | 2300 | |
47106795 | elizarov | E | Dec. 16, 2018, 1:20 p.m. | OK | Kotlin | TESTS | 27 | 2854 | 7577600 | 2300 | |
47106639 | elizarov | E | Dec. 16, 2018, 1:15 p.m. | OK | Kotlin | TESTS | 27 | 2854 | 20377600 | 2300 | |
47106690 | elizarov | E | Dec. 16, 2018, 1:17 p.m. | OK | Kotlin | TESTS | 27 | 5958 | 143974400 | 2300 |
Back to search problems