Ghost Leg
Jump to navigation
Jump to search
This problem gives us a ladder (much akin to a mini-game from the original mario party!) and asks us what permutation it forms. We can simulate this quite easily. Generate an array of size n, where a[i]=i. Then for each rung m, swap the two corresponding elements. WHen we're done, print out the remaining array.