上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 34 下一页

2017年7月10日

HDU 4549 M斐波那契数列(矩阵快速幂+费马小定理)

摘要: M斐波那契数列 Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description M斐波那契数列F[n]是一种整数数列,它的定义如下:F[0] = aF[1] = bF[n] = F[n-1] * F[n-2] 阅读全文

posted @ 2017-07-10 16:06 Yxter 阅读(719) 评论(0) 推荐(1) 编辑

Poj 3318 Matrix Multiplication( 矩阵压缩)

摘要: Matrix Multiplication Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 18928 Accepted: 4074 Description You are given three n × n matrices A 阅读全文

posted @ 2017-07-10 15:57 Yxter 阅读(284) 评论(0) 推荐(1) 编辑

HDU 4704 Sum (隔板原理 + 费马小定理)

摘要: Sum Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description Sample Input 2 Sample Output 2 Hint 1. For N = 2, S(1) = S(2) = 1.2. 阅读全文

posted @ 2017-07-10 10:16 Yxter 阅读(335) 评论(0) 推荐(0) 编辑

2017年7月6日

HDU 3923 Invoker(polya定理+乘法逆元(扩展欧几里德+费马小定理))

摘要: Invoker Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description On of Vance's favourite hero is Invoker, Kael. As many people kno 阅读全文

posted @ 2017-07-06 17:31 Yxter 阅读(285) 评论(1) 推荐(0) 编辑

2017年7月5日

Polya定理

摘要: Polya定理:设G={π1,π2,π3........πn}是X={a1,a2,a3.......an}上一个置换群,用m中颜色对X中的元素进行涂色,那么不同的涂色方案数为:1/|G|*(mC(π1)+mC(π2)+mC(π3)+...+mC(πk)). 其中C(πk)为置换πk的循环节的个数。 阅读全文

posted @ 2017-07-05 16:02 Yxter 阅读(165) 评论(0) 推荐(0) 编辑

hdu 1817 Necklace of Beads(Polya定理)

摘要: Necklace of Beads Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 630 Accepted Submission(s): 232 阅读全文

posted @ 2017-07-05 15:53 Yxter 阅读(248) 评论(0) 推荐(0) 编辑

2017年5月13日

Poj 1651 Multiplication Puzzle(区间dp)

摘要: Multiplication Puzzle Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 10010 Accepted: 6188 Description The multiplication puzzle is played 阅读全文

posted @ 2017-05-13 20:01 Yxter 阅读(133) 评论(0) 推荐(0) 编辑

Poj 2955 brackets(区间dp)

摘要: Brackets Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7795 Accepted: 4136 Description We give the following inductive definition of a “r 阅读全文

posted @ 2017-05-13 16:45 Yxter 阅读(155) 评论(0) 推荐(0) 编辑

2017年5月5日

HDU 5875 Function (线段树+gcd / 单调栈)

摘要: 题意:给你一串数a再给你一些区间(lef,rig),求出a[lef]%a[lef+1]...%a[rig] 题解:我们可以发现数字a对数字b取模时:如果a<b,则等于原数,否则a会变小至少一半。就是说a最多成功取模(log2 a)次,所以我们只需要每次在区间内找到最前面一个小于等于a的值,接着更新a 阅读全文

posted @ 2017-05-05 17:12 Yxter 阅读(209) 评论(0) 推荐(0) 编辑

2017年4月20日

ZOJ 1609 Equivalence(状压+dfs减枝)

摘要: ZOJ Problem Set - 1609 EquivalenceTime Limit: 5 Seconds Memory Limit: 32768 KBWhen learning mathamatics, sometimes one may come to an theorem which go 阅读全文

posted @ 2017-04-20 11:51 Yxter 阅读(177) 评论(0) 推荐(0) 编辑

上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 34 下一页

导航