Disky and Sooma, two of the biggest mega minds of Bangladesh went to a far country. They ate, coded and wandered around, even in their holidays. They passed several months in this way. But everything has an end. A holy person, Munsiji came into their…
Disky and Sooma, two of the biggest mega minds of Bangladesh went to a far country. They ate, coded and wandered around, even in their holidays. They passed several months in this way. But everything has an end. A holy person, Munsiji came into their…
这道题有点类似动态规划,设答案为f(n) 第一个人有i个人,就有c(n,i)种可能 然后后面有f(n-i)种可能,所以相乘,然后枚举所有可能加起来就ok了. #include<cstdio> #define REP(i, a, b) for(int i = (a); i < (b); i++) using namespace std; const int MAXN = 1123; const int MOD = 10056; int c[MAXN][MAXN], f[MAXN]; voi…