随笔分类 -  【数学】-> 组合数学

摘要:hdu 4372 Count the Buildings推荐这位小哥的,我觉得人家说的灰常的好。注意数据范围,n,f,b均在(0,2000]范围内,而第一斯特林数的数组范围却是s[2000+5][2000+5]的(你要是开4000会内存超限),所以要加一个对(f+b-2)的判断,否则C++过不了,G... 阅读全文

posted @ 2015-08-11 09:20 LLGemini 阅读(250) 评论(0) 推荐(0)

摘要:两类Stirling Number的简介与区别(参考自ACdreamer的CSDN)Stirling Number I ---s(n,k):将n个物体排成k个非空循环排列(环)的方法数。递推式:s(n, k) = (n-1)*s(n-1, k) + s(n-1, k-1);1=1 ... 阅读全文

posted @ 2015-08-10 23:59 LLGemini 阅读(229) 评论(0) 推荐(0)

摘要:DescriptionMr. Young wishes to take a picture of his class. The students will stand in rows with each row no longer than the row behind it and the lef... 阅读全文

posted @ 2015-05-28 16:53 LLGemini 阅读(598) 评论(0) 推荐(0)