![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
容斥原理
圣诞老人家
这个作者很懒,什么都没留下…
展开
-
容斥原理--Sum
A - SumTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionXXX is puzzled with the question below: 1, 2, 3, ..., n (1Opera原创 2016-11-18 19:18:46 · 364 阅读 · 0 评论 -
容斥原理---The Boss on Mars
D - The Boss on MarsTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionOn Mars, there is a huge company called ACM (A huge Compan原创 2016-11-18 19:29:27 · 567 阅读 · 0 评论 -
hdu 6143 Killer Names dp
题 目 传 送 门:题意:给出一个m个字母的字母表,问我们能生成多少对字符串,该对字符串长度为n。并且字符串之间不能存在相同的字母思路1:dp[i][j]表示用j中颜色去涂i个格子(j中颜色全用上),然后直接dp。状态转移方程为:dp[i][j]=dp[i-1][j]*j+dp[i-1][j-1]*(m-(j-1));ac代码:#include using names原创 2017-08-18 12:10:35 · 195 阅读 · 0 评论