QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#69244#2358. What? Subtasks? Again?zhangboju#Compile Error//C++17658b2022-12-26 08:18:472022-12-26 08:18:49

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-12-26 08:18:49]
  • 评测
  • [2022-12-26 08:18:47]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
template <typename T> inline void read(T &x)
{
	x=0;short f=1;char c=getchar();
	for(;c<'0'||c>'9';c=getchar()) if(c=='-') f=-1;
	for(;c>='0'&&c<='9';c=getchar()) x=(x<<1)+(x<<3)+(c^48);
	x*=f;return;
}
const int N=1e5+5;
int n,m,k;
int a[N]; 
int main()
{
	read(n),read(m),read(k);
	for(int i=1;i<=k;++i)
	{
		int c,f;read(c),read(f);
		a[c]|=1<<f-1;
	} 
	int maxx=-1e9;
	for(int S=0;S<(1<<5);++S)
	{
		int cnt=0;
		for(int i=1;i<=n;++i)
			if(!(a[i]&aS))
				++cnt;
		if(cnt<=m) maxx=max(maxx,cnt);
	}
	if(maxx==-1e9) puts("Round will be unrated");
	else printf("%d\n",maxx); 
}

详细

answer.code: In function ‘int main()’:
answer.code:26:35: error: ‘aS’ was not declared in this scope; did you mean ‘S’?
   26 |                         if(!(a[i]&aS))
      |                                   ^~
      |                                   S