結果

問題 No.29 パワーアップ
ユーザー tookunn_1213
提出日時 2015-04-02 00:08:12
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 319 bytes
コンパイル時間 70 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-03 23:12:28
合計ジャッジ時間 1,093 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 8 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

N = input()
items = {}
for i in range(N):
	a = map(int,raw_input().split())
	for aa in a:
		if items.has_key(aa):
			items[aa] += 1
		else:
			items[aa] = 1
ans = 0
for key in items.keys():
	if items[key] >= 2:
		ans += items[key] / 2 
		items[key] -= (items[key] / 2) * 2
		del items[key]
ans += len(items)/4
print ans
0