cf/mirror

Flower-like Pseudotree

CF
1868D3000· legendary gm3s512 MB⌨ stdin/stdout

Examples

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