codechef; solve "The Army" from October Cook-Off 2014