Lexicographic Partition
2124I3500· legendary gm2s256 MB⌨ stdin/stdout
Examples
Sample 1of 1
Input
831 2 221 131 2 131 2 341 2 2 441 2 3 351 2 3 2 391 2 3 4 5 4 5 6 6
Output
YES1 2 3NONOYES3 1 2NOYES3 1 2 4YES1 4 3 5 2YES5 2 1 8 6 9 3 4 7
58%
2124I.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…