样例过了!!求救
查看原帖
样例过了!!求救
1266829
cjy2327134004楼主2024/10/9 22:10
#include<bits/stdc++.h>
using namespace std;
int q[10001],w[10001];
int main()
{
	int a,s,d,f,g=0,h=0;
	cin>>a>>s;
	for(int i=1;i<=a;i++)
	cin>>q[i];
	for(int i=1;i<=s;i++)
	{
		cin>>d>>f;
		for(int o=1;o<=a;o++)
		{
			if(d==q[o])
			{
			
				w[o]=f;
			}
		}
	}
	for(int i=1;i<=a;i++)
	{
		if(w[i]<60)g++;
		if(w[i]==0)h++;
	}
	cout<<h<<"\n"<<g;
	return 0;
}
2024/10/9 22:10
加载中...