一个长度为n的整数序列,a_1,...,a_n。然后考虑在一个空序列b上进行n次以下操作: 1、将a_i放入b序列的末尾 2、逆置b序列,输出操作n次的b序列。
public class Test7 { public static void main(String[] args) { Scanner in = new Scanner(System.in); while (in.hasNextInt()) { int n = in.nextInt(); int[] nums = n...
转载
2018-03-26 21:22:28 ·
6721 阅读 ·
0 评论