結果
| 問題 | No.29 パワーアップ | 
| コンテスト | |
| ユーザー | 👑 | 
| 提出日時 | 2020-01-21 01:30:13 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 3 ms / 5,000 ms | 
| コード長 | 363 bytes | 
| コンパイル時間 | 477 ms | 
| コンパイル使用メモリ | 62,792 KB | 
| 実行使用メモリ | 7,716 KB | 
| 最終ジャッジ日時 | 2025-10-24 21:12:54 | 
| 合計ジャッジ時間 | 1,101 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 22 | 
ソースコード
#include <iostream>
using namespace std;
int nm[10];
int main(){
    int n;cin>>n;
    for(int i = 0; n > i; i++){
        for(int j = 0; 3 > j; j++){
            int t;cin>>t;
            nm[--t]++;
        }
    }
    int ans = 0;
    int s = 0;
    for(int i = 0; 10 > i; i++){
        ans += nm[i]/2;
        s += nm[i]%2;
    }
    cout << ans+s/4 << endl;
}
            
            
            
        