結果
| 問題 | No.29 パワーアップ | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2017-03-01 11:30:30 | 
| 言語 | C90 (gcc 12.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 1 ms / 5,000 ms | 
| コード長 | 469 bytes | 
| コンパイル時間 | 325 ms | 
| コンパイル使用メモリ | 37,952 KB | 
| 実行使用メモリ | 7,720 KB | 
| 最終ジャッジ日時 | 2025-10-24 21:00:14 | 
| 合計ジャッジ時間 | 1,010 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 22 | 
ソースコード
#include <stdio.h>
int main(void)
{
int N,a,b,c,i,item[10]={};
scanf("%d",&N);				/*敵を倒した回数*/
	
	
for(i=0;i<N;i++){			/*何アイテムが何個あるかcount*/
	
scanf("%d %d %d",&a,&b,&c);
	item[a-1]++;	
	item[b-1]++;	
	item[c-1]++;	
}
int up1=0,up2=0;
for(i=0;i<10;i++){			/*同じアイテムが2個の数と端数の数をcount*/
	up1=up1 + ( item[i]/2 );
	up2=up2 + ( item[i]%2 );
}
printf("%d\n",up1+(up2)/4);
return 0;
}
            
            
            
        