比赛 |
NOIP模拟赛1 |
评测结果 |
AAAAAATTTTTTTTTTTWTT |
题目名称 |
天天爱射击 |
最终得分 |
30 |
用户昵称 |
313 |
运行时间 |
13.729 s |
代码语言 |
C++ |
内存使用 |
0.53 MiB |
提交时间 |
2018-02-08 21:01:51 |
显示代码纯文本
#include<iostream>
#include<algorithm>
#include<bits/stdc++.h>
using namespace std;
int n,m,zidan[20000],mubanb[20000],mubane[20000],mubans[20000];
//struct mu{int x1,x2,s;}muban[200000];
int main()
{
freopen("shooting.in","r",stdin);
freopen("shooting.out","w",stdout);
scanf("%d%d",&n,&m);
for(int i=1;i<=n;++i)
//{scanf("%d %d %d",&muban[i].x1,&muban[i].x2,&muban[i].s);}
{scanf("%d %d %d",&mubanb[i],&mubane[i],&mubans[i]);}
for(int i=1;i<=m;++i)
{
scanf("%d",&zidan[i]);
int sum=0;
for(int j=1;j<=n;++j)
{
if(mubans[j]>0)
{
if(mubanb[j]<=zidan[i]&&mubane[j]>=zidan[i])
{mubans[j]--;}
if(mubans[j]==0)sum++;
}
}
printf("%d\n",sum);
}
return 0;
}