- 博客(22)
- 资源 (2)
- 收藏
- 关注
原创 HDU4462(子集生成)
Scaring the BirdsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 714 Accepted Submission(s): 252Problem DescriptionIt’s harve
2013-05-29 22:53:42 1095
原创 HDU-4445(CRAZY TANK枚举)
Crazy TankTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2470 Accepted Submission(s): 421Problem DescriptionCrazy Tank was a
2013-05-26 20:50:42 1108
原创 ZOJ-3557(排列组合 + lucas)
为什么我要再把这道题目拿出来,我是真的想提醒一下自己。做算法的题目和数学题目其实是一样的,没有完整的思路,没有切实的方法,没有及其的小心,细心你是做不出来题目的。你必须要当心,敲代码的时候时刻看着上面自己敲得是否合适,不合适或者自己现在不知道合适不合适,或者有一定的几率错的地方一定要标注下来。下面的代码,自己这几天刚刚实现过,但是现在写起来还是写错了好多次。原因
2013-05-21 21:47:04 990
原创 B(ZOJ3557)
How Many Sets IITime Limit: 2 Seconds Memory Limit: 65536 KBGiven a set S = {1, 2, ..., n}, number m and p, your job is to count how many set T satisfies the following condition:T i
2013-05-18 22:13:05 862
原创 ZOJ-3710(Friends)
FriendsTime Limit: 2 Seconds Memory Limit: 65536 KBAlice lives in the country where people like to make friends. The friendship is bidirectional and if any two person have no less than
2013-05-18 22:05:11 1545 3
原创 A(HDU3944)---Lucas
DP?Time Limit: 10000/3000 MS (Java/Others) Memory Limit: 128000/128000 K (Java/Others)Total Submission(s): 1629 Accepted Submission(s): 552Problem DescriptionFigure 1 shows t
2013-05-16 22:46:11 874
原创 B(UVA-11997)k个最小和
Problem KK Smallest SumsYou're given k arrays, each array has k integers. There are kk ways to pick exactly one element in each array and calculate the sum of the integers. Your task is to fin
2013-05-16 20:46:31 858
原创 优先队列(UVAL-3135)
A data stream is a real-time, continuous, ordered sequence of items. Some examples include sensor data, Internet traffic, financial tickers, on-line auctions, and transaction logs such as Web usage lo
2013-05-16 20:43:05 924 1
原创 MillerRobin(概率测素数)
学习知识,是一个很享受的过程。尤其是那些自己以前听没听过,但是却又是非常神奇的一种思想的时候。今天上午学习了,快速概率测素数的算法------MillerRobin(),适用于测试单个素数,出错概率比计算机本身出错的概率还要低为(1/4)^(s),一般s取50就可以认为是准确测试出了。算法是基于费马小定理(format),二次探测定理(x*x % p == 1 ,若P为素数,则x的
2013-05-15 11:12:20 4672 5
原创 E(HDu3037Lucas比较综合的一道数论题目)
Saving BeansTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1666 Accepted Submission(s): 592Problem DescriptionAlthough winte
2013-05-14 23:16:32 926
原创 D(HDU3306)
Another kind of FibonacciTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1175 Accepted Submission(s): 446Problem DescriptionA
2013-05-14 13:43:20 795
原创 C(HDU-1588矩阵二分快速幂)
C - Gauss FibonacciTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit StatusAppoint description: System Crawler (2011-07-23)DescriptionWithout ex
2013-05-13 22:54:59 1036
原创 HDU(2855_矩阵的二分快速幂)
Fibonacci Check-upTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 900 Accepted Submission(s): 507Problem DescriptionEvery ALP
2013-05-13 21:54:56 831
原创 快速幂(又一种写法)
还是上传上来吧,又一中快速幂的写法这个快速幂的写法比较简单,不用求digit数组#include #include #include #include using namespace std;const int MOD = 10007;int quick_pow(int n, int m){ int temp = n; int ans = 1; while (m >
2013-05-11 21:36:36 1152
原创 最长回文串模版
没看懂没看懂.回文串的问题没有看懂呀...贴出代码for (int i = 1; i < cnt * 2 + 2; i++) { if (MaxId > i) { p[i] = min(p[2 * id - i], MaxId - i); } else { p[i] = 1; } while (str[i + p[i]] == str[i
2013-05-09 21:53:48 692
原创 HDU-1005(矩阵二分快速幂)
Number SequenceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 78704 Accepted Submission(s): 18378Problem DescriptionA number
2013-05-08 22:17:21 1118
原创 Hdu-1180(诡异的楼梯)
C - 诡异的楼梯Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionHogwarts正式开学以后,Harry发现在Hogwarts里,某些楼梯并不是静止不动的,相反,他们每隔一分钟就变动一次方向. 比如下面的例
2013-05-04 22:51:40 789
原创 B-开门人和关门人(优先队列)
开门人和关门人Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8519 Accepted Submission(s): 4412Problem Description每天第一个到机房的人要把门打开,最后
2013-05-04 19:42:45 847
原创 A-ROADS(PKU1724_dijkstra + 优先队列)
ROADSTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 8690 Accepted: 3221DescriptionN cities named with numbers 1 ... N are connected with one-way road
2013-05-04 19:01:58 913
原创 PKU-1724(DFS + 剪枝)
ROADSTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 8684 Accepted: 3219DescriptionN cities named with numbers 1 ... N are connected with one-way road
2013-05-04 14:53:50 718
原创 STL中的优先队列知识
很无奈呀,以前学习的知识都给忘掉了,这都是不及时复习,学习一遍就扔掉所导致的,所以时常复习是非常必要的,有些东西急不来,他们通过量来提高自己的能力,你呢?你没有那么长的时间,所以就只能通过学习一次,就一直记住,时常的复习来,弥补自己时间不充足的缺点。发现自己越来越难静下心来了,都是玩游戏导致的呀。呵呵,自己放纵的太狠了呢。睡眠不足哈,一天都学习的不是很好。言归正传-----优先队列,是一个
2013-05-02 21:03:33 790
翻译 详解STL中map的用法
c++ Map是STL的一个关联容器,它提供一对一(其中第一个可以称为关键字,每个关键字只能在map中出现一次,第二个可能称为该关键字的值)的数据处理能力,由于这个特性,它完成有可能在我们处理一对一数据的时候,在编程上提供快速通道。这里说下map内部数据的组织,map内部自建一颗红黑树(一种非严格意义上的平衡二叉树),这颗树具有对数据自动排序的功能,所以在map内部所有的数据都是有序的,后边
2013-05-02 20:11:23 837
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人