cf/mirror

Replace the Numbers

CF
1620E1900· candidate master2s256 MB⌨ stdin/stdout

Examples

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