結果

問題 No.365 ジェンガソート
ユーザー yumenomatayume
提出日時 2020-04-05 13:11:10
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 60 ms / 2,000 ms
コード長 172 bytes
コンパイル時間 325 ms
コンパイル使用メモリ 82,012 KB
実行使用メモリ 82,076 KB
最終ジャッジ日時 2024-07-03 08:08:06
合計ジャッジ時間 4,490 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 41
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int,input().split()))

cnt = 0
match = n
for i in range(n):
    if a[n-1-i] == match:
        match -= 1
    else:
        cnt += 1
print(cnt)
0