=b.score)
{
return a.score
}
else
{
return a.number
}
}
int main()
{
int n,c,num=0;
while(scanf...(“%d%d”,&n,&c)!...num++;
if(n>0)
{
for(int i=0;i
{
scanf(“%d%s%d”,&buf[i].number,buf[i].name,&buf[i].score);
}
if(c=...=1)
{
sort(buf,buf+n,cmp1);
}
else if(c==2)
{
sort(buf,buf+n,cmp2);
}
else if(c==3)
{
sort(buf,