Oolimry and Suffix Array
1526E2400· grandmaster1s256 MB⌨ stdin/stdout
Examples
Sample 1of 4
Input
3 20 2 1
Output
1
Sample 2of 4
Input
5 10 1 2 3 4
Output
0
Sample 3of 4
Input
6 2000000 1 2 3 4 5
Output
822243495
Sample 4of 4
Input
7 63 2 4 1 0 5 6
Output
36
58%
1526E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)