Build a Tree and That Is It
1714F1900· candidate master2s256 MB⌨ stdin/stdout
Examples
Sample 1of 1
Input
95 1 2 15 2 2 25 2 2 35 2 2 45 3 2 34 2 1 14 3 1 14 1 2 37 1 4 1
Output
YES1 24 13 12 5YES4 32 51 55 3NOYES2 44 12 55 3YES5 44 12 53 5YES2 33 41 3NOYES4 31 22 4NO
58%
1714F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…