結果
| 問題 |
No.2851 Make Pairs
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-08-25 13:37:15 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 226 ms / 2,000 ms |
| コード長 | 234 bytes |
| コンパイル時間 | 159 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 36,708 KB |
| 最終ジャッジ日時 | 2024-08-25 13:37:20 |
| 合計ジャッジ時間 | 1,836 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 8 |
ソースコード
from collections import defaultdict
N = int(input())
A = list(map(int, input().split()))
dic = defaultdict(int)
ans = 0
for a in A:
if dic[a] == 1:
dic[a] -= 1
ans += 1
else:
dic[a] += 1
print(ans)