apple pie's submission of MEX-OR | CodeChef