QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#677012#9481. Min Nimm107239#WA 6ms3712kbC++20713b2024-10-26 08:33:512024-10-26 08:33:52

Judging History

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

  • [2024-10-26 08:33:52]
  • 评测
  • 测评结果:WA
  • 用时:6ms
  • 内存:3712kb
  • [2024-10-26 08:33:51]
  • 提交

answer

#include <bits/stdc++.h>

using i64 = long long;

void solve()
{
    int n;
    std::cin >> n; 
    int cnt = 0;
    for (int i = 0; i < n; i++) {
        int x;
        std::cin >> x;
        cnt += (x == 1);
    }
    cnt = n - cnt;
    if (n & 1) {
        std::cout << "First\n";
        return;
    }
    if (cnt & 1) {
        std::cout << "First\n";
    } else {
        if (cnt == n) {
            std::cout << "First\n";
        } else {
            std::cout << "Second\n";
        }
    }
}

int main()
{
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr);

    int t;
    std::cin >> t;

    while (t--) {
        solve();
    }

    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3712kb

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: 6ms
memory: 3620kb

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'