MojaCoder
Playground
Problems
Post Problem
Contests
Create Contest
EN
JA
Sign up
Sign in
Shortest Path on Grid (Easy)
2 secs
1024 MB
michirakara
Tweet
Problem
Submissions
Test cases
Editorial
簡単なDPの問題です。
DP[i][j]を数字がiであるマスのj個目に行くときの最短距離とすると解くことができます。
PythonだとTLEしてしまうのでPyPyで提出しましょう。