結果
| 問題 | No.29 パワーアップ | 
| コンテスト | |
| ユーザー |  akun0716 | 
| 提出日時 | 2018-12-01 22:34:14 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 347 bytes | 
| コンパイル時間 | 339 ms | 
| コンパイル使用メモリ | 60,784 KB | 
| 実行使用メモリ | 7,716 KB | 
| 最終ジャッジ日時 | 2025-10-24 21:08:18 | 
| 合計ジャッジ時間 | 1,068 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 22 | 
ソースコード
#include <iostream>
using namespace std;
#define REP(i,n) for(int i=0;i<n;i++)
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
	int N,ans=0;
	cin>>N;
	int a[10]={0};
	REP(i,N){
		int x,y,z;
		cin>>x>>y>>z;
		a[x-1]++;
		a[y-1]++;
		a[z-1]++;
	}
	int b=0;
	REP(i,10){
		ans+=a[i]/2;
		b+=a[i]%2;
	}
	ans+=b/4;
	
	cout<<ans<<endl;
	return 0;
}
            
            
            
        