public static void main(String[] args){ Scanner scan=new Scanner(System.in); int[] arr=new int[scan.nextInt()]; scan.nextLine(); for(int i=0;i<arr.length;i++) arr[i]=scan.nextInt(); int[] solution=new int[scan.nextInt()]; scan.nextLine()...