結果
問題 | No.29 パワーアップ |
ユーザー |
![]() |
提出日時 | 2017-09-18 22:30:53 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 34 ms / 5,000 ms |
コード長 | 465 bytes |
コンパイル時間 | 369 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-11-08 02:36:59 |
合計ジャッジ時間 | 1,740 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
import sys from collections import defaultdict try: import mydebug def dprint(*objects): print(*objects) except: def dprint(*objects, sep='', end='\n'): pass n = int(input()) dic = defaultdict(int) a = [0, 0, 0] for i in range(n): a[0], a[1], a[2] = [int(x) for x in input().split()] for j in range(3): dic[a[j]] += 1 ans = 0 left = 0 for k, v in dic.items(): ans += v // 2 left += v % 2 ans += left // 4 print(ans)