上一页 1 2 3 4 5 6 7 ··· 15 下一页
摘要: Max SumTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 128098Accepted Submission(s): 29672Problem DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5... 阅读全文
posted @ 2014-03-05 13:32 Ramanujan 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 最短路Time Limit: 5000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 24512Accepted Submission(s): 10549 Problem Description在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从商店到赛场的路线,你可以帮助他们吗?Input输入包括多组数据。每组数据第一行是两个整数N、M(N#includ 阅读全文
posted @ 2013-12-27 16:08 Ramanujan 阅读(182) 评论(0) 推荐(0) 编辑
摘要: Problem 2136 取糖果 Accept: 89Submit: 221Time Limit: 1000 mSecMemory Limit : 32768 KB Problem Description有N个袋子放成一排,每个袋子里有一定数量的糖果,lzs会随机选择连续的几个袋子,然后拿走这些袋子中包含最多糖果的袋子。现问你,在选择x个袋子的情况下,lzs最坏情况下,也就是最少会拿到多少个糖果?对于x取值为1到n都分别输出答案。 Input第一行一个整数T,表示有T组数据。每组数据先输入一行一个整数N(1k, 则该元素一定是某些(个)区间长度为k的区间内最大值, 所以ans[k] =min. 阅读全文
posted @ 2013-12-11 17:50 Ramanujan 阅读(268) 评论(0) 推荐(0) 编辑
摘要: 我猜是哈夫曼算法。。。即贪心把当前连通分量集合中权值最小的两个连接起来,再合成一个加入集合,迭代下去。来不及交了,先贴下代码。#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;#define LL long long#define MAXN 111111int n, m, u[MAXN], v[MAXN], w[MAXN];int p, q, f[MAXN ori, noi;bool have(int &n1, int & 阅读全文
posted @ 2013-11-15 01:36 Ramanujan 阅读(300) 评论(0) 推荐(0) 编辑
摘要: not clear enough:1.haven't mastered definition of : a.tuple relational calculus b.domain relational calculus c.datalog && can't use these methods to solve pros smoothly2.spent much time in understanding recursive programs && semantics of program. 3.still not get the meaning o 阅读全文
posted @ 2013-11-12 01:40 Ramanujan 阅读(177) 评论(0) 推荐(0) 编辑
摘要: Stealing Harry Potter's PreciousTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 131Accepted Submission(s): 68Problem Description Harry Potter has some precious. For example, his invisible robe, his wand and his owl. When Hogwarts school is in h 阅读全文
posted @ 2013-11-09 22:59 Ramanujan 阅读(464) 评论(0) 推荐(0) 编辑
摘要: K - Nearest Common Ancestors Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64u Submit Status Practice POJ 1330Description A rooted tree is a well-known data structure in computer science and engineering. An example is shown below: In the figure, each node is labeled with an in 阅读全文
posted @ 2013-11-07 18:55 Ramanujan 阅读(207) 评论(0) 推荐(0) 编辑
摘要: A - Shortest Prefixes Time Limit:1000MS Memory Limit:30000KB 64bit IO Format:%I64d & %I64u Submit Status Practice POJ 2001Description A prefix of a string is a substring starting at the beginning of the given string. The prefixes of "carbon" are: "c", "ca", "ca 阅读全文
posted @ 2013-11-07 18:53 Ramanujan 阅读(144) 评论(0) 推荐(0) 编辑
摘要: J - Closest Common Ancestors Time Limit:2000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64u Submit Status Practice POJ 1470DescriptionWrite a program that takes as input a rooted tree and a list of pairs of vertices. For each pair (u,v) the program determines the closest common ancestor of 阅读全文
posted @ 2013-11-07 18:53 Ramanujan 阅读(175) 评论(0) 推荐(0) 编辑
摘要: D - Lost Cows Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Practice POJ 2182DescriptionN (2 #define N 8005using namespace std;struct NODE{ int l,r,num;}node[Nleft){ int mid=(right+left)>>1; i=i=c) findBrand(i,c,j); else{ c-=node[i].num... 阅读全文
posted @ 2013-11-07 18:51 Ramanujan 阅读(168) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 15 下一页