Permutation Commutation
2237E2000· candidate master2s256 MB⌨ stdin/stdout
Examples
Sample 1of 1multi-test • hover to link
Input
1232 3 1-1 -1 -142 1 4 3-1 -1 4 -142 1 4 33 1 -1 -142 1 4 31 -1 -1 252 3 1 5 42 -1 -1 -1 -152 3 1 5 44 -1 -1 -1 -162 3 1 5 6 44 -1 -1 -1 -1 -162 1 4 3 6 5-1 3 -1 -1 -1 -163 5 6 2 1 4-1 -1 -1 3 6 -172 3 1 5 4 6 7-1 -1 -1 -1 -1 7 -182 3 4 1 6 7 8 55 7 -1 -1 -1 -1 -1 -182 3 4 1 6 7 8 55 -1 -1 -1 -1 -1 -1 -1
Output
YES1 2 3YES1 2 4 3NONOYES2 3 1 4 5NOYES4 5 6 1 2 3YES4 3 1 2 5 6NOYES1 2 3 4 5 7 6NOYES5 6 7 8 1 2 3 4
58%
2237E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…