Educational Codeforces Round 114 (Rated for Div. 2)

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
1574 Educational Codeforces Round 114 (Rated for Div. 2) FINISHED False 7200 144257123 Sept. 20, 2021, 2:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 740 ) F Occurrences PROGRAMMING combinatorics dp dsu fft graphs

A subarray of array (a) from index (l) to the index (r) is the array (a_l, a_{l+1}, \dots, a_{r}). The number of occurrences of the array (b) in the array (a) is the number of subarrays of (a) such that they are equal to (b). You are given (n) arrays (A_1, A_2, \dots, A_n); the elements of these arrays are integers from (1) to (k). You have to build an array (a) consisting of (m) integers from (1) to (k) in such a way that, for every given subarray (A_i), the number of occurrences of (A_i) in the array (a) is not less than the number of occurrences of each non-empty subarray of (A_i) in (a). Note that if (A_i) doesn't occur in (a), and no subarray of (A_i) occurs in (a), this condition is still met for (A_i). Your task is to calculate the number of different arrays (a) you can build, and print it modulo (998244353). The first line contains three integers (n), (m) and (k) ((1 \le n, m, k \le 3 \cdot 10^5)) — the number of the given arrays, the desired length of the array (a), and the upper bound on the values in the arrays. Then (n) lines follow. The (i)-th line represents the array (A_i). The first integer in the (i)-th line is (c_i) ((1 \le c_i \le m)) — the number of elements in (A_i); then, (c_i) integers from (1) to (k) follow — the elements of the array (A_i). Additional constraint on the input: (\sum\limits_{i=1}^n c_i \le 3 \cdot 10^5); i. e., the number of elements in the given arrays in total does not exceed (3 \cdot 10^5). Print one integer — the number of different arrays (a) you can build, taken modulo (998244353).

Tutorials

95188

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
129462175 vaxialg F Sept. 21, 2021, 6 a.m. OK GNU C++14 TESTS 79 919 30720000
129448141 Suiseiseki F Sept. 21, 2021, 1:50 a.m. OK GNU C++14 TESTS 79 936 154316800
129461996 vaxialg F Sept. 21, 2021, 5:57 a.m. OK GNU C++14 TESTS 79 982 31948800
129447740 harryzhr F Sept. 21, 2021, 1:39 a.m. OK GNU C++14 TESTS 79 1014 14848000
129452459 3rdeye F Sept. 21, 2021, 3:20 a.m. OK GNU C++14 TESTS 79 1029 169267200
129454965 Mr_Eight F Sept. 21, 2021, 4:05 a.m. OK GNU C++14 TESTS 79 1403 49152000
129449481 dottle F Sept. 21, 2021, 2:23 a.m. OK GNU C++14 TESTS 79 1497 456806400
129451727 dottle F Sept. 21, 2021, 3:06 a.m. OK GNU C++14 TESTS 79 1559 456806400
129428443 freakin23 F Sept. 20, 2021, 6:12 p.m. OK GNU C++14 TESTS 53 1965 25804800
129424466 dlalswp25 F Sept. 20, 2021, 5:34 p.m. OK GNU C++14 TESTS 53 2184 31539200
129427228 bgrm F Sept. 20, 2021, 6 p.m. OK GNU C++17 TESTS 53 561 17100800
129424066 DrSwad F Sept. 20, 2021, 5:30 p.m. OK GNU C++17 TESTS 53 811 34304000
129418798 hoangthilinhhuong1 F Sept. 20, 2021, 4:52 p.m. OK GNU C++17 TESTS 53 904 26624000
129418298 MoRanSky F Sept. 20, 2021, 4:49 p.m. OK GNU C++17 TESTS 53 1356 11571200
129459000 LZDQ F Sept. 21, 2021, 5:14 a.m. OK GNU C++17 TESTS 79 1357 45056000
129454978 Mr_Eight F Sept. 21, 2021, 4:06 a.m. OK GNU C++17 TESTS 79 1418 49152000
129443345 abeker F Sept. 20, 2021, 11:04 p.m. OK GNU C++17 TESTS 79 1419 41267200
129452143 CuCl2 F Sept. 21, 2021, 3:14 a.m. OK GNU C++17 TESTS 79 1435 21811200
129423130 JhonnyZaz F Sept. 20, 2021, 5:22 p.m. OK GNU C++17 TESTS 53 1450 47718400
129457411 DerekFeng F Sept. 21, 2021, 4:48 a.m. OK GNU C++17 TESTS 79 1497 20275200
129446406 xay5421 F Sept. 21, 2021, 12:58 a.m. OK GNU C++17 (64) TESTS 79 374 27648000
129454342 Myukiyomekya F Sept. 21, 2021, 3:54 a.m. OK GNU C++17 (64) TESTS 79 451 62259200
129444611 enslaved F Sept. 20, 2021, 11:54 p.m. OK GNU C++17 (64) TESTS 79 499 42905600
129455335 200815147 F Sept. 21, 2021, 4:13 a.m. OK GNU C++17 (64) TESTS 79 530 12185600
129420629 rainboy F Sept. 20, 2021, 5:04 p.m. OK GNU C++17 (64) TESTS 53 561 36352000
129428900 eriksuenderhauf F Sept. 20, 2021, 6:17 p.m. OK GNU C++17 (64) TESTS 53 561 112947200
129419280 sjc061031 F Sept. 20, 2021, 4:55 p.m. OK GNU C++17 (64) TESTS 53 576 58470400
129450889 qiuzx F Sept. 21, 2021, 2:50 a.m. OK GNU C++17 (64) TESTS 79 577 47616000
129442194 xyz. F Sept. 20, 2021, 10:21 p.m. OK GNU C++17 (64) TESTS 53 639 33894400
129443335 trainwithoutpain F Sept. 20, 2021, 11:03 p.m. OK GNU C++17 (64) TESTS 79 670 46080000
129418661 azukun F Sept. 20, 2021, 4:51 p.m. OK .NET Core C# TESTS 53 3338 121856000
129449841 kobae964 F Sept. 21, 2021, 2:30 a.m. OK Rust TESTS 79 1294 56115200

remove filters

Back to search problems