cf/mirror

Counting Rectangles

CF
1722E1600· expert6s256 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
3
2 1
2 3
3 2
1 1 3 4
5 5
1 1
2 2
3 3
4 4
5 5
3 3 6 6
2 1 4 5
1 1 2 10
1 1 100 100
1 1 3 3
3 1
999 999
999 999
999 998
1 1 1000 1000
Output
6
41
9
0
54
4
2993004
1722E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)