杭电ACM吃糖果问题
[cpp]#include <iostream>#include <stdio.h>using namespace std;int main(){int n,m,i,k=0;int sum=0;cin>>n;while (n--){cin>>m;while (m--){cin>>i;k=i>k?i:k;sum=sum+i;}sum=sum-k;if(sum+1>=k)cout<<"Yes"<<endl;elsecout<<"No"<<endl;k=0;sum=0;}return 0;}
补充:软件开发 , C++ ,