Fools and Foolproof Roads
362D2100· master1s256 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
9 6 2 21 2 23 2 14 6 201 3 87 8 35 7 2
Output
YES9 51 9
Sample 2of 3
Input
2 0 1 2
Output
NO
Sample 3of 3
Input
2 0 0 2
Output
YES
58%
362D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…