标签:
Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)
Total Submission(s): 26515 Accepted Submission(s): 7533
#include<iostream> #include<cstdio> #include<cstring> #include<string> #include<cmath> #include<cstdlib> #include<algorithm> using namespace std; #define LL long long int tt,n,maxx; LL sum; int main() { int x; scanf("%d",&tt); while(tt--) { sum=0,maxx=0; scanf("%d",&n); for(int i=1;i<=n;i++) { scanf("%d",&x); sum+=x; if(x>maxx) maxx=x; } if(2*maxx-sum<=1) printf("Yes\n"); else printf("No\n"); } return 0; }
标签:
原文地址:http://www.cnblogs.com/a972290869/p/4340137.html