{"problem":{"name":"Sum of SCC","description":{"content":"Consider a directed graph $G$ with $N$ vertices numbered $1$ to $N$ that satisfies all of the following conditions. *   $G$ is a tournament. In other words, $G$ has no multi-edges or self-loops, 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":"arc163_d"},"statements":[{"statement_type":"Markdown","content":"Consider a directed graph $G$ with $N$ vertices numbered $1$ to $N$ that satisfies all of the following conditions.\n\n*   $G$ is a tournament. In other words, $G$ has no multi-edges or self-loops, and for any two vertices $u,v$ of $G$, exactly one of the edges $u \\rightarrow v$ and $v \\rightarrow u$ exists.\n    \n*   Among the edges of $G$, exactly $M$ are directed from a vertex with a smaller number to a vertex with a larger number.\n    \n\nFind the total number of strongly connected components over all such directed graphs $G$, modulo $998244353$.\n\n## Constraints\n\n*   $1 \\le N \\le 30$\n*   $0 \\le M \\le \\frac{N(N-1)}{2}$\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":"arc163_d","tags":[],"sample_group":[["3 1","7\n\nBelow are the three directed graphs $G$ that satisfy the conditions. The numbers of their strongly connected components are $3,1,3$ from left to right, so the answer is $7$.\n![image](https://img.atcoder.jp/arc163/ee8acabc2a7d48164b3cc568e88f0840.png)"],["6 2","300"],["25 156","902739687"]],"created_at":"2026-03-03 11:01:13"}}