#include <stdio.h>
int main(void) {
int s[10];
int t[10];
int i, j, k;
for (i = 0; i < 10; i++) {
}
for (i = 0; i < 10; i++) {
t[i] = s[i];
}
for (i = 0; i < 9; i++) {
for (j = i + 1; j < 10; j++) {
if (t[i] < t[j]) {
k = t[i];
t[i] = t[j];
t[j] = k;
}
}
}
for (i = 0; i < 10; i++) {
printf("%d人目の点数:%d\n", i
+ 1, s
[i
]); }
for (i = 0; i < 10; i++) {
if (s[i] == t[8]) {
break;
}
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CmludCBtYWluKHZvaWQpIHsKICBpbnQgc1sxMF07CiAgaW50IHRbMTBdOwogIGludCBpLCBqLCBrOwogICAgZm9yIChpID0gMDsgaSA8IDEwOyBpKyspIHsKICAgICAgICBzY2FuZigiICVkIiwgJnNbaV0pOwogICAgfQogICAgZm9yIChpID0gMDsgaSA8IDEwOyBpKyspIHsKICAgICAgICB0W2ldID0gc1tpXTsKICAgIH0KICAgIGZvciAoaSA9IDA7IGkgPCA5OyBpKyspIHsKICAgICAgICBmb3IgKGogPSBpICsgMTsgaiA8IDEwOyBqKyspIHsKICAgICAgICAgICAgaWYgKHRbaV0gPCB0W2pdKSB7CiAgICAgICAgICAgICAgICBrID0gdFtpXTsKICAgICAgICAgICAgICAgIHRbaV0gPSB0W2pdOwogICAgICAgICAgICAgICAgdFtqXSA9IGs7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICBmb3IgKGkgPSAwOyBpIDwgMTA7IGkrKykgewogICAgICAgIHByaW50ZigiJWTkurrnm67jga7ngrnmlbA6JWRcbiIsIGkgKyAxLCBzW2ldKTsKICAgIH0KICAgIGZvciAoaSA9IDA7IGkgPCAxMDsgaSsrKSB7CiAgICAgICAgaWYgKHNbaV0gPT0gdFs4XSkgewogICAgICAgICAgICBwcmludGYoIjnkvY06JWTkurrnm65cbiIsIGkgKyAxKTsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgfQogICAgfQogICAgcmV0dXJuIDA7Cn0=