由原来的队列经过一系列操作后可以得到[1,2,3,4.....n]这样的队列,那么把所有的操作逆向回去,就能由[1,2,3,4,.....n]得到原来的队列。 from collections import deque T = int(input()) while(T): n = int(input()) queue = deque() res = deque([i for i in range(1,n+1)]) #res = [1,2,3,4,5,6,7...n] while(res): target = res.pop(...