QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#133448#4943. Police Stationswtn135687#WA 1ms3472kbC++14668b2023-08-02 09:33:262023-08-02 09:33:28

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-08-02 09:33:28]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3472kb
  • [2023-08-02 09:33:26]
  • 提交

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();
    }
}
























詳細信息

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'