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