码迷,mamicode.com
首页 > 其他好文 > 详细

杭电1205

时间:2016-12-01 09:25:21      阅读:154      评论:0      收藏:0      [点我收藏+]

标签:log   color   std   include   lld   杭电   can   scan   scanf   

 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 }

 

杭电1205

标签:log   color   std   include   lld   杭电   can   scan   scanf   

原文地址:http://www.cnblogs.com/qq188380780/p/6120559.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!