import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; public class Main { public static List k = new ArrayList(); public static HashMap lens = new HashMap(); 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(" "); double[] l = new double[n]; // double[] k = new double[q]; for(int i=0; i= k.size()){ min = lens.get(k.get(k.size()-1)); k.add(newk); }else{ min = lens.get(k.get(idx-1)); max = lens.get(k.get(idx)); k.add(idx, newk); } double len = getLen(l, n, newk, min, max); System.out.println(len); lens.put(newk, len); } }catch(IOException e){ e.printStackTrace(); } } public static double getLen(double[] l, int n, double k, double min, double max){ double len = 0; long cut; while(max - min > 1e-9){ len = (min+max)/2.0; cut = 0; for(int j=0; j