結果

問題 No.365 ジェンガソート
ユーザー Surlive
提出日時 2023-02-07 18:22:40
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 342 bytes
コンパイル時間 243 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 25,228 KB
最終ジャッジ日時 2024-07-05 13:46:21
合計ジャッジ時間 5,109 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16 TLE * 1 -- * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
line = list(map(int, input().split(' ')))
def find_where(Line, num, M):
    for i in range(M):
        if Line[i] == num:
            return i
    return -1

result = N
index = N
for i in range(N):
    index = find_where(line, N-i, index)
    if index != -1:
        result -= 1
    else:
        break

print(result)        
0