結果

問題 No.29 パワーアップ
ユーザー hum_ophum_op
提出日時 2018-08-14 15:29:11
言語 C90
(gcc 8.5.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 519 bytes
コンパイル時間 288 ms
使用メモリ 1,956 KB
最終ジャッジ日時 2022-11-23 03:43:48
合計ジャッジ時間 1,598 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 1 ms
1,856 KB
testcase_01 AC 1 ms
1,800 KB
testcase_02 AC 1 ms
1,848 KB
testcase_03 AC 1 ms
1,804 KB
testcase_04 AC 1 ms
1,844 KB
testcase_05 AC 0 ms
1,936 KB
testcase_06 AC 1 ms
1,800 KB
testcase_07 AC 0 ms
1,956 KB
testcase_08 AC 0 ms
1,844 KB
testcase_09 AC 0 ms
1,788 KB
testcase_10 AC 1 ms
1,936 KB
testcase_11 AC 0 ms
1,848 KB
testcase_12 AC 1 ms
1,940 KB
testcase_13 AC 0 ms
1,876 KB
testcase_14 AC 1 ms
1,800 KB
testcase_15 AC 0 ms
1,800 KB
testcase_16 AC 1 ms
1,900 KB
testcase_17 AC 1 ms
1,800 KB
testcase_18 AC 0 ms
1,904 KB
testcase_19 AC 1 ms
1,800 KB
testcase_20 AC 0 ms
1,860 KB
testcase_21 AC 0 ms
1,852 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

int main(){
        int N;
        int a;
        int item[10] = {0};
        int i, j, m = 0;
        int lu = 0;
        scanf("%d", &N);
        for(i = 0; i < N; i++){
                for(j = 0; j < 3; j++){
                        scanf("%d", &a);
                        item[a-1]++;
                }
        }

        for(i = 0; i < 10; i++){
                lu += item[i] / 2;
                m += item[i] % 2;
        }
        lu += m / 4;
        printf("%d\n", lu);
        return 0;
}
0