Counting Rectangles is Fun
372B1900· candidate master4s256 MB⌨ stdin/stdout
Examples
Sample 1of 2
Input
5 5 500101000000000101000000011 2 2 44 5 4 51 2 5 22 2 4 54 2 5 3
Output
1017345
Sample 2of 2
Input
4 7 500001000000010001100000000001 7 2 73 1 3 12 3 4 51 2 2 72 2 4 7
Output
31162752
58%
372B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)