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 |
---|---|---|---|---|---|---|
1142 | Codeforces Round 549 (Div. 1) | FINISHED | False | 7200 | 183473387 | March 30, 2019, 5:10 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 3139 ) | B | Lynyrd Skynyrd | PROGRAMMING | data structures dfs and similar dp math trees | 2300 |
B'Recently Lynyrd and Skynyrd went to a shop where Lynyrd bought a permutation p of length n , and Skynyrd bought an array a of length m , consisting of integers from 1 to n . Lynyrd and Skynyrd became bored, so they asked you q queries, each of which has the following form: "does the subsegment of a from the l -th to the r -th positions, inclusive, have a subsequence that is a cyclic shift of p ?" Please answer the queries. A permutation of length n is a sequence of n integers such that each integer from 1 to n appears exactly once in it. A cyclic shift of a permutation (p_1, p_2, ldots, p_n) is a permutation (p_i, p_{i + 1}, ldots, p_{n}, p_1, p_2, ldots, p_{i - 1}) for some i from 1 to n . For example, a permutation (2, 1, 3) has three distinct cyclic shifts: (2, 1, 3) , (1, 3, 2) , (3, 2, 1) . A subsequence of a subsegment of array a from the l -th to the r -th positions, inclusive, is a sequence a_{i_1}, a_{i_2}, ldots, a_{i_k} for some i_1, i_2, ldots, i_k such that l <= q i_1 < i_2 < ldots < i_k <= q r . The first line contains three integers n , m , q ( 1 <= n, m, q <= 2 cdot 10^5 ) -- the length of the permutation p , the length of the array a and the number of queries. The next line contains n integers from 1 to n , where the i -th of them is the i -th element of the permutation. Each integer from 1 to n appears exactly once. The next line contains m integers from 1 to n , the i -th of them is the i -th element of the array a . The next q lines describe queries. The i -th of these lines contains two integers l_i and r_i ( 1 <= l_i <= r_i <= m ), meaning that the i -th query is about the subsegment of the array from the l_i -th to the'... |
Codeforces Round #549 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
52046699 | Gassa | B | March 30, 2019, 6:21 p.m. | OK | D | TESTS | 42 | 311 | 53043200 | 2300 | |
64680989 | vjudge2 | B | Nov. 11, 2019, 9:58 a.m. | OK | GNU C++11 | TESTS | 42 | 46 | 9011200 | 2300 | |
64702002 | aipostan | B | Nov. 11, 2019, 3:07 p.m. | OK | GNU C++11 | TESTS | 42 | 46 | 12902400 | 2300 | |
52365377 | JKLover | B | April 6, 2019, 12:32 a.m. | OK | GNU C++11 | TESTS | 42 | 46 | 14643200 | 2300 | |
64700347 | vjudge2 | B | Nov. 11, 2019, 2:37 p.m. | OK | GNU C++11 | TESTS | 42 | 46 | 15769600 | 2300 | |
52807157 | luogu_bot3 | B | April 16, 2019, 5:50 a.m. | OK | GNU C++11 | TESTS | 42 | 46 | 15769600 | 2300 | |
62765515 | ghy21 | B | Oct. 17, 2019, 8:30 a.m. | OK | GNU C++11 | TESTS | 42 | 46 | 15872000 | 2300 | |
58121759 | vjudge2 | B | Aug. 1, 2019, 11:04 a.m. | OK | GNU C++11 | TESTS | 42 | 46 | 15872000 | 2300 | |
55610417 | ReaLNero1 | B | June 16, 2019, 5:18 a.m. | OK | GNU C++11 | TESTS | 42 | 46 | 15872000 | 2300 | |
64612036 | inline | B | Nov. 10, 2019, 2:21 a.m. | OK | GNU C++11 | TESTS | 42 | 46 | 20787200 | 2300 | |
60712568 | Karry5307 | B | Sept. 17, 2019, 9:05 a.m. | OK | GNU C++11 | TESTS | 42 | 61 | 12083200 | 2300 | |
64343252 | vjudge3 | B | Nov. 6, 2019, 4:29 a.m. | OK | GNU C++14 | TESTS | 42 | 77 | 20377600 | 2300 | |
60638251 | iotang | B | Sept. 15, 2019, 2:41 p.m. | OK | GNU C++14 | TESTS | 42 | 77 | 35328000 | 2300 | |
52046481 | Linkus | B | March 30, 2019, 6:19 p.m. | OK | GNU C++14 | TESTS | 42 | 155 | 27443200 | 2300 | |
52084772 | ytriayggg | B | March 31, 2019, 1:50 p.m. | OK | GNU C++14 | TESTS | 42 | 171 | 20582400 | 2300 | |
53856105 | NuM | B | May 7, 2019, 4:19 p.m. | OK | GNU C++14 | TESTS | 42 | 171 | 23449600 | 2300 | |
52041354 | natsugiri | B | March 30, 2019, 5:53 p.m. | OK | GNU C++14 | TESTS | 42 | 171 | 32870400 | 2300 | |
52067583 | tjd229 | B | March 31, 2019, 6:17 a.m. | OK | GNU C++14 | TESTS | 42 | 186 | 17817600 | 2300 | |
52056536 | Neil | B | March 30, 2019, 8:16 p.m. | OK | GNU C++14 | TESTS | 42 | 187 | 10956800 | 2300 | |
52743979 | nielswiles | B | April 14, 2019, 10:39 a.m. | OK | GNU C++14 | TESTS | 42 | 202 | 11366400 | 2300 | |
53033168 | HanZhongBalls | B | April 20, 2019, 3:53 a.m. | OK | GNU C++14 | TESTS | 42 | 202 | 15564800 | 2300 | |
64224439 | vjudge1 | B | Nov. 4, 2019, 1:45 p.m. | OK | GNU C++17 | TESTS | 42 | 77 | 35328000 | 2300 | |
60673188 | vjudge2 | B | Sept. 16, 2019, 11:33 a.m. | OK | GNU C++17 | TESTS | 42 | 78 | 35328000 | 2300 | |
52679821 | HatsuneMikuo | B | April 13, 2019, 11:45 a.m. | OK | GNU C++17 | TESTS | 42 | 109 | 26214400 | 2300 | |
52676673 | interestingLSY | B | April 13, 2019, 9:57 a.m. | OK | GNU C++17 | TESTS | 42 | 109 | 26214400 | 2300 | |
53464441 | vjudge1 | B | April 28, 2019, 9:12 a.m. | OK | GNU C++17 | TESTS | 42 | 187 | 6348800 | 2300 | |
52059960 | Narut | B | March 30, 2019, 11:19 p.m. | OK | GNU C++17 | TESTS | 42 | 187 | 10342400 | 2300 | |
53397890 | bmerry | B | April 27, 2019, 10:04 a.m. | OK | GNU C++17 | TESTS | 42 | 202 | 5017600 | 2300 | |
52135549 | Narut | B | April 1, 2019, 2:09 a.m. | OK | GNU C++17 | TESTS | 42 | 202 | 8499200 | 2300 | |
52154033 | kidddddddddddddddddddddd | B | April 1, 2019, 12:45 p.m. | OK | GNU C++17 | TESTS | 42 | 202 | 11161600 | 2300 | |
52038458 | Errichto | B | March 30, 2019, 5:40 p.m. | OK | GNU C++17 | TESTS | 42 | 202 | 17817600 | 2300 | |
52035648 | Egor | B | March 30, 2019, 5:28 p.m. | OK | Java 8 | TESTS | 42 | 187 | 0 | 2300 | |
52077343 | Narut | B | March 31, 2019, 10:40 a.m. | OK | Java 8 | TESTS | 42 | 218 | 11673600 | 2300 | |
52035156 | Lewin | B | March 30, 2019, 5:26 p.m. | OK | Java 8 | TESTS | 42 | 218 | 18636800 | 2300 | |
52077258 | Narut | B | March 31, 2019, 10:38 a.m. | OK | Java 8 | TESTS | 42 | 233 | 11571200 | 2300 | |
52036558 | ilyakor | B | March 30, 2019, 5:32 p.m. | OK | Java 8 | TESTS | 42 | 234 | 17920000 | 2300 | |
52103125 | Narut | B | March 31, 2019, 2:56 p.m. | OK | Java 8 | TESTS | 42 | 296 | 10752000 | 2300 | |
52249554 | norty | B | April 2, 2019, 9:58 p.m. | OK | Java 8 | TESTS | 42 | 311 | 8499200 | 2300 | |
52115094 | Narut | B | March 31, 2019, 3:40 p.m. | OK | Java 8 | TESTS | 42 | 311 | 8499200 | 2300 | |
52657315 | mikkk | B | April 12, 2019, 7:40 p.m. | OK | Java 8 | TESTS | 42 | 311 | 32460800 | 2300 | |
52239979 | StayAwayFromBitches | B | April 2, 2019, 3:25 p.m. | OK | Java 8 | TESTS | 42 | 327 | 44339200 | 2300 | |
52211196 | alykov | B | April 1, 2019, 7:55 p.m. | OK | Kotlin | TESTS | 42 | 1013 | 10547200 | 2300 | |
52053730 | kuuso | B | March 30, 2019, 7:06 p.m. | OK | Mono C# | TESTS | 42 | 483 | 47104000 | 2300 | |
64702025 | vjudge4 | B | Nov. 11, 2019, 3:08 p.m. | OK | MS C++ | TESTS | 42 | 62 | 14950400 | 2300 | |
53224101 | S.K | B | April 24, 2019, 1:26 p.m. | OK | MS C++ | TESTS | 42 | 170 | 21094400 | 2300 | |
58106499 | vjudge3 | B | Aug. 1, 2019, 4:40 a.m. | OK | MS C++ | TESTS | 42 | 187 | 18432000 | 2300 | |
64784365 | vjudge4 | B | Nov. 13, 2019, 8:34 a.m. | OK | MS C++ | TESTS | 42 | 233 | 11366400 | 2300 | |
53208482 | dacc | B | April 24, 2019, 2:04 a.m. | OK | MS C++ | TESTS | 42 | 233 | 20070400 | 2300 | |
53208006 | vjudge2 | B | April 24, 2019, 1:21 a.m. | OK | MS C++ | TESTS | 42 | 249 | 20070400 | 2300 | |
64780131 | vjudge4 | B | Nov. 13, 2019, 6:45 a.m. | OK | MS C++ | TESTS | 42 | 265 | 44134400 | 2300 | |
64773101 | vjudge4 | B | Nov. 13, 2019, 1:52 a.m. | OK | MS C++ | TESTS | 42 | 311 | 32051200 | 2300 | |
64346913 | vjudge3 | B | Nov. 6, 2019, 6:45 a.m. | OK | MS C++ | TESTS | 42 | 342 | 18432000 | 2300 | |
52037591 | LoneFox | B | March 30, 2019, 5:36 p.m. | OK | MS C++ | TESTS | 42 | 342 | 24064000 | 2300 | |
58106042 | vjudge3 | B | Aug. 1, 2019, 4:21 a.m. | OK | MS C++ 2017 | TESTS | 42 | 280 | 30412800 | 2300 | |
52042127 | Milanin | B | March 30, 2019, 5:56 p.m. | OK | MS C++ 2017 | TESTS | 42 | 296 | 18944000 | 2300 | |
52488104 | AleksanderBalobanov | B | April 8, 2019, 10:19 a.m. | OK | MS C++ 2017 | TESTS | 42 | 327 | 34918400 | 2300 | |
52232038 | wellox | B | April 2, 2019, 12:15 p.m. | OK | MS C++ 2017 | TESTS | 42 | 701 | 18432000 | 2300 | |
52382882 | LSD | B | April 6, 2019, 10:53 a.m. | OK | MS C++ 2017 | TESTS | 42 | 1404 | 30310400 | 2300 | |
52226409 | RomeoFantastik | B | April 2, 2019, 9:43 a.m. | OK | MS C++ 2017 | TESTS | 42 | 1450 | 25702400 | 2300 | |
52284017 | Helli.code | B | April 3, 2019, 6:38 p.m. | OK | PyPy 3 | TESTS | 42 | 608 | 58163200 | 2300 | |
52217579 | yumtam | B | April 2, 2019, 3:43 a.m. | OK | PyPy 3 | TESTS | 42 | 608 | 58163200 | 2300 | |
60241837 | beginner1010 | B | Sept. 7, 2019, 10 p.m. | OK | PyPy 3 | TESTS | 42 | 858 | 60313600 | 2300 | |
60241869 | beginner1010 | B | Sept. 7, 2019, 10:01 p.m. | OK | PyPy 3 | TESTS | 42 | 935 | 59801600 | 2300 | |
52055763 | EbTech | B | March 30, 2019, 7:58 p.m. | OK | Rust | TESTS | 42 | 234 | 21504000 | 2300 |
Back to search problems