結果
| 問題 | No.29 パワーアップ | 
| コンテスト | |
| ユーザー |  norioc | 
| 提出日時 | 2024-06-20 04:39:14 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 41 ms / 5,000 ms | 
| コード長 | 308 bytes | 
| コンパイル時間 | 228 ms | 
| コンパイル使用メモリ | 82,376 KB | 
| 実行使用メモリ | 55,232 KB | 
| 最終ジャッジ日時 | 2025-10-24 21:20:51 | 
| 合計ジャッジ時間 | 1,928 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 22 | 
ソースコード
from collections import Counter
N = int(input())
freq = Counter()
for _ in range(N):
    a, b, c = map(int, input().split())
    freq[a] += 1
    freq[b] += 1
    freq[c] += 1
ans = 0
for k, v in freq.items():
    d, m = divmod(v, 2)
    ans += d
    freq[k] = m
ans += sum(freq.values()) // 4
print(ans)
            
            
            
        