結果

問題 No.1438 Broken Drawers
ユーザー burita083burita083
提出日時 2021-03-26 21:51:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 309 bytes
コンパイル時間 270 ms
コンパイル使用メモリ 10,664 KB
実行使用メモリ 46,156 KB
最終ジャッジ日時 2023-08-19 08:03:52
合計ジャッジ時間 6,407 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,904 KB
testcase_01 AC 15 ms
7,804 KB
testcase_02 AC 16 ms
7,844 KB
testcase_03 WA -
testcase_04 AC 16 ms
7,884 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 203 ms
38,008 KB
testcase_08 WA -
testcase_09 AC 16 ms
7,796 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
0