import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.util.Scanner; public class Main { static int n; static int arr[] = new int [100001]; //static BufferedWriter bw; private static FastIO io; public static void main(String[] args) throws IOException { // TODO Auto-generated method stub /..