标签:
分析:大于总和输出1
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; typedef long long LL; const int N = 1e5+5; int ret[N],T,n,m; int main(){ scanf("%d",&T); while(T--){ scanf("%d%d",&n,&m); LL sum=0; for(int i=1;i<=n;++i){ LL x;scanf("%I64d",&x); sum+=x; } for(int i=1;i<=m;++i){ LL x;scanf("%I64d",&x); if(x>sum)printf("1"); else printf("0"); } printf("\n"); } return 0; }
HDU5804 Price List (BestCoder Round #86 A)水题
标签:
原文地址:http://www.cnblogs.com/shuguangzw/p/5747388.html