动态规划
i am a coder
这个作者很懒,什么都没留下…
展开
-
最长公共子序列
#include#includeint s[20][20];int max(int a,int b){ if(a>=b) { return a; } else { return b; }}int lcs(int n,int m,char x[],char y[]){ int i,j; for(i=0;i<n;i++) {原创 2013-07-19 19:25:55 · 418 阅读 · 0 评论 -
HDU Piggy-Bank
Piggy-Bank Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 8 Accepted Submission(s) : 6Font: Times New Roman | Verdana | GeorgiaFont S原创 2013-08-02 16:47:09 · 511 阅读 · 0 评论 -
HDU To The Max
这道题目想了好久没做出来,越想越复杂。后面百度了一下大牛的代码,才知道这个题目涉及到压缩问题。把二维的问题转化为一维的问题,然后就可以很快的解决问题。(1)首先把题目中的矩阵转化为熟悉的数组。for(j=i;j<n;j++) { for(k=0;k<n;k++) { b[k]+=a[j][k]; }}上述代码,将将矩阵的元素按列存到原创 2013-07-28 14:18:03 · 415 阅读 · 0 评论 -
HDU 搬寝室
搬寝室Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5957 Accepted Submission(s): 1977Problem Description搬寝室是很累的,xhd深有体会.时间追述2006年7月9号,那转载 2013-07-28 10:27:43 · 461 阅读 · 0 评论 -
HDU Employment Planning
Employment Planning Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 9 Accepted Submission(s) : 7Font: Times New Roman | Verdana | Georgia原创 2013-07-28 19:52:18 · 432 阅读 · 0 评论 -
HDU A strange lift
A strange lift Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 8 Accepted Submission(s) : 7Font: Times New Roman | Verdana | GeorgiaFo原创 2013-08-05 11:22:35 · 457 阅读 · 0 评论 -
Ignatius and the Princess III
Ignatius and the Princess IIITime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 10143 Accepted Submission(s): 7184Problem Description原创 2013-08-20 10:58:10 · 576 阅读 · 0 评论 -
Cut Ribbon
Cut RibbonTime Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64uSubmitStatusPracticeCodeForces 189ADescriptionPolycarpus has a ribbon, its length is n. He wants原创 2013-08-09 08:41:06 · 942 阅读 · 0 评论 -
HDU Coins
Coins Time Limit : 2000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 107 Accepted Submission(s) : 44Font: Times New Roman | Verdana | GeorgiaFont Siz原创 2013-08-12 16:49:56 · 680 阅读 · 0 评论 -
饭卡
饭卡 Time Limit : 5000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 6 Accepted Submission(s) : 3Problem Description电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个原创 2013-08-14 21:00:05 · 885 阅读 · 0 评论 -
HDU Dividing
DividingTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12811 Accepted Submission(s): 3596Problem DescriptionMarsha and Bill own原创 2013-08-02 20:10:00 · 563 阅读 · 0 评论 -
HDU 今年暑假不AC
今年暑假不AC Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 15 Accepted Submission(s) : 12Font: Times New Roman | Verdana | GeorgiaFont Si原创 2013-08-02 17:00:15 · 473 阅读 · 0 评论 -
HDU Max Sum Plus Plus
Max Sum Plus Plus Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 22 Accepted Submission(s) : 8Font: Times New Roman | Verdana | Georgia原创 2013-07-31 15:48:40 · 550 阅读 · 0 评论 -
Big Event in HDU
Big Event in HDUTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 18297 Accepted Submission(s): 6408Problem DescriptionNowadays, w原创 2013-07-31 11:19:45 · 490 阅读 · 0 评论 -
HDU Max Sum
Max Sum Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 22 Accepted Submission(s) : 9Font: Times New Roman | Verdana | GeorgiaFont Siz原创 2013-07-26 14:11:27 · 469 阅读 · 0 评论 -
HDU 数塔
数塔 Time Limit : 1000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 15 Accepted Submission(s) : 13Font: Times New Roman | Verdana | GeorgiaFont Size: ←原创 2013-07-26 14:15:00 · 487 阅读 · 0 评论 -
HDU 龟兔赛跑
龟兔赛跑 Time Limit : 1000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 11 Accepted Submission(s) : 6Font: Times New Roman | Verdana | GeorgiaFont Size:原创 2013-07-26 19:40:06 · 654 阅读 · 0 评论 -
HDU Tian Ji -- The Horse Racing
Tian Ji -- The Horse RacingTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 14534 Accepted Submission(s): 4149Problem DescriptionH原创 2013-08-02 16:41:32 · 585 阅读 · 0 评论 -
HDU I NEED A OFFER!
I NEED A OFFER! Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 19 Accepted Submission(s) : 10Font: Times New Roman | Verdana | Georgia原创 2013-08-02 16:52:32 · 459 阅读 · 0 评论 -
HDU Super Jumping! Jumping! Jumping!
Super Jumping! Jumping! Jumping! Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 15 Accepted Submission(s) : 8Font: Times New Roman | Verd原创 2013-07-27 16:27:44 · 384 阅读 · 0 评论 -
HDU FatMouse' Trade
FatMouse' Trade Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 20 Accepted Submission(s) : 14Font: Times New Roman | Verdana | Georgia原创 2013-08-02 16:58:30 · 514 阅读 · 0 评论 -
J - 病毒
J - 病毒Time Limit:3000MS Memory Limit:131072KB 64bit IO Format:%lld & %lluSubmitStatusPracticeCSU 1120Description你有一个日志文件,里面记录着各种系统事件的详细信息。自然的,事件的时间戳按照严格递增顺序排列(不会有两个事件在完全相同的时刻原创 2013-09-09 15:36:13 · 911 阅读 · 0 评论