Linear Kingdom Races
115E2400· grandmaster3s256 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
7 432321231 2 52 3 53 5 37 7 5
Output
4
Sample 2of 3
Input
2 1031 2 5
Output
2
Sample 3of 3
Input
3 11010101 3 10
Output
0
58%
115E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)