結果
| 問題 | No.29 パワーアップ | 
| コンテスト | |
| ユーザー |  moti | 
| 提出日時 | 2015-12-28 06:27:37 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 1,191 bytes | 
| コンパイル時間 | 915 ms | 
| コンパイル使用メモリ | 110,588 KB | 
| 実行使用メモリ | 7,716 KB | 
| 最終ジャッジ日時 | 2025-10-24 20:55:27 | 
| 合計ジャッジ時間 | 1,680 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 22 | 
ソースコード
#include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <complex>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <iomanip>
#include <assert.h>
#include <array>
#include <cstdio>
#include <cstring>
#include <random>
#include <functional>
#include <numeric>
#include <bitset>
using namespace std;
#define REP(i,a,b) for(int i=a;i<(int)b;i++)
#define rep(i,n) REP(i,0,n)
#define all(c) (c).begin(), (c).end()
#define zero(a) memset(a, 0, sizeof a)
#define minus(a) memset(a, -1, sizeof a)
template<class T1, class T2> inline bool minimize(T1 &a, T2 b) { return b < a && (a = b, 1); }
template<class T1, class T2> inline bool maximize(T1 &a, T2 b) { return a < b && (a = b, 1); }
typedef long long ll;
int const inf = 1<<29;
int main() {
  int N; cin >> N;
  map<int, int> items;
  rep(i, N) {
    int x, y, z; cin >> x >> y >> z;
    items[x]++, items[y]++, items[z]++;
  }
  int ans = 0;
  for(auto& e: items) {
    ans += e.second / 2;
    e.second %= 2;
  }
  int rem = 0;
  for(auto& e: items) {
    rem += e.second;
  }
  ans += rem / 4;
  cout << ans << endl;
  return 0;
}
            
            
            
        