#include using namespace std; #define MAX 1000003 #define tiny 0.000000001 #define pi acos(-1) int N,F; int r[MAX]; bool check(double x){ double np=0;//number of person for(int i=1;i<=N;i++){ np+= double (r[i]*r[i]/x); } if(np >= (F+1)) return true; else return false; } int main(){ ios::sync_with_stdio(0); cin.tie(0); int n; cin>>n; double upper=MAX*10,lower=tiny; double x; while(n--){ cin>>N>>F; for(int i=1;i<=N;i++) cin>>r[i]; //mergeSort(r,1,N); while(upper - lower > tiny){ x=double((upper+lower)/2); if(check(x)) lower=x; else upper=x; } cout<