{"problem":{"name":"Bomb Game 2","description":{"content":"There are $N$ people standing in a line, with person $i$ standing at the $i$\\-th position from the front. Repeat the following operation until there is only one person left in the line: *   Remove th","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc333_f"},"statements":[{"statement_type":"Markdown","content":"There are $N$ people standing in a line, with person $i$ standing at the $i$\\-th position from the front.\nRepeat the following operation until there is only one person left in the line:\n\n*   Remove the person at the front of the line with a probability of $\\frac{1}{2}$, otherwise move them to the end of the line.\n\nFor each person $i=1,2,\\ldots,N$, find the probability that person $i$ is the last person remaining in the line, modulo $998244353$. (All choices to remove or not are random and independent.)\nHow to find probabilities modulo $998244353$The probabilities sought in this problem can be proven to always be a rational number. Furthermore, the constraints of this problem guarantee that if the sought probability is expressed as an irreducible fraction $\\frac{y}{x}$, then $x$ is not divisible by $998244353$.\nNow, there is a unique integer $z$ between $0$ and $998244352$, inclusive, such that $xz \\equiv y \\pmod{998244353}$. Report this $z$.\n\n## Constraints\n\n*   $2\\leq N\\leq 3000$\n*   All input values are integers.\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc333_f","tags":[],"sample_group":[["2","332748118 665496236\n\nPerson $1$ will be the last person remaining in the line with probability $\\frac{1}{3}$.\nPerson $2$ will be the last person remaining in the line with probability $\\frac{2}{3}$."],["5","235530465 792768557 258531487 238597268 471060930"]],"created_at":"2026-03-03 11:01:13"}}