結果
| 問題 |
No.1868 Teleporting Cyanmond
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-03-11 21:44:50 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 81 ms / 2,000 ms |
| コード長 | 267 bytes |
| コンパイル時間 | 189 ms |
| コンパイル使用メモリ | 82,052 KB |
| 実行使用メモリ | 86,528 KB |
| 最終ジャッジ日時 | 2024-09-16 01:57:07 |
| 合計ジャッジ時間 | 2,975 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 |
ソースコード
n = int(input())
R = [0]+list(map(int,input().split()))+[n]
ans = 0
now = 1
while now < n:
m = 0
nex = R[now]
nind = 0
for i in range(now,nex+1):
if m <= R[i]:
m = R[i]
nind = i
ans += 1
now = nind
print(ans)