QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#243871#7689. Flipping Cardsucup-team2432#WA 0ms3604kbC++14613b2023-11-08 18:48:192023-11-08 18:48:20

Judging History

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

  • [2023-11-08 18:48:20]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3604kb
  • [2023-11-08 18:48:19]
  • 提交

answer

#include <bits/stdc++.h>

#define all(x) x.begin(), x.end()
#define NL std::cout << '\n'

using lnt = long long;
lnt linf = 1ll << 62;
int inf = 0x3f3f3f3f;

signed main() {
  std::ios::sync_with_stdio(false); std::cin.tie(nullptr);
  int t = 1;
//  std::cin >> t;
  while (t--) {
    int n; std::cin >> n;
    std::vector<int> v1, v2;
    for (int i = 0; i < n; ++i) {
      int x, y;  std::cin >> x >> y;
      v1.emplace_back(x);
      v2.emplace_back(y);
    }
    std::sort(all(v1));
    std::sort(all(v2));
    std::cout << std::max(v1[(n+1)/2-1], v2[(n+1)/2-1]);
  }
  return 0;
}

详细

Test #1:

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

input:

5
3 6
5 2
4 7
6 4
2 8

output:

6

result:

ok 1 number(s): "6"

Test #2:

score: 0
Accepted
time: 0ms
memory: 3480kb

input:

1
2 1

output:

2

result:

ok 1 number(s): "2"

Test #3:

score: 0
Accepted
time: 0ms
memory: 3516kb

input:

1
212055293 384338286

output:

384338286

result:

ok 1 number(s): "384338286"

Test #4:

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

input:

99
749159996 323524232
125448341 365892333
481980673 143665393
394405973 44741918
687549448 513811513
287088118 385131171
11865696 666468353
449920567 373650719
671547289 116780561
41003675 671513243
351534153 507850962
374160874 985661954
222519431 600582098
987220654 704142246
856147059 37783620
1...

output:

468154918

result:

wrong answer 1st numbers differ - expected: '528957505', found: '468154918'