1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 import java.util.Scanner; import java.util.LinkedList; import java.util.Queue; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int k = scan.nextInt(); int j = 1; Queue que = new LinkedList(); for (int i=1;i 1) { for (int q = 1; q