QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#533686#9226. Game of GeniusesYcfhnndWA 0ms3572kbC++23439b2024-08-26 10:32:022024-08-26 10:32:02

Judging History

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

  • [2024-08-26 10:32:02]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3572kb
  • [2024-08-26 10:32:02]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

using i64 = long long;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    
    int n;
    cin >> n;
    vector<int>a;
    for (int i = 0;i < n;i ++){
        for (int j = 0;j < n;j ++){
            int x;
            cin >> x;
            a.push_back(x);
        }
    }

    sort(a.begin(), a.end());
    cout << a[n * n / 2];

    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3
1 4 9
8 4 2
7 5 7

output:

5

result:

ok 1 number(s): "5"

Test #2:

score: -100
Wrong Answer
time: 0ms
memory: 3572kb

input:

50
2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2392 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500 2500
2500 2500 2500 2500 2500 2500 2500 2500 2500 25...

output:

2498

result:

wrong answer 1st numbers differ - expected: '2500', found: '2498'