vitya专题

G - Vitya and Strange Lesson(数组-字典树)

G - Vitya and Strange Lesson  CodeForces - 842D  Today at the lesson Vitya learned a very interesting function — mex. Mex of a sequence of numbers is the minimum non-negative number that is not pres