cf/mirror

Cutting Game

CF
1974F1900· candidate master3s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
6
4 4 3 2
4 1
3 3
2 4
D 2
R 1
4 4 3 3
4 1
3 2
2 3
D 1
L 1
U 2
3 5 3 2
1 3
2 2
3 3
R 2
R 2
6 4 4 2
1 4
2 3
5 3
1 1
R 1
U 1
9 3 2 1
6 1
3 3
D 8
10 10 2 5
7 5
9 1
R 1
L 2
D 1
U 4
D 1
Output
2 1
2 0
0 3
1 1
2 0
0 1
1974F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)