QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#605412#9226. Game of Geniusesucup-team3215#WA 1ms3828kbC++23286b2024-10-02 17:07:322024-10-02 17:07:38

Judging History

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

  • [2024-10-02 17:07:38]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3828kb
  • [2024-10-02 17:07:32]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

#define all(x) (x).begin(), (x).end()
using vi = vector<int>;

int main() {
    int n;
    cin >> n;
    n = n * n;
    vi a(n);
    for (int i = 0; i < n; ++i) cin >> a[i];
    sort(all(a));
    cout << a[n / 2] << endl;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

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: 1ms
memory: 3596kb

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'