{"problem":{"name":"Powers","description":{"content":"Given are integer sequence of length $N$, $A = (A_1, A_2, \\cdots, A_N)$, and an integer $K$. For each $X$ such that $1 \\le X \\le K$, find the following value: $\\left(\\displaystyle \\sum_{L=1}^{N-1} \\su","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":3000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"arc106_d"},"statements":[{"statement_type":"Markdown","content":"Given are integer sequence of length $N$, $A = (A_1, A_2, \\cdots, A_N)$, and an integer $K$.\nFor each $X$ such that $1 \\le X \\le K$, find the following value:\n$\\left(\\displaystyle \\sum_{L=1}^{N-1} \\sum_{R=L+1}^{N} (A_L+A_R)^X\\right) \\bmod 998244353$\n\n## Constraints\n\n*   All values in input are integers.\n*   $2 \\le N \\le 2 \\times 10^5$\n*   $1 \\le K \\le 300$\n*   $1 \\le A_i \\le 10^8$\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$ $K$\n$A_1$ $A_2$ $\\cdots$ $A_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"arc106_d","tags":[],"sample_group":[["3 3\n1 2 3","12\n50\n216\n\nIn the $1$\\-st line, we should print $(1+2)^1 + (1+3)^1 + (2+3)^1 = 3 + 4 + 5 = 12$.\nIn the $2$\\-nd line, we should print $(1+2)^2 + (1+3)^2 + (2+3)^2 = 9 + 16 + 25 = 50$.\nIn the $3$\\-rd line, we should print $(1+2)^3 + (1+3)^3 + (2+3)^3 = 27 + 64 + 125 = 216$."],["10 10\n1 1 1 1 1 1 1 1 1 1","90\n180\n360\n720\n1440\n2880\n5760\n11520\n23040\n46080"],["2 5\n1234 5678","6912\n47775744\n805306038\n64822328\n838460992\n\nBe sure to print the sum modulo $998244353$."]],"created_at":"2026-03-03 11:01:13"}}