文章
55
粉丝
100
获赞
12
访问
31.0k
#include <iostream>
#include <vector>
using namespace std;
struct minshu{
int x;
int y;
};
int main() {
minshu m;
minshu min[1000];
int n;
cin>>n;
for(int i = 0; i<n; i++){
int x,y;
cin>>x>>y;
min[i].x = x;
min[i].y = y;
}
minshu minx = min[0];
for(int i = 0; i<n; i++){
if(min[i].x < minx.x){
minx = min[i];
}
if(min[i].x == minx.x){
if(min[i].y < minx.y){
minx = min[i];
}
}
}
cout<<minx.x<<" "<<minx.y<<endl;
}
登录后发布评论
暂无评论,来抢沙发