#include <stdio.h>
struct SCORE {
int number;
char name[20];
int eigo;
int kokugo;
int sugaku;
};
void input(struct SCORE *p)
{
scanf("%d%19s%d%d%d", &p
->number
, p
->name
, &p
->eigo
, &p
->kokugo
, &p
->sugaku
); }
int main()
{
struct SCORE data[5];
int i, eigo, kokugo, sugaku;
for (i = 0; i < 5; i++) {
input(&data[i]);
}
eigo = kokugo = sugaku = 0;
for (i = 1; i < 5; i++) {
if (data[eigo].eigo < data[i].eigo) eigo = i;
if (data[kokugo].kokugo < data[i].kokugo) kokugo = i;
if (data[sugaku].sugaku < data[i].sugaku) sugaku = i;
}
printf("英語 %s %d\n", data
[eigo
].
name, data
[eigo
].
eigo); printf("国語 %s %d\n", data
[kokugo
].
name, data
[kokugo
].
kokugo); printf("数学 %s %d\n", data
[sugaku
].
name, data
[sugaku
].
sugaku); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgpzdHJ1Y3QgU0NPUkUgewoJaW50CW51bWJlcjsKCWNoYXIJbmFtZVsyMF07CglpbnQJZWlnbzsKCWludAlrb2t1Z287CglpbnQJc3VnYWt1Owp9OwoKdm9pZCBpbnB1dChzdHJ1Y3QgU0NPUkUgKnApCnsKCXByaW50Zigi5a2m57GN55Wq5Y+3IOawj+WQjSDoi7Hoqp4g5Zu96KqeIOaVsOWtplxuIik7CglzY2FuZigiJWQlMTlzJWQlZCVkIiwgJnAtPm51bWJlciwgcC0+bmFtZSwgJnAtPmVpZ28sICZwLT5rb2t1Z28sICZwLT5zdWdha3UpOwp9CgppbnQgbWFpbigpCnsKCXN0cnVjdCBTQ09SRSBkYXRhWzVdOwoJaW50IGksIGVpZ28sIGtva3Vnbywgc3VnYWt1OwoKCWZvciAoaSA9IDA7IGkgPCA1OyBpKyspIHsKCQlpbnB1dCgmZGF0YVtpXSk7Cgl9CgllaWdvID0ga29rdWdvID0gc3VnYWt1ID0gMDsKCWZvciAoaSA9IDE7IGkgPCA1OyBpKyspIHsKCQlpZiAoZGF0YVtlaWdvXS5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