My solution of Aizu Online Judge.