cf/mirror

Greedy Grid Counting

CF
2122E2600· international gm4s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
3
4 3
2 1 -1 2
2 -1 1 3
5 4
1 3 -1 4 2
-1 3 4 2 -1
10 10
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1
Output
6
64
123782927
2122E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)