上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 34 下一页

2017年7月24日

错排公式 (递推)

摘要: n封信放入n个信封,要求全部放错,共有多少种放法,记n个元素的错排总数为f(n) 注意: f[0]=1; f[1]=0; f[2]=1; f(n)=(n-1)*(f(n-1)+f(n-2)) 阅读全文

posted @ 2017-07-24 14:15 Yxter 阅读(356) 评论(0) 推荐(0) 编辑

快速求排列组合 lucas定理

摘要: 对于C(n, m) mod p。这里的n,m,p(p为素数)都很大的情况。 就不能再用C(n, m) = C(n - 1,m) + C(n - 1, m - 1)的公式递推了。 一般lucas定理的p不能大,在1e6以内,一下代码应该可以吧 上面是在线的算法,如果数字小还可以用以下写法 阅读全文

posted @ 2017-07-24 12:51 Yxter 阅读(295) 评论(0) 推荐(0) 编辑

fzu Problem 2275 Game(kmp)

摘要: Problem 2275 Game Accept: 62 Submit: 165Time Limit: 1000 mSec Memory Limit : 262144 KB Accept: 62 Submit: 165Time Limit: 1000 mSec Memory Limit : 2621 阅读全文

posted @ 2017-07-24 11:01 Yxter 阅读(300) 评论(0) 推荐(0) 编辑

2017年7月21日

HDU 3635 Dragon Balls(并查集)

摘要: Dragon Balls Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description Five hundred years later, the number of dragon balls will in 阅读全文

posted @ 2017-07-21 21:08 Yxter 阅读(155) 评论(0) 推荐(0) 编辑

HDU 3172 Virtual Friends(map+并查集)

摘要: Virtual Friends Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description These days, you can do all sorts of things online. For ex 阅读全文

posted @ 2017-07-21 16:14 Yxter 阅读(155) 评论(0) 推荐(0) 编辑

hdu 2818 Building Block(并查集,有点点复杂)

摘要: Building Block Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5811 Accepted Submission(s): 1790 阅读全文

posted @ 2017-07-21 15:00 Yxter 阅读(270) 评论(0) 推荐(0) 编辑

hdu 1272 小希的迷宫(并查集)

摘要: 小希的迷宫 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 51962 Accepted Submission(s): 16210 Problem 阅读全文

posted @ 2017-07-21 13:50 Yxter 阅读(156) 评论(0) 推荐(0) 编辑

2017年7月20日

HDU 1198 Farm Irrigation(并查集+位运算)

摘要: Farm Irrigation Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description Benny has a spacious farm land to irrigate. The farm land 阅读全文

posted @ 2017-07-20 11:01 Yxter 阅读(142) 评论(0) 推荐(0) 编辑

2017年7月19日

HDU 5821 Ball (贪心)

摘要: Ball Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1079 Accepted Submission(s): 648 Problem Des 阅读全文

posted @ 2017-07-19 10:47 Yxter 阅读(168) 评论(0) 推荐(0) 编辑

hdu 5826 physics (物理数学,积分)

摘要: physics Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 817 Accepted Submission(s): 454 Problem D 阅读全文

posted @ 2017-07-19 10:42 Yxter 阅读(295) 评论(0) 推荐(0) 编辑

上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 34 下一页

导航