acmsguru |
---|
Finished |
Yes" or "
No" (without the quotes) depending on whether the courier's assignment can be completed while passing each gate exactly once. In case it is possible, the second line of the file should contain 4· N integers, separated by spaces: the numbers of the gates in the order the courier passes them. If there are several solutions, output any one of them.
sample input | sample output |
4 1 9 2 10 3 13 4 8 5 11 6 14 7 16 15 12 | Yes 1 3 13 14 16 15 12 9 10 11 5 6 7 8 4 2 |
Name |
---|