cf/mirror

Fair

CF
986A1600· expert2s512 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
5 5 4 3
1 2 4 3 2
1 2
2 3
3 4
4 1
4 5
Output
2 2 2 2 3
Sample 2of 2
Input
7 6 3 2
1 2 3 3 2 2 1
1 2
2 3
3 4
2 5
5 6
6 7
Output
1 1 1 2 2 1 1
986A.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…