Mex in the Grid

Problem Name:
Mex in the Grid
Site:CodeForces
Links:
Tags: