2018 牛客多校第六场 C Generation I (组合数)

https://www.nowcoder.com/acm/contest/144/C

 

题意:给定n个集合, 要求用n次操作, 第i次操作用1~m中一个数填入 i ~ n个集合中, 集合无序而且元素不重复。

 

思路:

2018 牛客多校第六场 C Generation I (组合数)_第1张图片

代码:

#include
using namespace std;
#define ll long long
const int maxn=1e6+5;
const int mod=998244353;
ll inv[maxn];
void init()
{
    inv[0]=inv[1]=1;
    for(int i=2; i

 

你可能感兴趣的:(2018牛客多校,=====Online,Judge=====,-------搜索------,========,Type,========)