結果

問題 No.29 パワーアップ
ユーザー yuppe19 😺yuppe19 😺
提出日時 2015-04-16 20:05:28
言語 Python2
(2.7.18)
結果
AC  
実行時間 12 ms / 5,000 ms
コード長 316 bytes
コンパイル時間 121 ms
使用メモリ 6,556 KB
最終ジャッジ日時 2023-02-06 08:57:55
合計ジャッジ時間 2,021 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 12 ms
6,264 KB
testcase_01 AC 11 ms
6,492 KB
testcase_02 AC 11 ms
6,440 KB
testcase_03 AC 12 ms
6,496 KB
testcase_04 AC 11 ms
6,256 KB
testcase_05 AC 11 ms
6,260 KB
testcase_06 AC 12 ms
6,260 KB
testcase_07 AC 11 ms
6,468 KB
testcase_08 AC 12 ms
6,496 KB
testcase_09 AC 11 ms
6,252 KB
testcase_10 AC 11 ms
6,252 KB
testcase_11 AC 12 ms
6,392 KB
testcase_12 AC 12 ms
6,244 KB
testcase_13 AC 12 ms
6,464 KB
testcase_14 AC 12 ms
6,244 KB
testcase_15 AC 12 ms
6,556 KB
testcase_16 AC 11 ms
6,552 KB
testcase_17 AC 11 ms
6,252 KB
testcase_18 AC 11 ms
6,504 KB
testcase_19 AC 11 ms
6,332 KB
testcase_20 AC 11 ms
6,324 KB
testcase_21 AC 11 ms
6,324 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/python
from collections import Counter 
from itertools import chain
flatten = lambda listOfLists: chain.from_iterable(listOfLists)

N = int(raw_input())
vals = Counter(flatten([map(int, raw_input().split()) for _ in xrange(N)])).values()
print sum(e/2 for e in vals) + len(filter(lambda e: e&1, vals)) / 4
0