結果
問題 |
No.1438 Broken Drawers
|
ユーザー |
![]() |
提出日時 | 2021-03-26 21:51:22 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 309 bytes |
コンパイル時間 | 197 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 48,900 KB |
最終ジャッジ日時 | 2024-11-28 22:50:48 |
合計ジャッジ時間 | 6,714 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 3 WA * 22 |
ソースコード
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: ban.add(current-1) lb = len(ban) print(lb)