uva10601 - Cubes 正方体置换

【计算机体系结构】计算机体系结构(6) 并行处理技术(1) SIMD并行计算机、算法和互联网络 并行处理技术的基本概念 SIMD 并行计算机(阵列处理机) MIMD 多处理机 阅读详情

 

You are given 12 rods of equal length. Each of them is coloredin certain color. Your task is to determine in how many different ways one canconstruct a cube using these rods as edges. Two cubes are considered equal ifone of them could be rotated and put next to the other, so that thecorresponding edges of the two cubes are equally colored.

 

Input

The first line of input contains T (1≤T≤60), thenumber of test cases. Then T test cases follow. Each test case consists of oneline containing 12 integers. Each of them denotes the color of thecorresponding rod. The colors are numbers between 1 and 6.

 

Output

The output for one test consists of one integer on a line -the number of ways one can construct a cube with the described properties.

 

Sample Input

Sample Output

3

1 2 2 2 2 2 2 2 2 2 2 2

1 1 2 2 2 2 2 2 2 2 2 2

1 1 2 2 3 3 4 4 5 5 6 6

1

5

312120


  正方体的12条棱,给你12个颜色(1到6,可重复),问有多少种正方体,旋转相同算一种。

  一个正方体有24种置换(以每个面为顶都有4种),所以最后答案除以24。

  1.静止不动,12个循环,每个长度为1。

  2.以面心旋转90,180,270。旋转90和270的时候有6个循环,每个循环节长度为4。180的时候3个循环,循环节长度为2。

  3.以对立顶点为轴旋转120,240,4组对角顶点,每组有120和240度,所以8个循环,循环节长度3。

  4.以对立棱的中点为轴旋转180,6组对立棱,6个循环,两个棱的循环节是1,剩下的循环节是2。

  这就是正方体的全部置换情况了,其它组合情况也都和这里的情况等价。

#include<iostream>
#include<algorithm>
#include<queue>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<cstring>
#include<set>
#include<map>
#define INF 0x3f3f3f3f
#define MAXN 2000010
#define MAXM 1500
#define MOD 1000000007
#define MAXNODE 8*MAXN
#define eps 1e-9
using namespace std;
typedef long long LL;
int T,cnt[10];
LL fac(int n){
    LL ret=1;
    for(int i=2;i<=n;i++) ret*=i;
    return ret;
}
int main(){
    freopen("in.txt","r",stdin);
    scanf("%d",&T);
    while(T--){
        memset(cnt,0,sizeof(cnt));
        int t;
        for(int i=0;i<12;i++){
            scanf("%d",&t);
            cnt[t]++;
        }
        LL ans=fac(12);     //不旋转
        for(int i=1;i<=6;i++) ans/=fac(cnt[i]);
        //绕面心旋转90,270,循环节是4
        int flag=1;
        for(int i=1;i<=6;i++){
            if(cnt[i]%4){
                flag=0;
                break;
            }
        }
        if(flag){
            LL t=fac(3);
            for(int i=1;i<=6;i++) t/=fac(cnt[i]/4);
            ans+=3*2*t;
        }
        //绕面心旋转180,循环节是2
        flag=1;
        for(int i=1;i<=6;i++){
            if(cnt[i]%2){
                flag=0;
                break;
            }
        }
        if(flag){
            LL t=fac(6);
            for(int i=1;i<=6;i++) t/=fac(cnt[i]/2);
            ans+=3*t;
        }
        //以对角顶点为轴旋转120,240,循环节是3
        flag=1;
        for(int i=1;i<=6;i++){
            if(cnt[i]%3){
                flag=0;
                break;
            }
        }
        if(flag){
            LL t=fac(4);
            for(int i=1;i<=6;i++) t/=fac(cnt[i]/3);
            ans+=4*2*t;
        }
        //以对立的棱的中点为轴旋转180,除了那两条棱外循环节是2,两条棱循环节是1
        for(int i=1;i<=6;i++) if(cnt[i]>0){
            cnt[i]--;
            for(int j=0;j<=6;j++) if(cnt[j]>0){
                cnt[j]--;
                flag=1;
                for(int k=1;k<=6;k++){
                    if(cnt[k]%2){
                        flag=0;
                        break;
                    }
                }
                if(flag){
                    LL t=fac(5);
                    for(int k=1;k<=6;k++) t/=fac(cnt[k]/2);
                    ans+=6*t;
                }
                cnt[j]++;
            }
            cnt[i]++;
        }
        printf("%d\n",ans/24);
    }
    return 0;
}


2024顶级提示工程工具:提升效率的12个神器 LlamaIndex虽然本身不是直接的提示词编辑工具,但其整个设计都围绕着如何有效地将外部知识融入LLM的提示词。它提供了结构化的方式来管理“上下文窗口”——即哪些私有数据应该被包含在提示词中。通过优化索引结构和检索策略,可以确保提示词中包含最相关、最高质量的上下文信息,从而大幅提升LLM基于私有数据回答问题的准确性和相关性。同时,LlamaIndex允许开发者针对不同的查询类型和数据特点定制提示词模板,这使得提示词的复用和优化更加系统化。 阅读详情

相关推荐

傻瓜式下载、安装CentOS7操作步骤

CentOS7.9下载和安装操作步骤

weixin_45608163的博客 1万+

基本互联网(ICN)函数及表示

 对于互联网络的设计,通常是希望其结构不要过分复杂以降低成本,能提供连接的很大灵活性以满足算法以及应用的需要,提高其性能。同时还希望这种互联网络又可以通过使用一系列规整单一的基本构件组合而成, 或者经多次通过, 或者经多级连接来实现复杂的互联,模块性好,以便于用大规模集成电路来实现。   7.2.1 互联函数的表示  为了反映不同互联网络的连接特性,每种互联网络可用一组互联函数来定义。如果

虫二的专栏~~在路上~~~ 4702

使用OpenTK展示3D点云图像(C#)

图中存在一个空的点,可通过阈值分割过滤掉,然后如何保证某个点必然存在后面两个和它构成三角形的点,用一个2x2的结构元腐蚀阈值分割出的区域,得到剩下所有的点必然每个点可以构成三角形,这种得到三角形的算法效率会非常高。然后还有光照,无光照和有光照效果差异很大,处理光照核心在于得到每个点的法向量,用上面的三角形的两条边构成的向量叉乘,及得到这个点的法向量,输入给着色器处理得到光照的渲染效果,如下面两张图对比。我们需要把点连成面,有很多算法可以实现,但我拿到的图为一张tif格式16位的深度图,如下图。

海盗Isaac 2283

置换群 学习笔记

置换群 学习笔记 参考博客: https://www.cnblogs.com/maoyiting/p/14171300.html#/cnblog/works/article/14171300 详细定义 & 证明可以看上面的博客,这里主要给出两个定理及其应用。 Burnside 引理 表述: 对于一个置换群 GGG,有 L=1∣G∣∑g∈GXg L=\dfrac{1}{|G|}\sum_{g\in G}X^g L=∣G∣1​g∈G∑​Xg 其中 LLL 表示 GGG 作用下,等价类(或者说人话,本质不

日居月诸的博客 1047

【SIP基础】SIP协议基本呼叫流程

SIP呼叫流程下图显示了一个SIP会话的基本呼叫流程。 下面是上述呼叫流程的详细解释: Alice发送INVITE请求到代理服务器,INVITE请求负责发起会话。 代理服务器立即发送Trying 100给请求者(Alice),表示试图响应INVITE请求,以防止重传该INVITE请求。 代理服务器搜索Bob所在位置服务器的地址,得到的地址后,将转发INVITE请求到Bob。 此后,Bob回应180

VVSIP官网博客 1万+

国产麒麟系统中的PaddleOCR离线绿色部署:高效安全的文字识别新纪元

摘要:本文详细介绍了PaddleOCR在银河麒麟V10SP1系统上的离线部署方案。通过Conda虚拟环境隔离依赖,采用离线包安装方式实现无网络部署,支持80+语言识别。重点讲解了模型量化剪枝优化、多线程处理等性能调优技巧,并提供了完整的OCR识别代码示例。该方案具有数据本地化处理的安全优势,适用于医疗票据数字化等对隐私要求严格的场景,同时解决了模型加载失败、内存不足等常见问题。

墨夶的博客 1227

UVA10601 Cubes 题解

题目传送门 题目大意: 有 121212 根带颜色的木棍,让他们组合成一个正方体,问能组合出多少种本质不同的正方形(相互能够通过旋转得到的就是本质相同的)。 题解 套一下burnside定理就好了,也就是要求出所有置换的不动点数量。 分类讨论一下所有置换方式(即旋转方式): 以对面中心为轴,旋转 90°,180°,270°90\degree,180\degree,270\degree90°,18...

a_forever_dream的博客 369

cadence中利用sva进行FPV实战(可直接使用)

在cadence中使用fpv进行formal验证

youzjuer的博客 749

uva10601 - Cubes

等价类计数

ACoder 426

[RK3568 Android11] 教程之原厂SDK源码适配AIO-3568J板子跑起来

目录 一、前提 二、修改dts设备树 三、适配板子的dts 四、编译系统烧入固件验证 一、前提 因源码是直接使用原厂的SDK,没有使用firefly配套的SDK源码,所以手上这块firefly aio-3568j板子在硬件设计上与原厂使用的板子会有些差异;就是因为这些差异会导致新固件烧入后,debug串口打印许多错误信息,可能的话,系统还会崩溃掉,跑不起来; 主要差异在哪里呢?比如: ● DDR类型和品牌多样性; ...

~未来可期~ 1744

置顶必读(2) |《YOLOv8实战:从入门到深度优化》总目录导航 & 学习路线指南(持续更新中)

🏆 本文收录于 《YOLOv8实战:从入门到深度优化》 专栏。该专栏系统复现并梳理全网各类 YOLOv8 改进与实战案例(当前已覆盖分类 / 检测 / 分割 / 追踪 / 关键点 / OBB 检测等方向),坚持持续更新 + 深度解析,质量分长期稳定在 97 分以上,可视为当前市面上 覆盖较全、更新较快、实战导向极强 的 YOLO 改进系列内容之一。

**My Coding Family** 28万+

UVA 10601 Cubes(正方体旋转、Polya计数)

题目链接: UVA 10601 Cubes 题意: 给出12根等长的火柴棒,每根火柴棒的颜色属于1−61-6中的一种,问能拼成多少种不同的正方体?(考虑旋转变换) 分析: 首先正方体的旋转置换有2424。下面将每个循环内元素的个数称为循环的长度。注意是棱边的置换循环,而不是面的置换循环 静止。只有一种置换。有1212个循环,每个循环的长度为11。 以相对面的中心为轴旋转。可以旋转的角度是9

ramay7 1435

华为嵌入式面试题及参考答案(持续更新)

异步是指在程序执行过程中,某些任务不需要等待立即完成就可以继续执行其他任务的过程。在计算机编程中,异步通常用于处理长时间运行的操作,如文件读写、网络通信等,以避免阻塞主线程。异步处理通常涉及到回调函数、事件循环、协程或未来的概念。使用宏定义来避免命名冲突。#else#endif堆和栈是计算机程序中用于存储数据的两种不同类型的内存区域。

大模型大数据攻城狮的专栏 2483

UVA 10601 CUBES (正方体Polya,有限制)

转载请注明出处,谢谢 http://blog.youkuaiyun.com/ACM_cxlove?viewmode=contents           by---cxlove 题目:有12条边,分别有特定的颜色,组成一个立方体,问有多少种 http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_pr

窝不是爱酱,喵~~~~ 4316

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

uva 10601 - Cubes(置换)

题目链接:uva 10601 - Cubes 题目大意:有12根等长的小木棍,然后每根木棍,输入每根木棍颜色的编号,你的任务是统计出用它们拼出多少种不同的立方体,旋转之后完全相同的立方体被认定相同。 解题思路:polya,然后对应立方体有24种旋转: 不旋转(still):1种,循环长度为12以对顶点为轴(rot_point):4组,循环长度为3以对面中心为轴(rot_plane

不慌不忙、不急不躁 1973

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

uva 10601 Cubes(等价类计数,Burnside引理)

uva 10601 Cubes(等价类计数,Burnside引理) 告诉你12根棒子的颜色,问一共能拼成多少个不同的正方体? (通过改变空间位置变成相同的正方体,则视为同一种方案) 一看到这题感觉束手无策,即使你空间想象能力再好,恐怕也难以想出方案数。。 Burnside引理提供了一个良好的工具,下面就以此题为例详细介绍Burnside引理及其应用。 /* 等价类计算问题

u011276914的专栏 981

efm32 入门.pdf

本PDF共计22页,介绍的是操作驱动API,下载与否自己斟酌。

UVA10601 Cubes

题目链接:https://vjudge.net/problem/UVA-10601 题目大意:   见刘汝佳《算法竞赛入门经典——训练指南》\(P182\). 知识点:  组合计数、置换群 解题思路:   正方体的置换有\(4\)种:   \(A\). 静止不动(\(1\) 个)。置换类型为 \((12,0,0,0,0,0)\).( \((a,b,c,d,e,f)\) 表示其...

dielie6462的博客 197

Uva10601 Cubes

Description You are given 12 rods of equal length. Each of them is colored in certain color. Your task is to determine in how many different ways one can construct a cube using these rods as edge...

a5163273的博客 213

[UVA10601]Cubes

Cubes 题解 很容易发现,对于一个正方形,它一共有24种旋转的置换。 而对于静止状态下,就是不转的情况,它每个的循环长度为1。 对于以每个面的中心为轴旋转的情况,它的置换总数应该为3(可以选择的轴)*3(旋转的角度 90 180 270)=9。 对于以每条边的中心为轴旋转的情况,它的置换总数应该为6(可以选择的轴)*1(旋转的角度 180)=6。 对于以每个顶点为轴旋转的情况,它的...

StaroForgin的博客 391

Uva 10601 Cubes(polya计数)

大致题意是:让你给正方体的棱涂颜色,然后每种颜色的的数量都有限制。问在考虑旋转异构的情况下,总共有多少种本质不同的染色方案。         很明显的一道polya的题目。在这里,我不妨先总结一下polya做题的一些套路吧~首先,对于普通的polya,我们先不考虑异构的情况,算出方案数f(n)。接着考虑用burnside引理,对于旋转异构,计算出每种置换的循环数gcd(i,n)。把每个循环看作一个数字,那么置换i的方案数就是f(gcd(i,n))。求和即可。         然后这题,由于有颜色数量的限制,

alpc_qleonardo 749

【问题】对于UVa10601 - Cubes的疑问

手动模拟下,只有恒等变换和顶点轴120°/240°旋转可以被记入数据。实际上,不止这个程序,我能看到的大部分ac程序都是输出。时,大多数代码选择了将正方体的棱分成了。综上为我对本题疑问,望有大佬可以解答。但是上面这个程序输出。

Isaac Regulus的博客 468

UVA 10601 Cubes

/* UVA 10601 Cubes http://blog.youkuaiyun.com/acm_cxlove/article/details/7866192 http://www.cnblogs.com/staginner/archive/2012/05/21/2511340.html 1.本质不同的置换 2.循环节个数,其分别长度 (每个循环节中图相同的颜色的种数)/(本质不同的置换) */

Yukar_syt的专栏 873

UVA10601 Cubes - 波利亚定理

Cubes 题意 给出121212根长度相等的木棒,颜色最多有666种,问能构成的本质不同的正方体数量. 题解 根据波利亚定理公式: 设X是元素集合,G是X的置换群,{u1,u2,...,uk}\{u_1,u_2,...,u_k\}{u1​,u2​,...,uk​}是kkk种颜色的集合,CCC是XXX的任意着色集.这时,针对各颜色的数目的C的非等价着色数的生成函数是: PG(u1+...+uk,...

SUNSET 505

UVA - 10601 Cubes 正方体Polya

题目:有12条边,分别有特定的颜色,组成一个立方体,旋转等价,问有多少种。 思路: 1、静止不动,那么就是12个循环,每个循环节长度为1。 2、通过两个对立的顶点,分别旋转120,240,有4组顶点,在每一次旋转当中,可以发现分为4个循环,每个循环节长度为3。 3、通过两个对立面的中心,分别旋转90,180,270度。有3组面。 在每次旋转90度和270度的时候,可以发现分为3个循环,每

ACVevtor的博客 468

Cubes UVA - 10601

题意: 给你12根等长的木棒,颜色给出,并且不超过6种颜色,拼出正方体,正方体可以旋转,有多少种不同的正方体 思路: 由于不是无限根,所以无法用polya定理,我从新学习了burnside定理。 明确操作后

a7f650ebd327889c的博客 402

UVA 10601 Cubes (Polya计数)

题意:给出

绝望的乐园 911
上一篇: uva12103 - Leonardo's Notebook 置换A^2=B
下一篇: uva11255 - Necklace 项链旋转翻转 置换
小小小小葱
博客等级 码龄14年 22粉丝 266原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值