POJ 2409 Let it Bead(polya裸题)】的更多相关文章

题意 用k种颜色对n个珠子构成的环上色,旋转翻转后相同的只算一种,求不等价的着色方案数. 思路 Polya定理 X是对象集合{1, 2, --, n}, 设G是X上的置换群,用M种颜色染N种对象,则不同的染色方案数为: λ(g)表示置换g的轮换个数,且λ(g) = λ1(g) + λn(g) + -- + λn(g),其中λi(g)表示g中长度为i的轮换(循环)个数. 本题是对一个n个珠子的圆珠的颜色,而圆珠的置换群有: Ⅰ翻转:1.当n为奇数时,有n种翻转,每种翻转的轴都是一个顶点和该顶点对边…
旋转能够分为n种置换,相应的循环个数各自是gcd(n,i),个i=0时不动,有n个 翻转分为奇偶讨论,奇数时有n种置换,每种有n/2+1个 偶数时有n种置换,一半是n/2+1个,一半是n/2个 啃论文,PPT,各种书好久才看懂Polya定理,近期做数学题做的严重怀疑自己的智商. #include <iostream> #include <cstdio> #include <cstdlib> #include<algorithm> #include<ma…
参考:https://blog.csdn.net/sr_19930829/article/details/38108871 #include <iostream> #include <string.h> using namespace std; int c,n;//c种颜色,n个珠子 int ans; int gcd(int a,int b) { ?a:gcd(b,a%b); } int power(int p,int n)//快速幂求公式里的k的nc(g)次方 { ; while…
题目传送:http://poj.org/problem?id=2409 Description "Let it Bead" company is located upstairs at 700 Cannery Row in Monterey, CA. As you can deduce from the company name, their business is beads. Their PR department found out that customers are inte…
http://poj.org/problem?id=1286 题意:有红.绿.蓝三种颜色的n个珠子.要把它们构成一个项链,问有多少种不同的方法.旋转和翻转后同样的属于同一种方法. polya计数. 搜了一篇论文Pólya原理及其应用看了看polya究竟是什么东东.它主要计算所有互异的组合的个数.对置换群还是似懂略懂.用polya定理解决这个问题的关键是找出置换群的个数及哪些置换群,每种置换的循环节数.像这样的不同颜色的珠子构成项链的问题能够把N个珠子看成正N边形. Polya定理:(1)设G是p…
题目:https://www.lydsy.com/JudgeOnline/problem.php?id=1004 关于置换群:https://www.cnblogs.com/nietzsche-oier/p/6883880.html https://files-cdn.cnblogs.com/files/HocRiser/Burnside.pdf 原来 burnside 引理中的“不动点”是指一种不变化的方案啊: 这道题就用 burnside 引理,但给出的 m 个置换还不是置换群,需要再加一个…
Charm Bracelet Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 38909   Accepted: 16862 Description Bessie has gone to the mall's jewelry store and spies a charm bracelet. Of course, she'd like to fill it with the best charms possible fro…
题目:https://www.lydsy.com/JudgeOnline/problem.php?id=1004 http://poj.org/problem?id=2409 学习材料:https://www.cnblogs.com/nietzsche-oier/p/6883880.html https://files-cdn.cnblogs.com/files/HocRiser/Burnside.pdf bzoj 1004:这道题注意考虑单位元的那个置换. 然后用 polya 定理即可.不动点…
链接:http://poj.org/problem?id=1286 http://poj.org/problem?id=2409 #include <cstdio> #include <iostream> #include <cstring> #include <cmath> #include <algorithm> using namespace std; typedef long long LL; LL P_M( LL a, LL b ) {…
[题目分析] 裸题直接做. 一个长度为n,颜色为m的环,本质不同的染色方案是多少. 数据范围比较小,直接做就好了. [代码] #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; #define ll long long #define F(i,j,k) for (int i=j;i<=k;++i) int g…