cf/mirror

Numbers on Tree

CF
1286B1800· expert1s256 MB⌨ stdin/stdout

Examples

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