Rosetta Problems

Segment on Grid Paper

https://atcoder.jp/contests/cf16-relay-open/tasks/relay_e