{"problem":{"name":"ABS Ball","description":{"content":"There are $N$ white balls. First, you paint each ball red or blue. Then, you place these $N$ red or blue painted balls in one of $M$ distinguishable boxes. Let $a_i$ and $b_i$ be the number of red and","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"arc212_c"},"statements":[{"statement_type":"Markdown","content":"There are $N$ white balls. First, you paint each ball red or blue.\nThen, you place these $N$ red or blue painted balls in one of $M$ distinguishable boxes.\nLet $a_i$ and $b_i$ be the number of red and blue balls in the $i$\\-th box, respectively.\nFind the sum, modulo $998244353$, of $\\prod_{1\\leq i \\le M}|a_i-b_i|$ over all ways to place the balls.\nHere, two ways of placing balls are different if and only if at least one of $a_i$ and $b_i$ is different for some $i$.\nParticularly, **balls are not distinguished from each other**.\n\n## Constraints\n\n*   $1 \\le N,M \\le 10^7$\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\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"arc212_c","tags":[],"sample_group":[["2 1","4\n\nThere are three ways to place balls in box $1$.  \nIf you place one red ball and one blue ball, $|a_1-b_1|=0$.  \nIf you place two red balls or two blue balls, $|a_1-b_1|=2$.  \nTherefore, the answer is $0 + 2 + 2 = 4$."],["5 7","0"],["10000000 5000000","965172629"]],"created_at":"2026-03-03 11:01:13"}}