题解 | #hb的训练赛#

星期几考试?

https://ac.nowcoder.com/acm/contest/71512/A

注意AC后再WA等,不算罚时。如果有题目没AC要把记录清零

#include <bits/stdc++.h>
using namespace std;
#define ios ios::sync_with_stdio(false),cin.tie(0),cout.tie(0)
#define ll long long
const int maxn=1e5+5;
string str[maxn];
int cnt[maxn];
int main()
{
	//freopen("","r",stdin);
	//freopen("","w",stdout);
	ios;
	int n,m,k,ans1=0,ans2=0;
	cin>>n>>m;
	memset(cnt,0,sizeof(cnt));
	for(int i=1;i<=m;i++)
	{
		string s;
		cin>>k>>s;
		if(s!="AC")
		{
			cnt[k]++;
		}
		str[k]=s;
	}
	for(int i=1;i<=n;i++)
	{
		if(str[i]=="AC")
		{
			cnt[i]=0;
			continue;
		}
		ans1++;
		ans2+=cnt[i];
	}
	cout<<ans1<<" "<<ans2<<endl;
	return 0;
}
全部评论

相关推荐

驼瑞驰_招募评论官版...:这是要去亚马逊雨林守夜吗?
点赞 评论 收藏
分享
06-13 10:15
门头沟学院 Java
想去夏威夷的大西瓜在...:我也是27届,但是我现在研一下了啥项目都没有呀咋办,哎,简历不知道咋写
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务