class Solution {
public:
/**
*
* @param arr int整型vector
* @return int整型
*/
int Answerofjudge(vector<int>& arr) {
// write code here
int i;
double sum=0;
for(i=0;i<arr.size();i++)
{
sum+=arr[i];
}
sort(arr.begin(),arr.end());
double mid;
if(arr.size()&1)mid=arr[arr.size()/2];
else mid=(arr[arr.size()/2]+arr[arr.size()/2-1])/2.0;</int>

    int x=-1;
    if(mid>sum/arr.size())
        x=1;
    else if(fabs(sum/arr.size()-mid)<1e-8)
       x=0;
    return x;
}

};