You have four colored cubes. Each side of each cube is a single color, and there are four colors: blue (B), red (R), green (G) and yellow (Y) Describing the six faces as front, back, left, right, top, bottom, the cube colors are:Cube Front Back Left Right Top Bottom
1 R B G Y B Y
2 R G G Y B B
3 Y B R G Y R
4 Y G B R R R The objective is to find ways to stack the four cubes as a vertical column so that each side of the column is showing all four colors.
In a compiled language of your choice, write a program to find all successful permutations.
1 R B G Y B Y
2 R G G Y B B
3 Y B R G Y R
4 Y G B R R R The objective is to find ways to stack the four cubes as a vertical column so that each side of the column is showing all four colors.
In a compiled language of your choice, write a program to find all successful permutations.
解决方案 »
- 初学遇到一个循环的问题
- 关于JDBC+mysql中的longtext写入和读取问题
- 关于server发消息给client
- 新手求教,关于super的理解
- 2个问题,请帮忙
- 如何在applet中使用dom解析xml?
- java中的bufferreader和bufferwriter有什么用阿?如果不使用,有影响么?
- java菜鸟问一个类似c++中vtable的问题
- 我想让一窗体始终在最上面,如何做?不是ShowModal()
- java抽象类,接口,三大特征,this关键字,方法调用的综合应用
- 求助!!!为什么我安装了Jdk6后在LIB里面找不到tools.jar这个包呢??
- JB2005与JB9哪个好用点啊
1、忽略上下 前面可以换到后面而不影响左右 左边可以换到右边也不影响前后 因为只要上下翻转一次就可以了2、块与块之间位置可换 左右跟前后位置互换 上下可以跟左右换 上下还可以跟前后换3、只要找出后4个位置满足行元素不同 列元素不同就可以了怎么感觉像线性代数的求解 忘了