import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Comparator; import java.util.PriorityQueue; public class Main { // public static List k = new ArrayList(); public static PriorityQueue lens = new PriorityQueue(1, new MyComparator()); // public static HashMap cutNum = new HashMap(); public static int maxK = (int) 5e5; public static void main(String[] args){ BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); try{ int n = Integer.parseInt(input.readLine().trim()); String tmp0[] = input.readLine().trim().split(" "); int q = Integer.parseInt(input.readLine().trim()); String tmp1[] = input.readLine().trim().split(" "); int[] cutNum = new int[q]; double[] res = new double[maxK]; double[] len = new double[n]; for(int i=0; i { public int compare(Pair obj1, Pair obj2) { Pair p1 = obj1; Pair p2 = obj2; if(p1.d < p2.d) { return 1; } else if(p1.d > p2.d) { return -1; } else{ return 0; } } }