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 |
---|---|---|---|---|---|---|
1158 | Codeforces Round 559 (Div. 1) | FINISHED | False | 7200 | 174151499 | May 12, 2019, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 411 ) | F | Density of subarrays | PROGRAMMING | dp math | 3400 |
B"Let c be some positive integer. Let's call an array a_1, a_2, ldots, a_n of positive integers c -array, if for all i condition 1 <= q a_i <= q c is satisfied. Let's call c -array b_1, b_2, ldots, b_k a subarray of c -array a_1, a_2, ldots, a_n , if there exists such set of k indices 1 <= q i_1 < i_2 < ldots < i_k <= q n that b_j = a_{i_j} for all 1 <= q j <= q k . Let's define density of c -array a_1, a_2, ldots, a_n as maximal non-negative integer p , such that any c -array, that contains p numbers is a subarray of a_1, a_2, ldots, a_n . You are given a number c and some c -array a_1, a_2, ldots, a_n . For all 0 <= q p <= q n find the number of sequences of indices 1 <= q i_1 < i_2 < ldots < i_k <= q n for all 1 <= q k <= q n , such that density of array a_{i_1}, a_{i_2}, ldots, a_{i_k} is equal to p . Find these numbers by modulo 998 ,244 ,353 , because they can be too large. The first line contains two integers n and c , separated by spaces ( 1 <= q n, c <= q 3 ,000 ). The second line contains n integers a_1, a_2, ldots, a_n , separated by spaces ( 1 <= q a_i <= q c ). Print n + 1 numbers s_0, s_1, ldots, s_n . s_p should be equal to the number of sequences of indices 1 <= q i_1 < i_2 < ldots < i_k <= q n for all 1 <= q k <= q n by modulo 998 ,244 ,353 , such that the density of array a_{i_1}, a_{i_2}, ldots, a_{i_k} is equal to p . In the first example, it's easy to see that the density of array will always be equal to its length. There exists 4 sequences with one index, 6 with two indices, 4 with three and 1 with four. In the second example, the only sequence of indices, such that the array will have non-zero density is all indices because in other cases there won't be at least one number "... |
66993 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
54066936 | rainboy | F | May 13, 2019, 1:57 p.m. | OK | GNU C11 | TESTS | 142 | 2636 | 60825600 | 3400 | |
55332635 | WZYYN | F | June 9, 2019, 11:54 a.m. | OK | GNU C++11 | TESTS | 142 | 2090 | 207462400 | 3400 | |
57710130 | py_ultron | F | July 24, 2019, 11:06 p.m. | OK | GNU C++11 | TESTS | 142 | 2480 | 97484800 | 3400 | |
57866046 | lopare | F | July 27, 2019, 9:05 p.m. | OK | GNU C++11 | TESTS | 142 | 2480 | 97484800 | 3400 | |
55078656 | luogu_bot1 | F | June 4, 2019, 9:47 a.m. | OK | GNU C++11 | TESTS | 142 | 2496 | 97587200 | 3400 | |
55205277 | nekochen | F | June 6, 2019, 12:18 p.m. | OK | GNU C++11 | TESTS | 142 | 2604 | 24576000 | 3400 | |
55006032 | luogu_bot3 | F | June 3, 2019, 7:34 a.m. | OK | GNU C++11 | TESTS | 142 | 2667 | 97075200 | 3400 | |
55005601 | Connected_failed | F | June 3, 2019, 7:20 a.m. | OK | GNU C++11 | TESTS | 142 | 2667 | 97075200 | 3400 | |
55006134 | luogu_bot4 | F | June 3, 2019, 7:37 a.m. | OK | GNU C++11 | TESTS | 142 | 2667 | 97075200 | 3400 | |
54359200 | frodakcin | F | May 18, 2019, 7:26 p.m. | OK | GNU C++11 | TESTS | 142 | 2682 | 128102400 | 3400 | |
56073386 | ilnil | F | June 26, 2019, 11:39 a.m. | OK | GNU C++11 | TESTS | 142 | 2683 | 28364800 | 3400 | |
54456907 | FizzyDavid | F | May 21, 2019, 4:22 p.m. | OK | GNU C++14 | TESTS | 142 | 1372 | 97587200 | 3400 | |
54577429 | yasugongshang | F | May 25, 2019, 1:02 a.m. | OK | GNU C++14 | TESTS | 142 | 1638 | 56115200 | 3400 | |
54403394 | gtrhetr | F | May 20, 2019, 3:37 a.m. | OK | GNU C++14 | TESTS | 142 | 1652 | 194764800 | 3400 | |
54404240 | ZoeySpencer | F | May 20, 2019, 4:41 a.m. | OK | GNU C++14 | TESTS | 142 | 1652 | 194764800 | 3400 | |
55610930 | ReaLNero1 | F | June 16, 2019, 5:40 a.m. | OK | GNU C++14 | TESTS | 142 | 1669 | 56115200 | 3400 | |
54049931 | Benq | F | May 12, 2019, 7:29 p.m. | OK | GNU C++14 | TESTS | 142 | 2152 | 2764800 | 3400 | |
54045740 | ecnerwala | F | May 12, 2019, 4:32 p.m. | OK | GNU C++14 | TESTS | 142 | 2511 | 40345600 | 3400 | |
54047144 | jtnydv25 | F | May 12, 2019, 5:52 p.m. | OK | GNU C++14 | TESTS | 142 | 2651 | 36249600 | 3400 | |
58653402 | Libitina | F | Aug. 12, 2019, 8:18 a.m. | OK | GNU C++14 | TESTS | 142 | 2760 | 96972800 | 3400 | |
54585843 | Maripium | F | May 25, 2019, 6:50 a.m. | OK | GNU C++14 | TESTS | 142 | 2963 | 73625600 | 3400 | |
54475842 | Cyanic | F | May 22, 2019, 8:25 a.m. | OK | GNU C++17 | TESTS | 142 | 2246 | 144793600 | 3400 | |
54475860 | Cyanic | F | May 22, 2019, 8:26 a.m. | OK | GNU C++17 | TESTS | 142 | 2277 | 144793600 | 3400 | |
55801987 | Shayan.P | F | June 19, 2019, 7:34 p.m. | OK | GNU C++17 | TESTS | 142 | 2308 | 36454400 | 3400 | |
54047665 | isaf27 | F | May 12, 2019, 6:05 p.m. | OK | GNU C++17 | TESTS | 142 | 2339 | 121344000 | 3400 | |
55802070 | Shayan.P | F | June 19, 2019, 7:37 p.m. | OK | GNU C++17 | TESTS | 142 | 2340 | 36454400 | 3400 | |
57202818 | Antoine | F | July 17, 2019, 2:19 p.m. | OK | GNU C++17 | TESTS | 142 | 2340 | 48947200 | 3400 | |
54709036 | Drew_is_me | F | May 27, 2019, 7:16 a.m. | OK | GNU C++17 | TESTS | 142 | 2573 | 41881600 | 3400 | |
54470959 | burhonbaqoyev | F | May 22, 2019, 5:26 a.m. | OK | GNU C++17 | TESTS | 142 | 2589 | 128102400 | 3400 | |
54347755 | mayaohua2003 | F | May 18, 2019, 1:17 p.m. | OK | GNU C++17 | TESTS | 142 | 2605 | 85606400 | 3400 | |
54347659 | mayaohua2003 | F | May 18, 2019, 1:15 p.m. | OK | GNU C++17 | TESTS | 142 | 2745 | 60928000 | 3400 | |
54698378 | mmaxio | F | May 26, 2019, 8:33 p.m. | OK | Java 8 | TESTS | 142 | 1840 | 38092800 | 3400 | |
54698077 | mmaxio | F | May 26, 2019, 8:21 p.m. | OK | Java 8 | TESTS | 142 | 1871 | 38092800 | 3400 | |
54698053 | mmaxio | F | May 26, 2019, 8:20 p.m. | OK | Java 8 | TESTS | 142 | 2667 | 38092800 | 3400 | |
54698016 | mmaxio | F | May 26, 2019, 8:18 p.m. | OK | Java 8 | TESTS | 142 | 4820 | 38092800 | 3400 | |
54066935 | Dukkha | F | May 13, 2019, 1:57 p.m. | OK | Java 8 | TESTS | 142 | 5537 | 38912000 | 3400 |
Back to search problems