cf/mirror

Candy Box (hard version)

CF
1183G2000· candidate master2s256 MB⌨ stdin/stdout

Examples

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