Problem DescriptionXiao Ming is a citizen who's good at playing,he has lot's of gold cones which have square undersides,let's call them pyramids.Anyon...
分类:
其他好文 时间:
2015-09-12 22:22:49
阅读次数:
370
给定M分钟,N种题目,然后每种题目有一个耗时和分数,每种题目可以选多个,问在M分钟内可以最多得多少分。最裸的完全背包。/*ID: modengd1PROG: inflateLANG: C++*/#include #include #include int dp[10000];int T[10000]...
分类:
其他好文 时间:
2015-09-12 21:35:44
阅读次数:
121
给一个邻接矩阵求最小生成树的权值。最简单的prim就行,但我写了加堆优化的prim。以提高效率。/*ID: modengd1PROG: agrinetLANG: C++*/#include #include #include #include using namespace std;int N;in...
分类:
Web程序 时间:
2015-09-12 20:22:08
阅读次数:
227
Baskets of Gold CoinsTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1862Accepted Submission(s): 1...
分类:
其他好文 时间:
2015-09-12 17:37:11
阅读次数:
130
Baskets of Gold CoinsTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1855Accepted Submission(s): 1...
分类:
其他好文 时间:
2015-09-12 14:47:55
阅读次数:
175
Number TrianglesConsider the number triangle shown below. Write a program that calculates the highest sum of numbers that can be passed on a route tha...
分类:
其他好文 时间:
2015-09-11 15:42:03
阅读次数:
188
标题效果:一个N积分m无向图边。它可以是路径k右边缘值变0,确定此时1-n最短路径长度。Sol:我以为我们考虑分层图,图复制k+1部分,每间0~k一层。代表在这个时候已经过去“自由边缘”文章编号。层与层之间的边权值为0且为单向由上层指向下层。这样我们以0层的1点做单源最短路径。每一层的n点的距离最小...
分类:
其他好文 时间:
2015-09-11 14:04:16
阅读次数:
133
Mother's MilkFarmer John has three milking buckets of capacity A, B, and C liters. Each of the numbers A, B, and C is an integer from 1 through 20, in...
分类:
其他好文 时间:
2015-09-10 01:49:15
阅读次数:
182
Arithmetic ProgressionsAn arithmetic progression is a sequence of the form a, a+b, a+2b, ..., a+nb where n=0,1,2,3,... . For this problem, a is a non-...
分类:
其他好文 时间:
2015-09-10 01:47:43
阅读次数:
168
Arithmetic ProgressionsAn arithmetic progression is a sequence of the form a, a+b, a+2b, ..., a+nb where n=0,1,2,3,... . For this problem, a is a non-...
分类:
其他好文 时间:
2015-09-09 19:23:52
阅读次数:
170