import java.util.*; import java.io.*; public class Main { void solve (FastScanner in, PrintWriter out) { int n = in.nextInt(), m = in.nextInt(); LinkedList turn = new LinkedList<>(); for (int i=0; i 0) { turn.add(i, String.valueOf(drawNum)); drawNum = 0; } } drawNum = 0; for (int i=0; i 0) { turn.add(i, String.valueOf(drawNum)); drawNum = 0; } } // turn.forEach(e->System.out.println(e)); int next = 0; //次は誰の番か int[] num = new int[n]; //i番目の参加者は何枚カードを持っているか int[] draw = new int[n]; boolean reverse = false; for (int i=0; i