首页 > 其他 > 详细

HDU5804 Price List (BestCoder Round #86 A)水题

时间:2016-08-07 23:09:38      阅读:251      评论:0      收藏:0      [点我收藏+]

分析:大于总和输出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;
}
View Code

 

HDU5804 Price List (BestCoder Round #86 A)水题

原文:http://www.cnblogs.com/shuguangzw/p/5747388.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!