cf/mirror

Simultaneous Coloring

CF
1989F3000· legendary gm6s512 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
2 2 4
1 1 R
2 2 R
1 2 B
2 1 B
Output
0
0
0
16
Sample 2of 2
Input
3 5 10
1 1 B
2 5 B
2 2 B
2 3 R
2 1 B
3 2 R
3 3 B
1 2 R
1 3 B
3 1 B
Output
0
0
0
0
0
0
16
16
25
25
1989F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…