上一页 1 2 3 4 5 6 7 8 9 ··· 13 下一页
摘要: http://www.programming-challenges.com/pg.php?page=downloadproblem&probid=110102&format=html UVA 10189_Minesweeper http://uva.onlinejudge.org/index.php 阅读全文
posted @ 2012-02-28 16:50 pcoda 阅读(241) 评论(0) 推荐(0) 编辑
摘要: http://www.programming-challenges.com/pg.php?page=downloadproblem&probid=110101&format=html UVA 100_The 3n+1 problem http://uva.onlinejudge.org/index. 阅读全文
posted @ 2012-02-28 15:58 pcoda 阅读(203) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=2318 //叉积应用 #include<cstdio>#include<iostream>#include<cstring>using namespace std;#define N 5010struct P{ int x1; int x2;}p 阅读全文
posted @ 2012-02-25 20:39 pcoda 阅读(161) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=1118 求在一条线上的点最多的点的个数 自己的代码 n^3 #include<cstdio>#include<iostream>#include<algorithm>using namespace std; struct P{ int x; in 阅读全文
posted @ 2012-02-25 18:29 pcoda 阅读(843) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=3176 树塔问题,求最大和 #include<cstdio>#include<cstring>#include<iostream>using namespace std;#define N 360#define max(a,b) (a)>(b)? 阅读全文
posted @ 2012-02-25 18:13 pcoda 阅读(174) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=3589 #include<cstdio>#include<cstring>#include<iostream>using namespace std;int main(){ char s1[5],s2[5]; int b[5],T,i,j; in 阅读全文
posted @ 2012-02-25 18:06 pcoda 阅读(228) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=1835 一道模拟题,刚开始由于确定方向的问题不知道咋写了,幸亏同学提醒打表,才搞出来了 #include<cstdio>#include<iostream>using namespace std;int hl[6][6]={{1,5,1,1,2, 阅读全文
posted @ 2012-02-25 18:02 pcoda 阅读(373) 评论(0) 推荐(0) 编辑
摘要: 母函数(Generating function)详解 转载 http://www.wutianqi.com/?p=596 (以下内容部分引至杭电ACM课件和维基百科) 在数学中,某个序列的母函数是一种形式幂级数,其每一项的系数可以提供关于这个序列的信息。使用母函数解决问题的方法称为母函数方法。 母函 阅读全文
posted @ 2011-11-18 14:43 pcoda 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 求X={1,2,3,4,5,6,7}上排列P=2639541的下一个排列Q,首先注意到Q是由P的后部变动引起的。 理论上应从P的最低位开始加1尝试,但应考虑到前面可能有重复元素。 为此从右到左找出比右边数字小的第一个数,即3所在的位置,再从右到左找比3大的第一个数,为4,将3与4对换,得到26495 阅读全文
posted @ 2011-11-17 21:00 pcoda 阅读(301) 评论(0) 推荐(0) 编辑
摘要: 设R={r1,r2,……rn}是要进行排列的n个元素,Ri=R-{r}。 集合x中元素的全排列记为Perm(X).(ri)Perm(X)表示在全排列Perm(X)的每一个排列前加上前缀ri得到的排列。 R的全排列可归纳定义如下: 当n=1时,Perm(R)=(r),其中r是集合R中唯一的元素。 当n 阅读全文
posted @ 2011-11-10 14:02 pcoda 阅读(1231) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 13 下一页