Comment Comment by im2w1l I think it may helpful to decompose the permutation into circles, and create an equation system of time left from different states. parent im2w1l 10 years ago