Runtime Error in SPOJ- PIE

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define sd(x) scanf("%d", &x)
#define pf(x) printf("%d",&x)
typedef vector< int > vi;
typedef vector< vi > vvi;
typedef pair< int,int > ii;
#define sz(a) int((a).size())
#define pb push_back
#define all© ©.begin(),©.end()
#define rall© c.rbegin(), c.rend()
#define tr(c,i) for(typeof(©.begin() i = ©.begin(); i != ©.end(); i++)
#define present(c,x) (©.find(x) != ©.end())
#define cpresent(c,x) (find(all©,x) != ©.end())
bool check(long double mid,const vector&volume,int F,int N){
int count=0;
for(int i=0;i<N && mid!=0;i++){
count+=(int)volume[i]/mid;
}
if((int)count>F)
return true;
else
return false;

}

long double optimalVolume(const vector&volume,int F,int N,long double MAX){
F=F+1;
long double lo=0,hi=MAX,mid;
int iter=100;
while(iter–){
mid= (lo+hi)/2;
if(check(mid,volume,F,N))
lo=mid;
else
hi=mid;
}
return mid;
}

int main(){
int T;
cin>>T;
int N,F;
double pi=acos(-1);
while(T–){

    cin>>N>>F;
    vi radius;int radii;
    radius.reserve(N);
    while(N--){
        cin>>radii;
        radius.pb(radii);
    }
    vector<long double> volume;
    for(int i=0;i<N;i++){
        volume[i]=pi*pow(radius[i],2)*(long double)1;
    }
    sort(all(volume));
    long double MAX=volume[N-1];
    long double optV=optimalVolume(volume,F,N,MAX);
    printf("%.4Lf",optV);
   

}
return 0;

}