cf/mirror

Longest k-Good Segment

CF
616D1600· expert1s256 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
5 5
1 2 3 4 5
Output
1 5
Sample 2of 3
Input
9 3
6 5 1 2 3 2 1 4 5
Output
3 7
Sample 3of 3
Input
3 1
1 2 3
Output
1 1
616D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)