- 博客(13)
- 收藏
- 关注
原创 比较两个.txt文档有什么不同
假设两文件都在c盘根目录@echo offfc c:\a.txt c:\b.txt显示的有不同的哪行的上一行和下一行
2012-11-30 21:52:45 662
原创 Java学习1
/**子类可以通过继承自动获得父类中访问权限为public,protected,default的成员变量和方法,但是不能继承权限为private的成员变量和方法*//**父类**/public class Person { public String name; public int age; public void Say(){ System.out.println("
2012-10-11 16:30:40 207
原创 求到达必败态的方法数 ZOJ 3067 Nim
/*http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3067题意:求胜态到达必败态的方法数Nim*/#include #include #include #include #include using namespace std;int s[1005];int main(){#
2012-08-28 20:31:09 342
原创 SG函数 hdu 1536 S-Nim
/*http://acm.hdu.edu.cn/showproblem.php?pid=1536题意:取石子问题,但是每次所取的石子的个数必须是s[]里面的数,求每个位置是必败点还是胜点*/#include #include #include #include #include using namespace std;const int N = 105
2012-08-28 17:37:44 616
转载 公平游戏的Sprague-Grundy定理
原文地址:Theory">Sprague-Grundy Theory作者:unmoralThe Sprague-Grundy theory of impartial games公平游戏的Sprague-Grundy定理November 9, 2005An impartial game is a two-player game in which bothplayers have
2012-08-28 17:01:04 2235
原创 类似取石子 POJ 1704 Georgia and Bob
/*http://poj.org/problem?id=1704当n是奇数时,将第一个数的位置与0绑定,注意输入的数据不一定是按从小到大排序的,所以要进行排序*/#include #include #include #include using namespace std;int ans[1111];int main(){#ifndef ONLINE_JUDGE
2012-08-27 14:16:54 209
原创 类似取石子 POJ 1704 Georgia and Bob
/*http://poj.org/problem?id=1704当n为奇数时,将第一个位置与0绑定。要注意排序。*/#include #include #include #include using namespace std;int ans[1111];int main(){#ifndef ONLINE_JUDGE freopen("in", "r",
2012-08-27 14:13:30 394
原创 博弈 POJ A New Stone Game
/* http://poj.org/problem?id=1740 */#include #include #include #include #include using namespace std;int main(){#ifndef ONLINE_JUDGE freopen("in", "r", stdin);#endif int n; RL:while(ci
2012-08-27 14:08:53 363
原创 异或 hdu 2095 find your present (2)
/*http://acm.hdu.edu.cn/showproblem.php?pid=2095题意:只有一个数的个数为奇数,求这个数异或:一个数的偶数次异或值为0:1^1=0, 2^2=0, 3^3^3^3 = 0*/#include #include #include #include using namespace std;int main(){#ifndef
2012-08-27 13:04:46 228
转载 博弈
转载:http://blog.csdn.net/new_wu/article/details/7393387 博弈常出现在信息学与数学类的试题中,有一类试题无法用常见的博弈树来解答,寻找必败态为针对此类试题的一种解题思路此类问题一般有如下特点:1、 两人轮流决策,都采用最优策略2、 博弈是有限的,在有限步后会决出胜负3、 公平博弈,两人遵循相同的规则 必
2012-08-27 11:11:17 301
原创 Prim zoj 1203 Swordfish
/*http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1203 题意:给定了城市的坐标,将城市所在的区域当做一个平面,求将所有的城市连接起来所需的隧道的最小长度。 分析:最小生成树 prim算法 */#include #include #include #include #include #i
2012-08-27 09:49:59 527
原创 Prim zoj 1372 Networking
/*http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=372 题意:给定了n个点(1~n),和r条边,有些是重合的,求将n个点连起来的最短的边长和 分析:最小生成树 prim */ #include #include #include #include #include #include using
2012-08-27 09:48:20 270
原创 prim zoj 1406 Jungle Roads
/*http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1406 题意:有n个地点,有n-1行描述n个地点之间的连接,第一个点a与后面的num个点连接a与b之间的距离为len,求将n个点连接起来所需要的最小耗费,即最小的len和 分析:最小生成树 prim */ #include #include #i
2012-08-27 09:25:41 334
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人