結果

問題 No.29 パワーアップ
ユーザー mosmos_21mosmos_21
提出日時 2016-02-14 16:56:28
言語 C90
(gcc 8.5.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 332 bytes
コンパイル時間 81 ms
使用メモリ 6,328 KB
最終ジャッジ日時 2023-03-30 21:01:10
合計ジャッジ時間 1,447 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 1 ms
6,264 KB
testcase_01 AC 1 ms
6,192 KB
testcase_02 AC 0 ms
6,328 KB
testcase_03 AC 1 ms
6,268 KB
testcase_04 AC 0 ms
6,268 KB
testcase_05 AC 1 ms
6,208 KB
testcase_06 AC 0 ms
6,184 KB
testcase_07 AC 0 ms
6,196 KB
testcase_08 AC 0 ms
6,280 KB
testcase_09 AC 1 ms
6,272 KB
testcase_10 AC 1 ms
6,280 KB
testcase_11 AC 1 ms
6,276 KB
testcase_12 AC 0 ms
6,272 KB
testcase_13 AC 1 ms
6,204 KB
testcase_14 AC 0 ms
6,288 KB
testcase_15 AC 1 ms
6,168 KB
testcase_16 AC 1 ms
6,176 KB
testcase_17 AC 0 ms
6,208 KB
testcase_18 AC 0 ms
6,272 KB
testcase_19 AC 1 ms
6,192 KB
testcase_20 AC 1 ms
6,192 KB
testcase_21 AC 0 ms
6,184 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

int main(){
	int N,item[11] = {0}, sum = 0;
	int i, j, t, s = 0;

	scanf("%d", &N);

	for(i = 0; i < N; i++){
		for(j = 0; j < 3; j++){
			scanf("%d", &t);
			item[t] ++;
			if(item[t] == 2){
				item[t] = 0;
				sum++;
			}
		}
	}
	for(i = 1; i < 11; i++)
		s += item[i];
	sum += s / 4;

	printf("%d\n", sum);
}
0