結果
問題 |
No.2851 Make Pairs
|
ユーザー |
|
提出日時 | 2024-08-25 17:24:44 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 262 bytes |
コンパイル時間 | 514 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 35,700 KB |
最終ジャッジ日時 | 2024-08-25 17:24:48 |
合計ジャッジ時間 | 4,223 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 TLE * 1 -- * 5 |
ソースコード
n = int(input()) A = list(map(int,input().split())) ans = 0 act = 0 i = 0 j = 0 while i < len(A): act = A[i] j = i + 1 while j < len(A): if A[j] == act: ans += 1 A.pop(j) A.pop(i) break j += 1 else: i += 1 print(ans)