| acmsguru |
|---|
| Finished |
ip jp", where p > 0 is a number of pairs selected at the current step, is js are the indices of elements in the s-th pair (is ≠ js, indices of elements in distinct pairs must be distinct). The elements are indexed by integers from 1 to n according to their positions in the array at the current step. The order of pairs and the order of elements in pairs are unimportant. If there are multiple solutions with the minimum number of steps, output any. sample input | sample output |
3 1 2 3 | 0 |
sample input | sample output |
5 5 4 3 2 1 | 1 2 1 5 2 4 |
sample input | sample output |
4 3 1 2 2 | 2 2 1 2 3 4 1 4 2 |
| Name |
|---|


