MEX Revised

Limits 500ms, 512 MB

You are given an array (initially which is empty) and also given two types of operations:


This is a companion discussion topic for the original entry at https://toph.co/p/mex-revised