public void run() { Locale.setDefault(Locale.US); try { sc = new FastScanner(System.in); out = new PrintWriter(System.out); solve(); sc.close(); out.close(); } catch (Throwable e) { e.printStackTrace(); System.exit(1); } }
static void test() { int q = 0; while (true) { if (++q == 100) { System.err.println("Test"); q = 0; } int[] a = new int[rand.nextInt(100000) + 1]; for (int i = 0; i < a.length; i++) { a[i] = rand.nextInt(100); } int e = rand.nextInt(5) + 1; for (int i = 0; i < e; i++) { a[rand.nextInt(a.length)] = allLucky.get(rand.nextInt(allLucky.size())); } solve(a); } }
public static void main(String[] args) throws IOException, InterruptedException { try (D d = new D()) { d.solve(); } }