QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#728071 | #4943. Police Stations | trongvan245 | WA | 10ms | 3704kb | C++14 | 1.1kb | 2024-11-09 14:29:14 | 2024-11-09 14:29:15 |
Judging History
answer
// Hello I'm Nekan
//
#include <bits/stdc++.h>
#define Nekan "test"
#define fi first
#define se second
#define pb push_back
#define zs(v) ((int)(v).size())
#define BIT(x, i) (((x) >> (i)) & 1)
#define pii pair<int, int>
typedef long double ld;
typedef long long ll;
const int N = 2e5 + 5;
const long long mod = 1e9 + 7; // 998244353;
using namespace std;
void xuly() {
int n, minn_x = 1e9, maxx_x = 0, minn_y = 1e9, maxx_y = 0;
cin >> n;
for (int i = 1; i <= n; ++i) {
int x, y;
cin >> x >> y;
minn_x = min(minn_x, x);
maxx_x = max(maxx_x, x);
minn_y = min(minn_y, y);
maxx_y = max(maxx_y, y);
}
cout << (maxx_x - minn_x + 1) / 2 << " " << (maxx_y - minn_y + 1) / 2;
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0), cout.tie(0);
if (fopen(Nekan ".inp", "r")) {
freopen(Nekan ".inp", "r", stdin);
freopen(Nekan ".out", "w", stdout);
}
int t = 1;
// cin >> t;
while (t--)
xuly();
}
// Surely nothing could go wrong.
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3588kb
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: 3640kb
input:
2 120 740 122 749
output:
1 5
result:
ok single line: '1 5'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3640kb
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: 3652kb
input:
2 -1 1 1 -1
output:
1 1
result:
ok single line: '1 1'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
1 0 0
output:
0 0
result:
ok single line: '0 0'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
1 97874 185956
output:
0 0
result:
ok single line: '0 0'
Test #7:
score: 0
Accepted
time: 0ms
memory: 3644kb
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: 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:
983900 986165
result:
ok single line: '983900 986165'
Test #9:
score: 0
Accepted
time: 1ms
memory: 3704kb
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: 1ms
memory: 3644kb
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: 10ms
memory: 3648kb
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'