cf/mirror

How Many Squares?

CF
11C2200· master2s64 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
2
8 8
00010001
00101000
01000100
10000010
01000100
00101000
11010011
11000011
10 10
1111111000
1000001000
1011001000
1011001010
1000001101
1001001010
1010101000
1001001000
1000001000
1111111000
Output
1
2
Sample 2of 2
Input
1
12 11
11111111111
10000000001
10111111101
10100000101
10101100101
10101100101
10100000101
10100000101
10111111101
10000000001
11111111111
00000000000
Output
3
11C.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)