importjava.util.Scanner;publicclassMain{publicstaticvoidmain(String[] args){Scanner sc =newScanner(System.in);int n = sc.nextInt();int q = sc.nextInt();int[] res =newint[n];for(int i=0;i<n;i++)
res[i]= sc.nextInt();while(q--!=0){int m = sc.nextInt();//先找左端点再找右端点int l =0,r = n-1;while(l<r){int mid =(l+r)/2;if(res[mid]>=m) r = mid;else l = mid +1;}//l和r相等if(res[l]== m){System.out.print(l+" ");//缩小搜索范围到(左端点到n-1)
r = n-1;while(l<r){int mid =(l+r+1)/2;//+1if(res[mid]<=m) l = mid;else r = mid-1;}System.out.println(r);}else{System.out.println("-1 -1");}}}}
importjava.util.Scanner;publicclassMain{publicstaticvoidmain(String[] args){Scanner sc =newScanner(System.in);double n = sc.nextDouble();double l =-10000,r =10000;while((r-l)>1e-8){//保留6位多写两位double mid =(l+r)/2;if((mid*mid*mid)>= n) r = mid;//!!else l = mid;}System.out.printf("%.6f",l);}}