cf/mirror

Turtle vs. Rabbit Race: Optimal Trainings

CF
1933E1500· specialist5s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
5
6
3 1 4 1 5 9
3
1 8
2 7
5 9
1
10
1
1 1
9
5 10 9 6 8 3 10 7 3
5
8 56
1 12
9 3
1 27
5 45
5
7 9 2 5 2
10
1 37
2 9
3 33
4 32
4 15
2 2
4 2
2 19
3 7
2 7
10
9 1 6 7 6 3 10 7 3 10
5
10 43
3 23
9 3
6 8
5 14
Output
3 4 5
1
9 2 9 4 9
5 2 5 5 5 2 4 5 4 2
10 6 9 7 7
1933E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)