QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#264986 | #7755. Game on a Forest | cscnk52 | WA | 0ms | 3648kb | C++14 | 335b | 2023-11-25 16:16:40 | 2023-11-25 16:16:40 |
Judging History
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'