結果
問題 | No.268 ラッピング(Easy) |
ユーザー | kentahama |
提出日時 | 2015-08-21 23:35:13 |
言語 | C90 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 680 bytes |
コンパイル時間 | 1,041 ms |
コンパイル使用メモリ | 23,548 KB |
実行使用メモリ | 4,380 KB |
最終ジャッジ日時 | 2023-09-25 15:31:43 |
合計ジャッジ時間 | 1,819 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 0 ms
4,380 KB |
testcase_01 | AC | 1 ms
4,380 KB |
testcase_02 | AC | 1 ms
4,380 KB |
testcase_03 | AC | 0 ms
4,380 KB |
testcase_04 | AC | 1 ms
4,376 KB |
testcase_05 | AC | 1 ms
4,380 KB |
testcase_06 | AC | 1 ms
4,380 KB |
testcase_07 | AC | 0 ms
4,380 KB |
testcase_08 | AC | 1 ms
4,380 KB |
testcase_09 | AC | 1 ms
4,376 KB |
testcase_10 | AC | 0 ms
4,380 KB |
testcase_11 | AC | 0 ms
4,380 KB |
testcase_12 | AC | 1 ms
4,376 KB |
ソースコード
#include <stdio.h> int length(int L1, int L2, int L3, int R, int B, int Y) { return (R * (L2 + L3) + B * (L1 + L3) + Y * (L1 + L2)) * 2; } int main(void) { int l1, l2, l3; int r, b, y; int ret, r0, r1, r2, s1, s2, s3; scanf("%d %d %d %d %d %d", &l1, &l2, &l3, &r, &b, &y); r0 = length(l1, l2, l3, r, b, y); r1 = length(l2, l3, l1, r, b, y); r2 = length(l3, l1, l2, r, b, y); s1 = length(l1, l3, l2, r, b, y); s2 = length(l3, l2, l1, r, b, y); s3 = length(l2, l1, l3, r, b, y); ret = r0; if(ret > r1) ret = r1; if(ret > r2) ret = r2; if(ret > s1) ret = s1; if(ret > s2) ret = s2; if(ret > s3) ret = s3; printf("%d\n", ret); return 0; }