cf/mirror

Maximum Diameter Graph

CF
1082D1800· expert2s256 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
3
2 2 2
Output
YES 2
2
1 2
2 3
Sample 2of 3
Input
5
1 4 1 1 1
Output
YES 2
4
1 2
3 2
4 2
5 2
Sample 3of 3
Input
3
1 1 1
Output
NO
1082D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…