#include <stdio.h>
typedef struct{
int id;
int weight ;
int height;
}Body;
void swap(Body *x,Body *y) {
Body w;
w=*x;
*x=*y;
*y=w;
}
int main(void) {
Body a[]={
{1,65,169},
{2,73,170},
{3,59,161},
{4,79,175},
{5,55,168},
};
for(int i=0;i<4;i++){
for(int j=0;j<4-i;j++){
if(a[j].height<a[j+1].height){
swap(&a[j],&a[j+1]);
}
}
}
for(int n=0;n<5;n++){
printf("%d,%d,%d\n",a
[n
].
id,a
[n
].
weight,a
[n
].
height); }
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp0eXBlZGVmIHN0cnVjdHsKCWludCBpZDsKCWludCB3ZWlnaHQgOwoJaW50IGhlaWdodDsKfUJvZHk7CnZvaWQgc3dhcChCb2R5ICp4LEJvZHkgKnkpIHsKQm9keSB3OwoJdz0qeDsKCSp4PSp5OwoJKnk9dzsKfQppbnQgbWFpbih2b2lkKSB7CglCb2R5IGFbXT17CgkJezEsNjUsMTY5fSwKCQl7Miw3MywxNzB9LAoJCXszLDU5LDE2MX0sCgkJezQsNzksMTc1fSwKCQl7NSw1NSwxNjh9LAp9Owpmb3IoaW50IGk9MDtpPDQ7aSsrKXsKZm9yKGludCBqPTA7ajw0LWk7aisrKXsKaWYoYVtqXS5oZWlnaHQ8YVtqKzFdLmhlaWdodCl7CnN3YXAoJmFbal0sJmFbaisxXSk7Cn0KfQp9Cgpmb3IoaW50IG49MDtuPDU7bisrKXsKcHJpbnRmKCIlZCwlZCwlZFxuIixhW25dLmlkLGFbbl0ud2VpZ2h0LGFbbl0uaGVpZ2h0KTsKfQoJcmV0dXJuIDA7Cn0KCgo=
4,79,175
2,73,170
1,65,169
5,55,168
3,59,161