深さ優先探索
depth-first search
A - 深さ優先探索
from
AtCoder Typical Contest 001