cf/mirror

Appleman and a Sheet of Paper

CF
461C2200· master2s256 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
7 4
1 3
1 2
2 0 1
2 1 2
Output
4
3
Sample 2of 2
Input
10 9
2 2 9
1 1
2 0 1
1 8
2 0 8
1 2
2 1 3
1 4
2 2 4
Output
7
2
10
4
5
461C.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)