HDU 1312 (bfs)