{"problem":{"name":"Add and Mex","description":{"content":"You are given an integer sequence $A=(A_1,A_2,\\ldots,A_N)$ of length $N$. Perform the following operation $M$ times: *   For each $i\\ (1\\leq i \\leq N)$, add $i$ to $A_i$. Then, find the minimum non-n","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc272_e"},"statements":[{"statement_type":"Markdown","content":"You are given an integer sequence $A=(A_1,A_2,\\ldots,A_N)$ of length $N$.\nPerform the following operation $M$ times:\n\n*   For each $i\\ (1\\leq i \\leq N)$, add $i$ to $A_i$. Then, find the minimum non-negative integer not contained in $A$.\n\n## Constraints\n\n*   $1\\leq N,M \\leq 2\\times 10^5$\n*   $-10^9\\leq A_i\\leq 10^9$\n*   All values in the input are integers.\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$N$ $M$ \n$A_1$ $A_2$ $\\ldots$ $A_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc272_e","tags":[],"sample_group":[["3 3\n-1 -1 -6","2\n2\n0\n\nThe $1$\\-st operation makes the sequence $A$\n$(-1 + 1, -1 +2 ,-6+3) = (0,1,-3).$\nThe minimum non-negative integer not contained in $A$ is $2$.\nThe $2$\\-nd operation makes the sequence $A$\n$(0 + 1, 1 +2 ,-3+3) = (1,3,0).$\nThe minimum non-negative integer not contained in $A$ is $2$.\nThe $3$\\-rd operation makes the sequence $A$\n$(1 + 1, 3 +2 ,0+3) = (2,5,3).$\nThe minimum non-negative integer not contained in $A$ is $0$."],["5 6\n-2 -2 -5 -7 -15","1\n3\n2\n0\n0\n0"]],"created_at":"2026-03-03 11:01:14"}}