QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#203807#4943. Police Stationstriplem5ds#WA 0ms3868kbC++231.2kb2023-10-06 20:41:012023-10-06 20:41:01

Judging History

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

  • [2023-10-06 20:41:01]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3868kb
  • [2023-10-06 20:41:01]
  • 提交

answer

/// Msaa el 5ra
#pragma GCC optimize("O3")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target("avx,avx2,fma")

#include "bits/stdc++.h"

using namespace std;

#define pb push_back
#define F first
#define S second
#define f(i, a, b)  for(int i = a; i < b; i++)
#define all(a)  a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define sz(x) (int)(x).size()
#define mp(x, y) make_pair(x,y)
#define popCnt(x) (__builtin_popcountll(x))
#define int ll

using ll = long long;
using ii = pair<int, int>;
using ull = unsigned long long;

const int N = 5e5 + 5, LG = 18, MOD = 1e9 + 7;
const long double PI = acos(-1);
const long double EPS = 1e-7;

void doWork() {

    int n;
    cin >> n;
    vector<int> x, y;
    f(i, 0, n) {
        int a, b;
        cin >> a >> b;
        x.push_back(a);
        y.push_back(b);
    }
    sort(all(x));
    sort(all(y));
    cout << x.back() - (x[0] + x.back()) / 2 << ' ' << y.back() - (y[0] + y.back()) / 2 << '\n';

}

int32_t main() {
#ifdef ONLINE_JUDGE
    ios_base::sync_with_stdio(0);
    cin.tie(0);
#endif // ONLINE_JUDGE

    int t = 1;
//    cin >> t;
    while (t--) {
        doWork();
    }
}

詳細信息

Test #1:

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

input:

5
20 90
-10 40
90 20
50 -30
50 70

output:

50 60

result:

ok single line: '50 60'

Test #2:

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

input:

2
120 740
122 749

output:

1 5

result:

ok single line: '1 5'

Test #3:

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

input:

5
-30 -7
2 80
23 15
31 30
92 -20

output:

61 50

result:

ok single line: '61 50'

Test #4:

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

input:

2
-1 1
1 -1

output:

1 1

result:

ok single line: '1 1'

Test #5:

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

input:

1
0 0

output:

0 0

result:

ok single line: '0 0'

Test #6:

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

input:

1
97874 185956

output:

0 0

result:

ok single line: '0 0'

Test #7:

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

input:

10
430700 688911
205798 716277
90011 694885
-152500 247408
292079 -231064
-124629 -404797
783947 -886549
927759 -454565
-232945 -44455
583806 624703

output:

580352 801413

result:

ok single line: '580352 801413'

Test #8:

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

input:

100
58028 -39830
136345 -214254
851610 672534
-857896 -325056
-825703 296635
-959555 -263352
665614 914741
556664 -719236
740416 740566
957677 -52571
598677 602182
-76834 41189
561410 358064
-763398 441589
280130 164301
-713229 74988
889763 517573
43931 -788138
-170490 -52586
-470770 -627252
548816 ...

output:

983899 986165

result:

wrong answer 1st lines differ - expected: '983900 986165', found: '983899 986165'