Submission #36789


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <stdio.h>
int main(){
typedef struct{
char na[21];
long long int jp,ma,en,to;
}St;
int n;
scanf("%d", &n);
St da[n];
int i;
for(i = 0;i < n;i++){
scanf("%s %lld %lld %lld", &da[i].na, &da[i].jp, &da[i].ma, &da[i].en);
da[i].to = da[i].jp + da[i].ma + da[i].en;
}
long long int mi = 0;
for(i = 0;i < n;i++){
int j;
int id = 0;
int temp = da[0].to;
for(j = 1;j < n;j++){
if(temp < da[j].to){
temp = da[j].to;
id = j;
}
}
printf("%s %lld %lld %lld %lld\n", da[id].na, da[id].jp, da[id].ma, da[id].en, da[id].to);
da[id].to = -1;
}
return(0);
}

ステータス

項目 データ
問題 0941 - 中間テスト
ユーザー名 r1825
投稿日時 2018-06-05 17:47:15
言語 C
状態 Accepted
得点 1
ソースコード長 686 Byte
最大実行時間 29 ms
最大メモリ使用量 476 KB

セット

セット 得点 Cases
1 ALL 1 / 1 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
input001.txt AC 29 ms 380 KB
1
input002.txt AC 20 ms 412 KB
1
input003.txt AC 18 ms 412 KB
1
input004.txt AC 20 ms 444 KB
1
input005.txt AC 28 ms 476 KB
1