cf/mirror

Rainbow Rectangles

CF
1396D3300· legendary gm4s512 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
4 2 4
3 2 2
3 1 1
1 1 1
1 2 1
Output
20
Sample 2of 3
Input
5 3 10
6 5 3
5 3 1
7 9 1
2 3 2
5 0 2
Output
300
Sample 3of 3
Input
10 4 10
5 4 4
0 0 3
6 0 1
3 9 2
8 7 1
8 1 3
2 1 3
6 3 2
3 5 3
4 3 4
Output
226
1396D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)