送分题,要拿好。
#include<bits/stdc++.h>
using namespace std;
const int maxn = 1005;
struct Data{
int x;
int y;
};
Data buf[maxn];
bool cmp(Data a,Data b){
if(a.x!=b.x) return a.x<b.x;
else return a.y<b.y;
}
int main(){
int n;
while(scanf("%d",&n)!=EOF){
for(int i=0;i<n;i++){
scanf("%d %d",&buf[i].x,&buf[i].y);
}
sort(buf,buf+n,cmp);
printf("%d %d\n",buf[0].x,buf[0].y);
}
return 0;
}