acmsguru |
---|
Finished |
NO" (quotes for clarity only). Otherwise, the first line should contain string "
YES", the second line should contain the number of elementary transformations in your solution, and the following lines should describe those transformations. Each transformation should be described by exactly one number — the index of the vertex of this transformation. If there are several answers with the minimal number of transformations, output any of them.
sample input | sample output |
4 3 1 3 -1 -1 2 3 -1 -1 3 4 1 1 | YES 1 3 |
sample input | sample output |
3 3 1 2 1 1 2 3 1 1 1 3 1 1 | NO |
Name |
---|