我们查看更一般的情况,设人数为m则n 0) :13 res = (res + C(n - m - 1, i - 1) * C(m, i)) * 214 i -= 115 return res * fac[m - 1] * n;16 17 fac = [1]...
分类:
其他好文 时间:
2015-03-13 20:40:42
阅读次数:
181
ChessAlmost everyone knows the problem of putting eight queens on anchessboard such that no Queen can take another Queen. Jan Timman (a famous Dutch c...
分类:
其他好文 时间:
2015-03-09 22:05:32
阅读次数:
231
http://www.hjenglish.com/new/p718262/My little friend Seth, who is eight, pronounces this the best film he has ever seen.我八岁的小伙伴,赛斯,声称这是他看过的最棒的电影。And ...
分类:
其他好文 时间:
2015-02-25 19:51:10
阅读次数:
164
题目链接:http://poj.org/problem?id=1077题目描述:民间流传的推15游戏,不过这里简化为3*3,也就是八数码问题,‘x’表示空位。与AOJ0121的“Seven Puzzle”类似。思路:没什么特别的,构造字符串队列,爆搜一下。注意Hash函数,哈得好就哈哈,哈得不好就只...
分类:
其他好文 时间:
2015-02-24 18:42:15
阅读次数:
291
#include#includechar alp[10][10]={"zero","one","two","three","four","five","six","seven","eight","nine"};char str[1200];int main(){ scanf("%s",str); ....
分类:
其他好文 时间:
2015-02-21 15:28:26
阅读次数:
209
Problem Description
The 15-puzzle has been around for over 100 years; even if you don't know it by that name, you've seen it. It is constructed with 15 sliding tiles, each with a number from 1 to 15 on it, and all packed into a 4 by 4 frame with one tile m...
分类:
编程语言 时间:
2015-02-15 09:29:04
阅读次数:
1023
Solution to the n Queens Puzzle
Time Limit: 1000MS
Memory Limit: 131072K
Total Submissions: 3494
Accepted: 1285
Special Judge
Description
The eight queens puz...
分类:
其他好文 时间:
2015-02-07 09:13:07
阅读次数:
170
Coin sums
Problem 31
In England the currency is made up of pound, £, and pence, p, and there are eight coins in general circulation:
1p, 2p, 5p, 10p, 20p, 50p, £1 (100p) and £2 (200p).
It ...
分类:
编程语言 时间:
2015-02-04 09:34:29
阅读次数:
194
Problem Description The 15-puzzle has been around for over 100 years; even if you don't know it by that name, you've seen it. It is constructed wit...
分类:
其他好文 时间:
2015-01-17 19:17:47
阅读次数:
290
?读取三维网格模型(Wavefront OBJ文件)无法向立方体:cube.obj有法向兔子模型:bunny.obj有法向有纹理八字模型:Eight.objOBJ文件的格式可参考:http://www.cnblogs.com/youthlion/archive/2013/01/21/2870451....
分类:
其他好文 时间:
2014-12-26 21:34:36
阅读次数:
271