杭电1205
1 #include<stdio.h> 2 3 int main() 4 { 5 int n,m; 6 long long x,s,maxx; 7 while(~scanf("%d",&n)) 8 { 9 while(n--) 10 { 11 scanf("%d",&m); 12 s=0; 13 maxx=0; 14 while(m--) 15 { 16 scanf("%lld",&x); 17 if(x>maxx) 18 maxx=x; 19 s+=x; 20 } 21 if(s+1>=2*maxx) 22 printf("Yes\n"); 23 else 24 printf("No\n"); 25 } 26 } 27 }