码迷,mamicode.com
首页 >  
搜索关键字:beads    ( 137个结果
poj1286--Necklace of Beads(置换群+polya计数)
题目链接:点击打开链接 题目大意:给出三种颜色红绿蓝,对一串n个小球的环染色,环可以旋转和翻转,问最终可能有多少不同的染色方案。 首先说明polya计数: 由这个公式,既可以计算出不同的染色方案,那么我们需要求的也就是不同置换的个数,和每一个置换的循环节数 旋转,旋转i个小球的距离,那么会得到0~n-1的置换方案,共有n中,对于旋转i个小球的循环节数为gcd(n,i) 翻转,对于...
分类:其他好文   时间:2015-07-28 10:45:02    阅读次数:244
POJ 1286-Necklace of Beads(Polya计数)
题目地址:POJ 1286 题意:n个珠子串成一个圆,用三种颜色去涂色。问一共有多少种不同的涂色方法(不同的涂色方法被定义为:如果这种涂色情况翻转,旋转不与其他情况相同就为不同。) 思路:Polya定理第一发,这道题其实就是一个最简单的板子题。要想明白Polya定理首先要知道置换,置换群和轮换的概念,可以参考这里(用例子很好理解)。 项链可以进行旋转和翻转。 翻转:如果n是奇数,则存在...
分类:其他好文   时间:2015-07-24 18:36:23    阅读次数:354
PAT(A) 2015-03-14
A. To Buy or Not to Buy (20) 时间限制 100 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 CHEN, Yue Eva would like to make a string of beads ...
分类:其他好文   时间:2015-07-21 12:52:47    阅读次数:105
UVA 10054 The Necklace
10054 The Necklace My little sister had a beautiful necklace made of colorful beads. Two successive beads in the necklace shared a common color at their meeting point. The figure below shows a segme...
分类:其他好文   时间:2015-05-21 17:27:46    阅读次数:146
【BZOJ2081】【Poi2010(17th)】Beads RKhash+hash表 请记住这个神一样的数:200019
题解: 枚举串长,数据范围20W。 然后串长为 ii 时需要枚举 ?ni?\lfloor \frac{n}{i}\rfloor 次。 加一起是 O(nlogn)O(nlogn) 我们把每个串hash一下就好了。 然后自然溢出就好了,,,。 我无限WA啊。。最后wyfcyx给我提供了一个种子:200019…… Qwq。。。。。。。。。。。。。。。。。。。。。。。。。。 代码:...
分类:其他好文   时间:2015-05-15 15:40:56    阅读次数:143
POJ 题目1286 Necklace of Beads(Polya定理)
Necklace of Beads Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 7061   Accepted: 2942 Description Beads of red, blue or green colors are connected together...
分类:其他好文   时间:2015-05-05 08:59:13    阅读次数:179
uva_10054_The Necklace(欧拉回路+打印路径)
10054  The Necklace My little sister had a beautiful necklace made of colorful beads. Two successive beads in the necklace shared a common color at their meeting point. The figure below shows a segme...
分类:其他好文   时间:2015-04-29 21:52:47    阅读次数:227
POJ1975:Median Weight Bead(FLOYD)
Description There are N beads which of the same shape and size, but with different weights. N is an odd number and the beads are labeled as 1, 2, ..., N. Your task is to find the bead whose weight ...
分类:其他好文   时间:2015-04-28 21:04:04    阅读次数:175
HDU 3980 Paint Chain(SG函数)
Problem Description: Aekdycoin and abcdxyzk are playing a game. They get a circle chain with some beads. Initially none of the beads is painted. They take turns to paint the chain. In Each turn one p...
分类:其他好文   时间:2015-04-08 18:14:42    阅读次数:175
1092. To Buy or Not to Buy (20)建立查询表,或者叫哈希表
1092. To Buy or Not to Buy (20) 时间限制 100 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Eva would like to make a string of beads with her favorite colors so she went to a smal...
分类:其他好文   时间:2015-03-15 09:32:25    阅读次数:138
137条   上一页 1 ... 9 10 11 12 13 14 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!