QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#658474 | #9481. Min Nim | ucup-team3474# | WA | 7ms | 19316kb | C++20 | 610b | 2024-10-19 16:52:57 | 2024-10-19 16:53:01 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
const int N=3e5+10;
typedef long long ll;
typedef pair<ll,ll> PII;
int n,m,k;
int a[N],b[N];
char s[N];
vector<PII> e[N];
int d[N];
bool tf[N];
set<PII> se[N];
void __(){
scanf("%d",&n);
ll sg=0;
for(int i=1;i<=n;i++){
int x;
scanf("%d",&x);
// cout<<x<<endl;
sg^=(x-1);
}
if(n%2){
puts("First");
return;
}
if(sg==0) puts("First");
else puts("Second");
}
int main(){
int _;
cin>>_;
while(_--){
__();
}
}
詳細信息
Test #1:
score: 100
Accepted
time: 5ms
memory: 19196kb
input:
2 3 3 1 4 8 3 1 4 1 5 9 2 6
output:
First Second
result:
ok 2 tokens
Test #2:
score: -100
Wrong Answer
time: 7ms
memory: 19316kb
input:
1 100000 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 8...
output:
First
result:
wrong answer 1st words differ - expected: 'Second', found: 'First'