{"problem":{"name":"I Wanna Win The Game","description":{"content":"Given are integers $N$ and $M$. How many sequences $A$ of $N$ integers satisfy the following conditions? *   $0 \\leq A_i \\left(i = 1, 2, \\ldots, N\\right)$ *   $\\sum_{i = 1}^{N} A_i = M$ *   $A_1$ xor","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"arc116_d"},"statements":[{"statement_type":"Markdown","content":"Given are integers $N$ and $M$. How many sequences $A$ of $N$ integers satisfy the following conditions?\n\n*   $0 \\leq A_i \\left(i = 1, 2, \\ldots, N\\right)$\n*   $\\sum_{i = 1}^{N} A_i = M$\n*   $A_1$ xor $A_2$ xor $\\cdots$ xor $A_N = 0$ (\"xor\" denotes the bitwise XOR.)\n\nSince the answer can be enormous, report it modulo $998244353$.\n\n## Constraints\n\n*   All values in input are integers.\n*   $1 \\leq N \\leq 5000$\n*   $1 \\leq M \\leq 5000$\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":"arc116_d","tags":[],"sample_group":[["5 20","475\n\nSome of the sequences $A$ satisfying the conditions follow:\n\n*   $A = \\left(10, 0, 10, 0, 0\\right)$\n*   $A = \\left(1, 2, 3, 7, 7\\right)$"],["10 5","0"],["3141 2718","371899128"]],"created_at":"2026-03-03 11:01:14"}}