题目见http://125.221.232.253/JudgeOnline/problem.php?id=1073http://125.221.232.253/JudgeOnline/problem.php?cid=1073&pid=4有不少方法可以解决该题,这里使用hash来解决.
hash函数很...
分类:
其他好文 时间:
2014-05-10 01:03:19
阅读次数:
264
我们可以枚举每个点,然后求出这个点到其余点最小消耗的代价,求出比t小的且距离最大的更新答案。/**************************************************************
Problem: 1295 User: BLADEVIL ...
分类:
其他好文 时间:
2014-05-10 00:07:46
阅读次数:
317
Edge
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 1886 Accepted Submission(s): 1212
Problem Description
For products that are...
分类:
其他好文 时间:
2014-05-09 15:15:36
阅读次数:
307
点击打开链接
Problem 2150 Fire Game
Accept: 237 Submit: 808
Time Limit: 1000 mSec Memory Limit : 32768 KB
Problem Description
Fat brother and Maze are playing a kind of special (hent...
分类:
其他好文 时间:
2014-05-09 14:08:37
阅读次数:
502
题目连接:check here~
题意是说给一个字符串,包含'(',')','[',']'四种字符,判断至少需要添加几个字符使所给字符串括号匹配。
区间型动态规划,设dp[i][j]表示在字符串s中i位置到j位置所需要添加的最少的字符(i
有两种情况:
1、dp[i][j] = dp[i+1][j] + 1;
表示:在i到j之间没有与s[i]相匹配的括号,则必须添加一个字符来与之匹配...
分类:
其他好文 时间:
2014-05-09 14:07:36
阅读次数:
230
题目如下:
Problem D: ShellSort
He made each turtle stand on another one's back
And he piled them all up in a nine-turtle stack.
And then Yertle climbed up. He sat down on the pile.
What a wonderful v...
分类:
其他好文 时间:
2014-05-09 06:20:44
阅读次数:
396
畅通工程续
Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 24979 Accepted Submission(s): 8900
Problem Description
某省自从实行了很多年的畅通工程计划后,...
分类:
其他好文 时间:
2014-05-09 06:12:04
阅读次数:
357
The ? 1 ? 2 ? ... ? n = k problem
The problem
Given the following formula, one can set operators '+' or '-' instead of each '?', in order to obtain a given k
? 1 ? 2 ? ... ? n =...
分类:
其他好文 时间:
2014-05-09 06:10:40
阅读次数:
285
Anniversary party
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 4310 Accepted Submission(s): 1976
Problem Description
There is...
分类:
其他好文 时间:
2014-05-09 06:08:50
阅读次数:
305