标签:
Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)
Total Submission(s): 31887 Accepted Submission(s): 9077
#include <cstdio> #define LL long long #define max(a, b) (a)>(b)?(a):(b) int main() { int t; scanf("%d", &t); while(t--) { int n; scanf("%d", &n); LL Max=-1, sum=0; for(int i=0; i<n; i++) { LL m; scanf("%lld", &m); Max=max(Max, m); sum+=m; } if(sum-Max>=Max-1) printf("Yes\n"); else printf("No\n"); } return 0; }
标签:
原文地址:http://www.cnblogs.com/fengshun/p/5271607.html