結果
| 問題 |
No.1438 Broken Drawers
|
| コンテスト | |
| ユーザー |
burita083
|
| 提出日時 | 2021-03-26 21:59:49 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 335 bytes |
| コンパイル時間 | 163 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 52,148 KB |
| 最終ジャッジ日時 | 2024-11-28 23:08:19 |
| 合計ジャッジ時間 | 55,875 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 4 WA * 3 TLE * 18 |
ソースコード
N = int(input())
A = list(map(int, input().split()))
ban = set()
right = set()
for n in range(N):
right.add(n+1)
ans = []
for n in range(N):
current = A[n]
right.remove(current)
if not current in ban:
ans.append(current)
if current-1 >= 1:
if not current -1 in ans:
ban.add(current-1)
print(len(ans))
burita083