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个立方体旋转到某一种状态下,对应的面的颜色都相同. 这题可以 ...
随机推荐
- Leetcode刷题记录:计算复数乘法
题目要求 计算两个复数的乘积. 参考题解 这道题感觉很简单,主要是对复数的表达式进行解析,然后套用公式,输出结果就可以了. class Solution: def complexNumberMulti ...
- Java语法糖初探(三)--变长参数
变长参数概念 在Java5 中提供了变长参数(varargs),也就是在方法定义中可以使用个数不确定的参数,对于同一方法可以使用不同个数的参数调用.形如 function(T …args).但是需要明 ...
- [转]php socket编程通信
FROM : http://blog.csdn.net/baixiaoshi/article/details/9399083 今天终于测试成功了php中的socket通信,先看原理图 这里可以清晰的看 ...
- 使用Mobx插件查看mobx的变量值
mobx浏览器调试:可以知道store值.方法 在chrome上安装插件Mobx,可以查看store.history.match.location等内容
- OpenGL和D3D11中的深度模版测试
在OpenGL和D3D11的管线中,像素shader之后的操作就是深度模版测试,深度模版测试是以sample为单位进行的,就是一个像素上可以有多个采样点,每个采样点都有深度信息.深度模版测试对 ...
- 简单使用Google Analytics监控网站浏览行为
之前对网页做用户转化率调查这块,找到了谷歌GA事件,现在有时间对使用方法和遇到问题做个简单记录.官方文档其实也介绍的比较清楚,可以查看官方文档. 首先,在官网申请UA-id,然后在主页加入如下代码: ...
- memcache的资料集
1. 安装与查看过程(完整) https://www.cyberciti.biz/faq/rhel-fedora-linux-install-memcached-caching-system-rpm/ ...
- Git创建分支/GIT提交分支
git clone xxx.git cd fwspp-react git init touch README.md git add README.md git commit -m "add ...
- [Algorithm] How many meeting rooms needed?
Give you set of meetings start time and end time, count how many meeting rooms needed. For example: ...
- cocos2d-x3.0 XML解析
在2dx3.0中xml解析已经不用自己找库了.已经为我们集成好了. text.xml <?xml version ="1.0" encoding ="UTF8&qu ...