杨辉三角的行、列均从 0 开始编号,第 n 行第 m 个数就是组合数 C(n,m)。
预处理阶乘和逆元阶乘到 10^4,之后每组询问 O(1) 回答,答案对 998244353 取模。
O(max n + t)。
By signing up a GDUFACM universal account, you can submit code in all online judging services provided by us.
使用您的 GDUFACM 通用账户