QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#315047#4935. Exchange Bottleneckyuyutw#WA 0ms3624kbC++14553b2024-01-26 20:37:032024-01-26 20:37:04

Judging History

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

  • [2024-01-26 20:37:04]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3624kb
  • [2024-01-26 20:37:03]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define io ios::sync_with_stdio(0), cin.tie(0);
#define endl '\n'
#define MXN (ll)1e6+5
int main(){
    io
    int n;
    cin>>n;
    int maxx=-1000000;
    int maxy=-1000000;
    int minx=1000000;
    int miny=1000000;
    for(int i=0;i<n;i++){
        int x,y;
        cin>>x>>y;
        maxx=max(maxx,x);
        maxy=max(maxy,y);
        minx=min(minx,x);
        miny=min(miny,y);
    }
    cout<<(maxx-minx+1)/2<<" "<<(maxy-miny+1)/2<<endl;
    return 0;
} 

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3624kb

input:

5
1 0 1 0

output:

0 0

result:

wrong answer 1st lines differ - expected: '2', found: '0 0'