UVA 10733 - The Colored Cubes(Ploya)
UVA 10733 - The Colored Cubes
题意:一个立方体。n种颜色,问能涂成多少不同立方体
思路:Ploya求解,正方体相应24种不同旋转一一计算出循环个数就可以。和 UVA 10601 - Cubes这题类似
代码:
#include <stdio.h>
#include <string.h> unsigned long long n; int main() {
while (~scanf("%llu", &n) && n) {
printf("%llu\n", (n * n * n * n * n * n + 12 * n * n * n + 3 * n * n * n * n + 8 * n * n) / 24);
}
return 0;
}
UVA 10733 - The Colored Cubes(Ploya)的更多相关文章
- uva 10733 The Colored Cubes<polya定理>
链接:http://uva.onlinejudge.org/external/107/10733.pdf 题意: N 种颜色可以涂成多少种立方体~ 思路: 使正六面体保持不变的运动群总共有: 1.不变 ...
- 1352 - Colored Cubes (枚举方法)
There are several colored cubes. All of them are of the same size but they may be colored differentl ...
- POJ2741 Colored Cubes
Description There are several colored cubes. All of them are of the same size but they may be colore ...
- 10601 - Cubes(Ploya)
UVA 10601 - Cubes 题目链接 题意:给定正方体12条棱的颜色,要求用这些棱能组成多少不同的正方体 思路:利用ploya定理去求解,分类讨论,正方体一共24种旋转.相应的旋转方式有4种: ...
- uva 10051 Tower of Cubes(DAG最长路)
题目连接:10051 - Tower of Cubes 题目大意:有n个正方体,从序号1~n, 对应的每个立方体的6个面分别有它的颜色(用数字给出),现在想要将立方体堆成塔,并且上面的立方体的序号要小 ...
- UVALive 3401 - Colored Cubes 旋转 难度: 1
题目 https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_pr ...
- UVA 10177 Sqr/Rects/Cubes/Boxes?
Problem J (2/3/4)-D Sqr/Rects/Cubes/Boxes? Input: standard input Output: standard output Time Limit: ...
- 【poj2741】 Colored Cubes
http://poj.org/problem?id=2741 (题目链接) 题意 给出n个骰子,每一面都有一种颜色,问最少更改多少个面的颜色可以使所有骰子通过旋转后完全相同. solution 迷之d ...
- LA 3401 - Colored Cubes
解题报告:有n(1<=n<=4)个立方体,每个立方体的每一个面涂有一种颜色,现在要将这些立方体的某些面的颜色重新涂一下,使得这n个立方体旋转到某一种状态下,对应的面的颜色都相同. 这题可以 ...
随机推荐
- 解决 dotNetZip 解压乱码的问题,支持ZIP分卷解压缩
using (ZipFile zip = ZipFile.Read("D:\\test\\2007.zip",System.Text.Encoding.Default)) { fo ...
- [转]http status 汇总
转:http://www.cnblogs.com/cxd4321/archive/2008/11/20/1337776.html 常见HTTP状态码 200 OK 301 Moved Permanen ...
- 最近遇到了 timer1sec 定时调用的函数,出现了 时间久了,就不是每秒一次了,可能会慢的情况。如何解决呢?
我想可以在timer1sec 调用四个线程,让四个线程来执行 具体代码,而不是在timer1sec一个线程 直接执行.这样,每个线程 不超过4s,那么没秒都会被调用到. 需要使用到的技术是 semap ...
- 【经验】STL的list vector在iterator迭代器的循环中 使用erase 造成的BUG
#include <iostream> #include <list> #include <vector> using namespace std; typedef ...
- [leetcode]Spiral Matrix II @ Python
原题地址:https://oj.leetcode.com/problems/spiral-matrix-ii/ 题意: Given an integer n, generate a square ma ...
- 《JavaScript语言精粹》笔记
0.JavaScript的简单数据类型包括数字.字符创.布尔值(true/false).null和undefined值,其它值都是对象. 1.JavaScript只有一个数字类型,它在内部被表示为64 ...
- 命令行打印文件树列表: tree
Linux & Mac 1.下载tree lib //mac brew install tree //centos yum install tree //ubuntu apt-get inst ...
- POJ 1755 Triathlon 半平面交
看的这里:http://blog.csdn.net/non_cease/article/details/7820361 题意:铁人三项比赛,给出n个人进行每一项的速度vi, ui, wi; 对每个人 ...
- 如何在Centos7上安装和使用ZFS
导读 ZFS文件系统的英文名称为ZettabyteFileSystem,也叫动态文件系统(DynamicFileSystem),是第一个128位文件系统.最初是由Sun公司为Solaris10操作系统 ...
- Java-JUC(三):原子性变量与CAS算法
原子性 并发程序正确地执行,必须要保证原子性.可见性以及有序性.只要有一个没有被保证,就有可能会导致程序运行不正确. 原子性:一个操作或多个操作要么全部执行完成且执行过程不被中断,要么就不执行. 可见 ...