QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#264986#7755. Game on a Forestcscnk52WA 0ms3648kbC++14335b2023-11-25 16:16:402023-11-25 16:16:40

Judging History

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

  • [2023-11-25 16:16:40]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3648kb
  • [2023-11-25 16:16:40]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
const int N=1e5+10;
int cnt[N];
inline int islose(int n,int m){return (n&1)+(m&1)==0;}
int main(){
	int n,m;
	cin>>n>>m;
	int ans=islose(n,m-1)?m:0;
	for(int x;cin>>x;){
		ans+=-islose(n-1,m-cnt[x])+islose(n-1,m-(++cnt[x]));
	}
	cout<<ans+(islose(n-1,m)*n)<<'\n';
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3648kb

input:

3 1
1 2

output:

0

result:

wrong answer 1st numbers differ - expected: '2', found: '0'