int main() { Choice peoples[30]; int M,N,i; scanf("%d%d",&M,&N); inputChoice(peoples,M,N); sort(peoples,M,N); for (i=0; i<3; i++) printf("%s %.2lf\n",peoples[i].name,peoples[i].aver); return 0; }
int main() { freopen("in","r",stdin); freopen("out","w",stdout); Choice peoples[30]; int M,N,i; scanf("%d%d",&M,&N); inputChoice(peoples,M,N); sort(peoples,M,N); for (i=0; i<3; i++) printf("%s %.2lf\n",peoples[i].name,peoples[i].aver); return 0; }