{"problem":{"name":"Convex Sequence","description":{"content":"Given are integers $N$ and $M$. Find the number, modulo $(10^9+7)$, of length-$N$ sequences $(A_1,A_2,\\ldots,A_N)$ that consist of non-negative integers and satisfy the following conditions: *   $A_1","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"agc049_d"},"statements":[{"statement_type":"Markdown","content":"Given are integers $N$ and $M$. Find the number, modulo $(10^9+7)$, of length-$N$ sequences $(A_1,A_2,\\ldots,A_N)$ that consist of non-negative integers and satisfy the following conditions:\n\n*   $A_1+A_2+\\ldots +A_N = M$;\n*   For every $i$ ($2 \\leq i \\leq N-1$), $2 A_i \\leq A_{i-1} + A_{i+1}$.\n\n## Constraints\n\n*   $1 \\leq N \\leq 10^5$\n*   $1 \\leq M \\leq 10^5$\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$ $M$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"agc049_d","tags":[],"sample_group":[["3 3","7\n\nThe following seven sequences satisfy the conditions.\n\n*   $0,0,3$\n*   $0,1,2$\n*   $1,0,2$\n*   $1,1,1$\n*   $2,0,1$\n*   $2,1,0$\n*   $3,0,0$"],["10 100","10804516"],["10000 100000","694681734"]],"created_at":"2026-03-03 11:01:14"}}