solved contest problems!