Codechef December 2013 Long: RECTQUER