結果
| 問題 | No.1868 Teleporting Cyanmond |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-03-13 06:50:56 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 170 bytes |
| 記録 | |
| コンパイル時間 | 240 ms |
| コンパイル使用メモリ | 95,972 KB |
| 実行使用メモリ | 99,328 KB |
| 最終ジャッジ日時 | 2026-08-29 16:52:26 |
| 合計ジャッジ時間 | 4,155 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | WA * 25 |
ソースコード
N = int(input())
R = list(map(int, input().split()))
dp = [float('inf')] * (N)
dp[0] = 0
for s, g in enumerate(R):
dp[g-1] = min(dp[g-1], dp[s] + 1)
print (dp[N-1])