摘要: 运用斯特林公式。。。。。--!#include #include #include #include #include #define PI 3.141592653#define E 2.71828182using namespace std;int main(){ int T; double n;... 阅读全文
posted @ 2014-10-12 23:41 chenjunjie1994 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 想了很久,终于想到了。。。。向后看到F,向前看到B,假如把N-1个楼分成F+B个组,则把每个组最高的楼作为看到的楼,那么,其实在确定每一组的最高楼时,左边或右边的最高楼的顺序已经确定了。由于是排列数,联想到第一类斯特灵数,即可以顺利解决。那么,分成F+B个组后,选出B个组放在右边(最高楼的右边)即可... 阅读全文
posted @ 2014-10-12 17:33 chenjunjie1994 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 有点置换群的味道。当撞开一个门后,能打开一连串的门,即是可以排成一个圈。求的是种数,于是,可以使用第一类斯特林数,求出撞了0~K次的种数。但是,注意,当第一个门为独自一个圈时,是不可行的,因为这代表第一个门要撞开,这违犯规则。所以,把第一个门独立成圈的情况去掉。即是求出S(N-1,K-1)以前的各种... 阅读全文
posted @ 2014-10-12 14:51 chenjunjie1994 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 水题#include #include #include #define LL __int64#define MOD 1000using namespace std;LL str[2001][2001];void initial(){ for(LL i=0;i=1) str[i][j]=0; e... 阅读全文
posted @ 2014-10-12 12:26 chenjunjie1994 阅读(218) 评论(0) 推荐(0) 编辑
摘要: (第二类斯特林数*N的阶乘 )的和。#include #include #include #define LL __int64#define MOD 20090126using namespace std;LL str[101][101];LL con[101];void initial(){ co... 阅读全文
posted @ 2014-10-12 12:24 chenjunjie1994 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 其实求的是BELL数,即前N个第二类斯特林数的和。一首诗有n行,每一行有一种韵律,问这首诗总共可能有多少种韵律排列。如4行,则所有的15种情况为:aaaa, aaab, aaba, aabb, aabc, abaa, abab, abac, abba, abbb, abbc, abca, a bcb... 阅读全文
posted @ 2014-10-12 11:53 chenjunjie1994 阅读(326) 评论(0) 推荐(0) 编辑
摘要: 上面的估计是题解吧。。。。呃,如果真要用到公式的话,确实没听过。。。。#include #include #include #define LL __int64LL work(LL n){ LL res=0; LL divd=2; while(divd<=n){ res+=(n/divd); d... 阅读全文
posted @ 2014-10-12 11:32 chenjunjie1994 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 已知n,求n中取k(k#include #include #define LL __int64using namespace std;LL con_mul[15],Str[15][15];void initial(){ con_mul[0]=1; for(LL i=1;i=1){ Str[i]... 阅读全文
posted @ 2014-10-12 09:20 chenjunjie1994 阅读(213) 评论(0) 推荐(0) 编辑