Rae Taylor and Trees (hard version)
2171F1600· expert3s256 MB⌨ stdin/stdout
Examples
Sample 1of 1
Input
961 3 4 5 2 643 4 1 254 3 5 1 241 2 3 474 3 5 7 6 2 162 4 6 1 3 532 1 342 4 1 364 2 6 5 1 3
Output
Yes3 14 16 56 26 1NoNoYes2 14 34 1NoYes4 26 23 15 15 2Yes3 23 1Yes4 23 13 2Yes6 46 23 15 42 3
58%
2171F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…