{"problem":{"name":"Festival","description":{"content":"The AtCoder Kingdom holds a festival for $N$ days. On $M$ of these days, namely on the $A_1$\\-th, $A_2$\\-th, $\\dots$, $A_M$\\-th days, fireworks will be launched. It is guaranteed that fireworks will b","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc322_c"},"statements":[{"statement_type":"Markdown","content":"The AtCoder Kingdom holds a festival for $N$ days. On $M$ of these days, namely on the $A_1$\\-th, $A_2$\\-th, $\\dots$, $A_M$\\-th days, fireworks will be launched. It is guaranteed that fireworks will be launched on the last day of the festival. (In other words, $A_M=N$ is guaranteed.)\nFor each $i=1,2,\\dots,N$, solve the following problem.\n\n*   How many days later from the $i$\\-th day will fireworks be launched for the first time on or after the $i$\\-th day? If fireworks are launched on the $i$\\-th day, it is considered to be $0$ days later.\n\n## Constraints\n\n*   $1 \\le M \\le N \\le 2 \\times 10^5$\n*   $1 \\le A_1 < A_2 < \\dots < A_M = N$\n*   All input values 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$ $\\dots$ $A_M$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc322_c","tags":[],"sample_group":[["3 2\n2 3","1\n0\n0\n\nThe kingdom holds a festival for $3$ days, and fireworks are launched on the $2$\\-nd and $3$\\-rd days.\n\n*   From the $1$\\-st day, the first time fireworks are launched is the $2$\\-nd day of the festival, which is $1$ day later.\n*   From the $2$\\-nd day, the first time fireworks are launched is the $2$\\-nd day of the festival, which is $0$ days later.\n*   From the $3$\\-rd day, the first time fireworks are launched is the $3$\\-rd day of the festival, which is $0$ days later."],["8 5\n1 3 4 7 8","0\n1\n0\n0\n2\n1\n0\n0"]],"created_at":"2026-03-03 11:01:14"}}