cf/mirror

Interactive Game with Coloring

CF
1879E2400· grandmaster2s512 MB⇄ interactive

Examples

Sample 1of 3
Input
5
1 1 1 1
0
1
1
Output
1
1 1 1 1
1
Sample 2of 3
Input
4
1 2 3
0
0 1 0
0
1 1 0
0
1 0 1
1
Output
3
3 1 2
2
1
3
Sample 3of 3
Input
3
1 2
0
1 1
1
Output
2
1 2
1
1879E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…