QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#318988 | #4943. Police Stations | owen0806# | WA | 11ms | 6328kb | C++20 | 747b | 2024-02-01 13:30:22 | 2024-02-01 13:30:24 |
Judging History
answer
#include<bits/stdc++.h>
#define int long long
#define endl '\n'
#define PB push_back
#define pii pair<int, int>
using namespace std;
const int N = 2e5 + 5;
const int INF = 1e18;
pii p[N];
void solve(){
int n;
cin >> n;
int maxx = 0, maxy = 0, minx = INF, miny = INF;
for(int i=0; i<n; i++){
int a, b;
cin >> a >> b;
p[i] = {a, b};
maxx = max(maxx, a);
minx = min(minx, a);
maxy = max(maxy, b);
miny = min(miny, b);
}
cout << (maxx - minx + 1)/2 << " " << (maxy - miny + 1)/2 << endl;
}
signed main(){
ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
int T = 1;
// cin >> T;
while(T--){
solve();
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3600kb
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: 3616kb
input:
2 120 740 122 749
output:
1 5
result:
ok single line: '1 5'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3672kb
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: 3612kb
input:
2 -1 1 1 -1
output:
1 1
result:
ok single line: '1 1'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3740kb
input:
1 0 0
output:
0 0
result:
ok single line: '0 0'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3636kb
input:
1 97874 185956
output:
0 0
result:
ok single line: '0 0'
Test #7:
score: 0
Accepted
time: 0ms
memory: 3664kb
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: 0ms
memory: 3608kb
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: 0ms
memory: 3624kb
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: 2ms
memory: 3764kb
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: 11ms
memory: 6328kb
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:
293142 999992
result:
wrong answer 1st lines differ - expected: '0 999992', found: '293142 999992'