#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
struct shujupaixu
{
int xuhao ;
int shuju ;
int num ;
};
bool cmp ( shujupaixu a , shujupaixu b )
{
return a.shuju < b.shuju ;
if( a.shuju == b. shuju )
{
return a.xuhao < b.xuhao ;
}
}
int main()
{
shujupaixu arr[100001];
int i = 0 , j = 0 ;
while(scanf( "%d %d" , &arr[i].xuhao , &arr[i].shuju ) != EOF)
{
i ++ ;
arr[i].num = i ;
}
sort ( arr , arr+i , cmp ) ;
for ( j = 0 ; j < i ; j ++ )
{
printf ( "%d %d\n" , arr[j].xuhao , arr[j].shuju ) ;
}
return 0 ;
}
慕移动6052691
相关分类