DIY Cube Time Limit: 2000/2000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 584 Accepted Submission(s): 284 Problem Description Mr. D is interesting in combinatorial enumeration. Now he want to find out the nu…
Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 9359 Accepted: 3862 Description Beads of red, blue or green colors are connected together into a circular necklace of n beads ( n < 24 ). If the repetitions that are produced by rotation…
http://poj.org/problem?id=1286 题意:求用3种颜色给n个珠子涂色的方案数.polya定理模板题. #include <stdio.h> #include <math.h> long long gcd(long long a,long long b) { return b?gcd(b,a%b):a; } int main() { long long n; while(~scanf("%lld",&n)) { ) break;…
Let it Bead Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 5365 Accepted: 3585 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 b…
Beads of red, blue or green colors are connected together into a circular necklace of n beads ( n < 24 ). If the repetitions that are produced by rotation around the center of the circular necklace or reflection to the axis of symmetry are all neglec…