For the detailed problem, please refer to LOJ #2599. Submissions for this problem are currently closed.
Using your Hydro universal account