上一页 1 2 3 4 5 6 7 ··· 16 下一页
摘要: /*Gu Jian Qi Tan--------------------------------------------------------------------------------Time Limit: 2 Seconds Memory Limit: 65536 KB --------------------------------------------------------------------------------Gu Jian Qi Tan is a very hot Chinese RPG in this summer vacation. SuSu is ... 阅读全文
posted @ 2013-07-30 20:10 myth_HG 阅读(477) 评论(0) 推荐(0) 编辑
摘要: 优先队列:顾名思义,首先它是一个队列,但是它强调了“优先”二字,所以,已经不能算是一般意义上的队列了,它的“优先”意指取队首元素时,有一定的选择性,即根据元素的属性选择某一项值最优的出队~百度百科上这样描述的: 优先级队列 是不同于先进先出队列的另一种队列。每次从队列中取出的是具有最高优先权的元素 优先队列的类定义 优先队列是0个或多个元素的集合,每个元素都有一个优先权或值,对优先队列执行的操作有1) 查找;2) 插入一个新元素;3) 删除.在最小优先队列(min priorityq u e u e)中,查找操作用来搜索优先权最小的元素,删除操作用来删除该元素;对于最大优先队列(ma... 阅读全文
posted @ 2013-07-30 16:06 myth_HG 阅读(58125) 评论(1) 推荐(9) 编辑
摘要: /*AssignmentsTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1301 Accepted Submission(s): 599Problem DescriptionIn a factory, there are N workers to finish two types of tasks (A and B). Each type has N tasks. Each task of type A needs xi tim... 阅读全文
posted @ 2013-07-30 15:09 myth_HG 阅读(180) 评论(0) 推荐(0) 编辑
摘要: /*hdu-1052Tian Ji -- The Horse RacingTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 14456 Accepted Submission(s): 4125Problem DescriptionHere is a famous story in Chinese history."That was about 2300 years ago. General Tian Ji was a high of. 阅读全文
posted @ 2013-07-30 10:44 myth_HG 阅读(2954) 评论(0) 推荐(0) 编辑
摘要: /* SupermarketTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 7856 Accepted: 3343DescriptionA supermarket has a set Prod of products on sale. It earns a profit px for each product x∈Prod sold by a deadline dx that is measured as an integral number of time units starting from ... 阅读全文
posted @ 2013-07-29 19:54 myth_HG 阅读(239) 评论(0) 推荐(0) 编辑
摘要: /* The Dragon of LoowaterOnce upon a time, in the Kingdom of Loowater, a minor nuisance turned into a major problem.The shores of Rellau Creek in central Loowater had always been a prime breeding ground for geese. Due to the lack of predators, the geese population was out of control. The people of L 阅读全文
posted @ 2013-07-29 16:45 myth_HG 阅读(260) 评论(0) 推荐(0) 编辑
摘要: /*GCommando WarInput: Standard InputOutput: Standard Output “Waiting for orders we held in the wood, word from the front never cameBy evening the sound of the gunfire was miles awayAh softly we moved through the shadows, slip away through the treesCrossing their lines in the mists in the fields on . 阅读全文
posted @ 2013-07-29 15:22 myth_HG 阅读(336) 评论(0) 推荐(0) 编辑
摘要: /*循环日程表问题(递归分治)*/#include #include#include#include#include#include#include#includeusing namespace std;#define maxn 2600//int f=0;int a[maxn][maxn];void cir(int i,int j,int n){ int p,q; if(n==2)//递归出口 { a[i][n]=j; a[i][n-1]=i; a[j][n]=i; a[j][n-1]=j; // pri... 阅读全文
posted @ 2013-07-27 19:52 myth_HG 阅读(467) 评论(0) 推荐(0) 编辑
摘要: /*调用算法中函数求写一个排序*/#include #include#include#include#include#include#include#includeusing namespace std;#define maxn 2600000typedef int State[9];State st[maxn],goal;int dist[maxn];const int dx[]= {-1,1,0,0};const int dy[]= {0,0,-1,1};int vis[36288],fact[9];/*void init_lookup_table(){ int i; fact... 阅读全文
posted @ 2013-07-25 20:31 myth_HG 阅读(218) 评论(0) 推荐(0) 编辑
摘要: /* Monthly ExpenseTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 10757 Accepted: 4390DescriptionFarmer John is an astounding accounting wizard and has realized he might run out of money to run the farm. He has already calculated and recorded the exact amount of money (1 ≤ mo... 阅读全文
posted @ 2013-07-25 15:29 myth_HG 阅读(314) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 16 下一页