QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#133448 | #4943. Police Stations | wtn135687# | WA | 1ms | 3472kb | C++14 | 668b | 2023-08-02 09:33:26 | 2023-08-02 09:33:28 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define int ll
const int N = 1e6+10,mo = 1e9+7;
int a[N];
inline void solve(){
int n;cin>>n;
int minx=1e9,maxx=-1e9,miny=1e9,maxy=-1e9;
for(int i=1;i<=n;i++){
int x,y;cin>>x>>y;
minx=min(x,minx);
miny=min(y,miny);
maxx=max(x,maxx);
maxy=max(y,maxy);
}
cout<<(maxx-minx)/2<<" "<<(maxy-miny)/2<<"\n";
}
signed main(){
ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
int WTN666=1;//cin>>WTN666;
while(WTN666--){
solve();
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3468kb
input:
5 20 90 -10 40 90 20 50 -30 50 70
output:
50 60
result:
ok single line: '50 60'
Test #2:
score: -100
Wrong Answer
time: 1ms
memory: 3472kb
input:
2 120 740 122 749
output:
1 4
result:
wrong answer 1st lines differ - expected: '1 5', found: '1 4'