#include <stdio.h>
#include <math.h>
#include <string.h>
typedef struct thongtin {
char msv[50];
char hoten[50];
char lop[50];
double mon1,mon2,mon3;
}tt;
int comparebyname(const void *s1, const void *s2) {
return strcmp(((tt
*)s1
) -> msv
,((tt
*)s2
) -> msv
); }
int main() {
tt a[100];
int n;
for(int i=0;i<n;i++) {
}
qsort(a
,n
,sizeof(tt
),comparebyname
); for(int i=0;i<n;i++) {
printf("%d %s %s %s %.1lf %.1lf %.1lf\n",i
+1,a
[i
].
msv,a
[i
].
hoten,a
[i
].
lop,a
[i
].
mon1,a
[i
].
mon2,a
[i
].
mon3); }
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxtYXRoLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KCnR5cGVkZWYgc3RydWN0IHRob25ndGluIHsKICAgIGNoYXIgbXN2WzUwXTsKICAgIGNoYXIgaG90ZW5bNTBdOwogICAgY2hhciBsb3BbNTBdOwogICAgZG91YmxlIG1vbjEsbW9uMixtb24zOwp9dHQ7CgppbnQgY29tcGFyZWJ5bmFtZShjb25zdCB2b2lkICpzMSwgY29uc3Qgdm9pZCAqczIpIHsKICAgIHJldHVybiBzdHJjbXAoKCh0dCopczEpIC0+IG1zdiwoKHR0KilzMikgLT4gbXN2KTsKfQoKaW50IG1haW4oKSB7CiAgICB0dCBhWzEwMF07CiAgICBpbnQgbjsKICAgIHNjYW5mKCIlZCIsJm4pOwogICAgZm9yKGludCBpPTA7aTxuO2krKykgewogICAgICAgIHNjYW5mKCJcbiIpOwogICAgICAgIGdldHMoYVtpXS5tc3YpOwogICAgICAgIGdldHMoYVtpXS5ob3Rlbik7CiAgICAgICAgZ2V0cyhhW2ldLmxvcCk7CiAgICAgICAgc2NhbmYoIlxuIik7CiAgICAgICAgc2NhbmYoIiVsZiIsJmFbaV0ubW9uMSk7CiAgICAgICAgc2NhbmYoIiVsZiIsJmFbaV0ubW9uMik7CiAgICAgICAgc2NhbmYoIiVsZiIsJmFbaV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