結果
問題 |
No.1868 Teleporting Cyanmond
|
ユーザー |
|
提出日時 | 2022-03-19 03:39:59 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 421 bytes |
コンパイル時間 | 324 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 86,784 KB |
最終ジャッジ日時 | 2024-10-03 16:45:42 |
合計ジャッジ時間 | 3,332 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | WA * 25 |
ソースコード
#!/usr/bin/env python3 def main(): N = int(input()) R = list(map(lambda i: int(i) - 1, input().split())) + [N - 1] now = 0 next = R[0] ans = 0 while now < N - 1: checked = now now = next temp = 0 for i in range(checked + 1, R[next] + 1): if R[i] >= temp: next = i ans += 1 print(ans) if __name__ == '__main__': main()