Nexcal's submission of Hard Sequence | CodeChef