結果
| 問題 | No.29 パワーアップ | 
| コンテスト | |
| ユーザー |  focus | 
| 提出日時 | 2018-02-01 16:32:24 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 450 bytes | 
| コンパイル時間 | 474 ms | 
| コンパイル使用メモリ | 68,792 KB | 
| 実行使用メモリ | 7,716 KB | 
| 最終ジャッジ日時 | 2025-10-24 21:05:02 | 
| 合計ジャッジ時間 | 1,272 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 22 | 
ソースコード
#include<iostream>
#include<vector>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<string>
using namespace std;
int main(){
    int n,a,b,c,table[11]={},sum=0,ans=0;
    cin >> n;
    while(n--){
        cin >> a >> b >> c;
        table[a]++;
        table[b]++;
        table[c]++;
    }
    for(int i=1;i<=10;i++){
        ans += (table[i]/2);
        sum += (table[i]%2);
    }
    ans += (sum/4);
    cout << ans;
    return 0;
}
            
            
            
        