#include<bits/stdc++.h>
using namespace std;
struct node
{
int x,y,k;
};
bool operator < (struct node x0,struct node y0)
{
if(x0.x==y0.x)return x0.y<y0.y;
else return x0.x<y0.x;
}
int main()
{
int mu,nu,tu;
while(~scanf("%d %d %d",&mu,&nu,&tu))
{
struct node a[10050];
for(int i=0; i<tu; i++)
scanf("%d %d %d",&a[i].y,&a[i].x,&a[i].k);
sort(a,a+tu);
for(int i=0; i<tu; i++)
printf("%d %d %d\n",a[i].x,a[i].y,a[i].k);
}
}
SDUT3347数据结构实验之数组三:快速转置
最新推荐文章于 2020-05-18 13:00:32 发布