B. 下一个排列(愚人节比赛)

    Type: Default 1000ms 256MiB

下一个排列(愚人节比赛)

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

给出一个正整数n,和一个长度为n的排列A,求这个排列的下一个排列。