QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#329108 | #4943. Police Stations | ouo# | WA | 40ms | 3680kb | C++17 | 826b | 2024-02-16 13:32:05 | 2024-02-16 13:32:05 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define ssuyu \
ios_base::sync_with_stdio(0); \
cin.tie(0)
#define pb push_back
#define F first
#define S second
#define pii pair<int, int>
#define int long long
#define PI acos(-1)
#define all(x) (x).begin(), (x).end()
const int N = 1e6 + 5;
signed main() {
int n, m, x, y, mxx = -1, mny = N, mxy = -1, mnx = N;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> x >> y;
mnx = min(mnx, x);
mny = min(mny, y);
mxx = max(x, mxx);
mxy = max(y, mxy);
}
x = mxx - mnx;
y = mxy - mny;
if (x & 1)
x++;
if (y & 1)
y++;
cout << x / 2 << ' ' << y / 2;
}
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 3540kb
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: 3560kb
input:
2 120 740 122 749
output:
1 5
result:
ok single line: '1 5'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3556kb
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: 1ms
memory: 3552kb
input:
2 -1 1 1 -1
output:
1 1
result:
ok single line: '1 1'
Test #5:
score: 0
Accepted
time: 1ms
memory: 3608kb
input:
1 0 0
output:
0 0
result:
ok single line: '0 0'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
1 97874 185956
output:
0 0
result:
ok single line: '0 0'
Test #7:
score: 0
Accepted
time: 0ms
memory: 3524kb
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: 0
Accepted
time: 1ms
memory: 3680kb
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:
983900 986165
result:
ok single line: '983900 986165'
Test #9:
score: 0
Accepted
time: 1ms
memory: 3584kb
input:
1000 693198 957582 399273 -767544 -404993 534392 627962 -176175 -206810 351182 762603 -500295 162807 -373423 763867 931267 385375 177195 450835 319634 2874 66652 912598 -538831 288270 -210084 -152099 237895 213059 -50052 -961605 -59524 -396715 432471 320644 -423889 -419715 -232903 236309 498677 -142...
output:
998957 997606
result:
ok single line: '998957 997606'
Test #10:
score: 0
Accepted
time: 4ms
memory: 3528kb
input:
10000 -582540 -284324 -249131 -672558 282554 -117053 432387 -474282 -887231 44360 956748 -929665 -336947 812871 -587781 633096 -385516 105411 969988 704000 337455 925223 -509334 -778906 -597718 261947 -850176 996437 -273409 976223 647877 206917 -449026 -743901 -262853 166648 523216 -995870 392207 -6...
output:
999643 999914
result:
ok single line: '999643 999914'
Test #11:
score: -100
Wrong Answer
time: 40ms
memory: 3556kb
input:
95538 -586283 -656993 -586283 -217849 -586283 249441 -586283 -267667 -586283 -208074 -586283 518209 -586283 -869692 -586283 -312114 -586283 594187 -586283 795510 -586283 996666 -586283 967596 -586283 -154898 -586283 -575493 -586283 196867 -586283 -291849 -586283 674589 -586283 -650402 -586283 571831...
output:
293141 999992
result:
wrong answer 1st lines differ - expected: '0 999992', found: '293141 999992'