cf/mirror

Make Square

CF
1028H2900· international gm7s1024 MB⌨ stdin/stdout
#math

Examples

Sample 1of 1
Input
10 10
34 37 28 16 44 36 43 50 22 13
1 3
4 8
6 10
9 10
3 10
8 9
5 6
1 4
1 7
2 6
Output
2
0
1
3
0
1
1
1
0
0
1028H.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)