{"problem":{"name":"Shift","description":{"content":"Given is a string $S$ consisting of `0` and `1`. Find the number of strings, modulo $998244353$, that can result from applying the following operation on $S$ between $0$ and $K$ times (inclusive): * ","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":3000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"agc046_c"},"statements":[{"statement_type":"Markdown","content":"Given is a string $S$ consisting of `0` and `1`. Find the number of strings, modulo $998244353$, that can result from applying the following operation on $S$ between $0$ and $K$ times (inclusive):\n\n*   Choose a pair of integers $i, j$ $(1\\leq i < j\\leq |S|)$ such that the $i$\\-th and $j$\\-th characters of $S$ are `0` and `1`, respectively. Remove the $j$\\-th character from $S$ and insert it to the immediate left of the $i$\\-th character.\n\n## Constraints\n\n*   $1 \\leq |S| \\leq 300$\n*   $0 \\leq K \\leq 10^9$\n*   $S$ consists of `0` and `1`.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$S$ $K$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"agc046_c","tags":[],"sample_group":[["0101 1","4\n\nFour strings, `0101`, `0110`, `1001`, and `1010`, can result."],["01100110 2","14"],["1101010010101101110111100011011111011000111101110101010010101010101 20","113434815"]],"created_at":"2026-03-03 11:01:14"}}