# include <iostream>//找规律
# include <iomanip>
using namespace std;
int main(){
int m;
int n;
double a, max, total;
cin>>m;
for(int i = 0; i < m; i++){
cin>>n;
cin>>a;
max = a;
total = a;
for(int j = 1; j < n; j++){
cin>>a;
if(a > max){
max = a;
}
total += a;
}
if(total - max + 1 >= max){
cout<<"Yes"<<endl;
}else{
cout<<"No"<<endl;
}
}
}
hdoj1205简单题、模拟题
最新推荐文章于 2017-12-20 14:18:55 发布