Rewrite entire code because logic was incorrect.
Rewrite entire code because logic was incorrect.

paramsingh/codechef-solutions,paramsingh/cp,paramsingh/cp,paramsingh/cp,paramsingh/cp,paramsingh/codechef-solutions,paramsingh/codechef-solutions,paramsingh/codechef-solutions,paramsingh/cp