随笔分类 - 打ACM的岁月
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2602 Bone Collector Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Tot
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3342 Legal or Not Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4857 逃生 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submissio
阅读全文
摘要:拓 扑 排 序 一个较大的工程往往被划分成许多子工程,我们把这些子工程称作活动(activity)。在整个工程中,有些子工程(活动)必须在其它有关子工程完成之后才能开始,也就是说,一个子工程的开始是以它的所有前序子工程的结束为先决条件的,但有些子工程没有先决条件,可以安排在任何时间开始。为了形象地反
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1285 确定比赛名次 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submi
阅读全文
摘要:1、stackstack 模板类的定义在<stack>头文件中。stack 模板类需要两个模板参数,一个是元素类型,一个容器类型,但只有元素类型是必要的,在不指定容器类型时,默认的容器类型为deque。定义stack 对象的示例代码如下:stack<int> s1;stack<string> s2;
阅读全文
摘要:PriorityQueue是从JDK1.5开始提供的新的数据结构接口,它是一种基于优先级堆的极大优先级队列。优先级队列是不同于先进先出队列的另一种队列。 每次从队列中取出的是具有最高优先权的元素。如果不提供Comparator的话,优先队列中元素默认按自然顺序排列,也就是数字默认是小的在队列头, 字
阅读全文
摘要:#include <iostream>#include <queue>#include <assert.h>/*调用的时候要有头文件: #include<stdlib.h> 或 #include<cstdlib> + #include<queue> #include<queue>详细用法:定义一个q
阅读全文
摘要:vector(向量): C++中的一种数据结构,确切的说是一个类.它相当于一个动态的数组,当程序员无法知道自己需要的数组的规模多大时,用其来解决问题可以达到最大节约空间的目的. 用法: 1.文件包含: 首先在程序开头处加上#include<vector>以包含所需要的类文件vector 还有一定要加
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2277 Change the ball Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)To
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2274 Magic WisKey Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1312 Red and Black Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Tota
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2717 Catch That Cow Time Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Tot
阅读全文
摘要:A strange lift Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Problem Description There is a strange lift.The lift c
阅读全文
摘要:Knight Moves Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Problem Description A friend of you is doing research on
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/contests/contest_showproblem.php?pid=1002&cid=723 Cure Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (
阅读全文
摘要:题目链接:http://acm.hdu.edu.cn/contests/contest_showproblem.php?pid=1001&cid=723 I Count Two ThreeTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 327
阅读全文
摘要:迪杰斯特拉算法(Dijkstra): Dijkstra(迪杰斯特拉)算法是典型的单源最短路径算法,用于计算一个节点到其他所有节点的最短路径。 主要特点是以起始点为中心向外层层扩展,直到扩展到终点为止。 1 #include <iostream> 2 using namespace std; 3 co
阅读全文
摘要:Invitation Cards Problem Description In the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are aware
阅读全文
摘要:Arbitrage Problem Description Arbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency into more than one
阅读全文

浙公网安备 33010602011771号