置换群第三题,找出循环节,然后取余进行操作,加深了对置换的应用,越发感觉置换群很有趣。
#include
#include
#include
#include
using namespace std;
const int maxn =201;
int n,k;
char s[maxn],ss[maxn];
int zh[maxn],b[maxn],zz[maxn],f[maxn],ok[maxn...
分类:
其他好文 时间:
2015-04-23 02:06:11
阅读次数:
120
【题目链接】click here~~
【题目大意】已经
f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.求f(n),
【解题思路】:此题是大三届的一场比赛题,前几天做了下,结果是不忍直视啊,wa了几乎一页了,最开始想的是用矩阵快速幂,但是想了想,取模数才不到10,7
7=49,也就是说最大结果不超过49种可...
分类:
其他好文 时间:
2015-04-18 22:02:10
阅读次数:
154
题目:Cyclic NacklaceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3387 Accepted Submission(s): 1549Problem DescriptionCC always becomes very...
分类:
编程语言 时间:
2015-04-18 17:51:02
阅读次数:
179
题目:PeriodTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3813 Accepted Submission(s): 1862Problem DescriptionFor each prefix of a given strin...
分类:
编程语言 时间:
2015-04-18 17:46:08
阅读次数:
165
F - The Minimum Length
Time Limit:1000MS Memory Limit:131072KB 64bit IO Format:%lld & %llu
Submit Status
Description
There is a string A. The length of A is less than 1,000,000. I rewrite it aga...
分类:
其他好文 时间:
2015-04-17 11:45:01
阅读次数:
137
D - Cyclic Nacklace
Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u
Submit Status
Description
CC always becomes very depressed at the end of this month, he has checked his c...
分类:
其他好文 时间:
2015-04-16 21:57:27
阅读次数:
215
E - Period
Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u
Submit Status
Description
For each prefix of a given string S with N characters (each character has an ASCII code ...
分类:
其他好文 时间:
2015-04-16 21:55:41
阅读次数:
112
开始看这个题目的时候一点思路都没有,毕竟double型才能保留16位的小数。后面看了别人的思路才发现我们应该模拟小数除法的过程;在模拟的过程中如果某一次取得的余数,已经在前面出现过了那么就会在这里形成循环节;这个题目还有一点比较坑的就是输出格式,我就在这上面WA了好几发。代码如下:/*
ID:15674811
LANG:C++
PROG:fracdec
*/#include
#i...
分类:
其他好文 时间:
2015-04-10 09:43:47
阅读次数:
128
Polya定理 L=1/|G|*(m^c(p1)+m^c(p2)+...+m^c(pk)) G为置换群大小 m为颜色数量 c(pi)表示第i个置换的循环节数 如置换(123)(45)(6)其循环节数为3--------------------------------------------...
分类:
其他好文 时间:
2015-04-08 14:38:24
阅读次数:
142