QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#658474#9481. Min Nimucup-team3474#WA 7ms19316kbC++20610b2024-10-19 16:52:572024-10-19 16:53:01

Judging History

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

  • [2024-10-19 16:53:01]
  • 评测
  • 测评结果:WA
  • 用时:7ms
  • 内存:19316kb
  • [2024-10-19 16:52:57]
  • 提交

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(_--){
        __();
    }
}

Details

Tip: Click on the bar to expand more detailed information

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'