CCF|学生排队|Java

import java.util.*;

public class Main
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int m = in.nextInt();
List

        oldp=p;
        temp=a.lastIndexOf(p);

        ((LinkedList<Integer>) a).remove(temp);
        a.add(temp+q,oldp);
    }
    for(int i:a)
    {

        System.out.print(i+" ");
    }
}

}

猜你喜欢

转载自www.cnblogs.com/mokero/p/9642771.html