cf/mirror

Tree Constructing

CF
1003E2100· master4s256 MB⌨ stdin/stdout

Examples

Sample 1of 4
Input
6 3 3
Output
YES
3 1
4 1
1 2
5 2
2 6
Sample 2of 4
Input
6 2 3
Output
NO
Sample 3of 4
Input
10 4 3
Output
YES
2 9
2 10
10 3
3 1
6 10
8 2
4 3
5 6
6 7
Sample 4of 4
Input
8 5 3
Output
YES
2 5
7 2
3 7
3 1
1 6
8 7
4 3
1003E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…