AtCoder上にある問題のうち、AtCoder Problemsでdiff 800以上と判定されているものを順番に解いていく企画。
基本的な考え方は全てコード中のコメントに入れてあるので、参照のこと。
出典:
AtCoder Regular Contest 067 D – Walk and Teleport
単純な貪欲法の問題。歩いたほうが得なら歩く、という感じ。
[pastacode lang=”python” user=”scrblbug” repos=”atcoder” path_id=”python/arc067_d.py” revision=”” highlight=”” lines=”” provider=”github”/]