cf/mirror

How Does the Rook Move?

CF
1957C1600· expert2s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
3
4 1
1 2
8 1
7 6
1000 4
4 4
952 343
222 333
90 91
Output
3
331
671968183
1957C.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)