Codeforces Round 723 (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
1526 Codeforces Round 723 (Div. 2) FINISHED False 9000 115142111 May 28, 2021, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1081 ) E Oolimry and Suffix Array PROGRAMMING combinatorics constructive algorithms math string suffix structures

B'Once upon a time, Oolimry saw a suffix array. He wondered how many strings can produce this suffix array. More formally, given a suffix array of length n and having an alphabet size k , count the number of strings that produce such a suffix array. Let s be a string of length n . Then the i -th suffix of s is the substring s[i ldots n-1] . A suffix array is the array of integers that represent the starting indexes of all the suffixes of a given string, after the suffixes are sorted in the lexicographic order. For example, the suffix array of oolimry is [3,2,4,1,0,5,6] as the array of sorted suffixes is [ texttt{imry}, texttt{limry}, texttt{mry}, texttt{olimry}, texttt{oolimry}, texttt{ry}, texttt{y}] . A string x is lexicographically smaller than string y , if either x is a prefix of y (and x neq y ), or there exists such i that x_i < y_i , and for any 1 <= q j < i , x_j = y_j . The first line contain 2 integers n and k ( 1 <= q n <= q 200000,1 <= q k <= q 200000 ) -- the length of the suffix array and the alphabet size respectively. The second line contains n integers s_0, s_1, s_2, ldots, s_{n-1} ( 0 <= q s_i <= q n-1 ) where s_i is the i -th element of the suffix array i.e. the starting position of the i -th lexicographically smallest suffix. It is guaranteed that for all 0 <= q i< j <= q n-1 , s_i neq s_j . Print how many strings produce such a suffix array. Since the number can be very large, print the answer modulo 998244353 . In the first test case, "abb" is the only possible solution. In the second test case, it can be easily shown no possible strings exist as all the letters have to be equal. In the fourth test case, one possible string is "ddbacef". Please remember to print your answers modulo 998244353 . '...

Tutorials

Codeforces Round #723 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
117710333 mao_zx E May 28, 2021, 11:45 p.m. OK GNU C++11 TESTS 43 46 9625600
117713641 Huah E May 29, 2021, 1:28 a.m. OK GNU C++11 TESTS 43 62 4812800
117693634 pikapikachu E May 28, 2021, 6:11 p.m. OK GNU C++11 TESTS 43 62 4812800
117697958 pikapikachu E May 28, 2021, 6:54 p.m. OK GNU C++11 TESTS 43 77 9625600
117693522 pikapikachu E May 28, 2021, 6:10 p.m. OK GNU C++11 TESTS 43 78 4812800
117708261 Dan13llljws E May 28, 2021, 10:14 p.m. OK GNU C++11 TESTS 43 124 4812800
117711488 syksykCCC E May 29, 2021, 12:31 a.m. OK GNU C++11 TESTS 43 155 16076800
117719181 davi0015 E May 29, 2021, 3:08 a.m. OK GNU C++14 TESTS 43 78 1638400
117685093 d_quynh_2811 E May 28, 2021, 5:10 p.m. OK GNU C++14 TESTS 43 78 6451200
117704392 Pato_Donald E May 28, 2021, 8:34 p.m. OK GNU C++14 TESTS 43 78 9625600
117704765 krijgertje E May 28, 2021, 8:42 p.m. OK GNU C++14 TESTS 43 93 6656000
117709126 NaimSS E May 28, 2021, 10:45 p.m. OK GNU C++14 TESTS 43 93 14438400
117725905 ajj E May 29, 2021, 4:56 a.m. OK GNU C++14 TESTS 43 140 24064000
117725525 ajj E May 29, 2021, 4:50 a.m. OK GNU C++14 TESTS 43 155 24064000
117725021 ajj E May 29, 2021, 4:44 a.m. OK GNU C++14 TESTS 43 155 24064000
117702212 Marckess E May 28, 2021, 7:55 p.m. OK GNU C++14 TESTS 43 264 9625600
117689852 2qbingxuan E May 28, 2021, 5:39 p.m. OK GNU C++17 TESTS 43 77 1638400
117702768 fxhd E May 28, 2021, 8:04 p.m. OK GNU C++17 TESTS 43 77 3174400
117700499 magnus.hegdahl E May 28, 2021, 7:29 p.m. OK GNU C++17 TESTS 43 77 3174400
117698980 xzyyy E May 28, 2021, 7:08 p.m. OK GNU C++17 TESTS 43 77 8089600
117715613 tlnllkbp E May 29, 2021, 1:53 a.m. OK GNU C++17 TESTS 43 78 6451200
117696084 eggag32 E May 28, 2021, 6:34 p.m. OK GNU C++17 TESTS 43 78 7987200
117695988 deepspacewaifour E May 28, 2021, 6:33 p.m. OK GNU C++17 TESTS 43 78 7987200
117717621 Codeforces_is_rubbish E May 29, 2021, 2:38 a.m. OK GNU C++17 TESTS 43 78 9113600
117685419 user14767553 E May 28, 2021, 5:11 p.m. OK GNU C++17 TESTS 43 93 11468800
117686038 6945932016PhongNT E May 28, 2021, 5:14 p.m. OK GNU C++17 TESTS 43 93 19251200
117702130 irri E May 28, 2021, 7:54 p.m. OK GNU C++17 (64) TESTS 43 61 4812800
117696802 _su1sen E May 28, 2021, 6:41 p.m. OK GNU C++17 (64) TESTS 43 61 6451200
117702527 imbr92 E May 28, 2021, 8 p.m. OK GNU C++17 (64) TESTS 43 61 11264000
117698947 izlyforever E May 28, 2021, 7:08 p.m. OK GNU C++17 (64) TESTS 43 62 1638400
117711626 ToToMI E May 29, 2021, 12:36 a.m. OK GNU C++17 (64) TESTS 43 62 2457600
117691810 emorgan5289 E May 28, 2021, 5:54 p.m. OK GNU C++17 (64) TESTS 43 62 2457600
117688005 huangxiaohua E May 28, 2021, 5:26 p.m. OK GNU C++17 (64) TESTS 43 62 4710400
117711367 froggyzhang E May 29, 2021, 12:26 a.m. OK GNU C++17 (64) TESTS 43 62 4812800
117699250 neal E May 28, 2021, 7:12 p.m. OK GNU C++17 (64) TESTS 43 62 5632000
117697699 clam E May 28, 2021, 6:51 p.m. OK GNU C++17 (64) TESTS 43 62 5632000
117704712 YahiaSherif E May 28, 2021, 8:40 p.m. OK Java 8 TESTS 43 810 2764800
117697835 rpashuto E May 28, 2021, 6:53 p.m. OK PyPy 3 TESTS 43 327 14233600
117686414 errorgorn E May 28, 2021, 5:16 p.m. OK PyPy 3 TESTS 43 327 14233600
117724851 SPD_9X2 E May 29, 2021, 4:41 a.m. OK PyPy 3 TESTS 43 561 54374400
117725684 sh1194 E May 29, 2021, 4:53 a.m. OK Python 3 TESTS 43 514 14028800

remove filters

Back to search problems