cf/mirror

Rubik's Cube Coloring (hard version)

CF
1594E22300· international master3s256 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
3
2
5 orange
2 white
Output
1024
Sample 2of 3
Input
2
2
1 white
2 white
Output
0
Sample 3of 3
Input
10
3
1 blue
4 red
5 orange
Output
328925088
1594E2.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…