codejam round1b problem b ac after match, too late