package no417; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.InputMismatchException; import java.util.NoSuchElementException; public class Main { static int n; static int t; static int[] x; static int[][] sum; static ArrayList[] tree; public static final int INF = 1 << 29; @SuppressWarnings("unchecked") public static void main(String[] args) { IO io = new IO(); n = io.nextInt(); t = io.nextInt(); x = io.nextIntArray(n); tree = new ArrayList[n]; for(int i=0;i(); for(int i=0;i Integer.MAX_VALUE) { throw new NumberFormatException(); } return (int) nl; } public char nextChar() { if (!hasNext()) { throw new NoSuchElementException(); } return (char) readByte(); } public double nextDouble() { return Double.parseDouble(next());} public int[] nextIntArray(int n) { int[] a = new int[n]; for(int i=0;i