ACE-Top

导航

2013年8月24日 #

Max Sum(dp)

摘要: 经典DP啊!!dp的力量啊,,30Ms~~~~秒过。。。。。 1 #include 2 3 int main () 4 { int T,a,n,x,y; 5 while(scanf("%d",&T)!=EOF) 6 { 7 for(int ca=1;camax){max=sum;x=strt;y=end;}16 if(sum>=0)17 end+=1; 18 if(sum<0)19 {20 ... 阅读全文

posted @ 2013-08-24 17:53 ACE-Top 阅读(153) 评论(0) 推荐(0) 编辑

D - Palindrome Partitioning (DP)

摘要: Palindrome Partitioning Time Limit:1000ms Memory Limit:32768KBA palindrome partition is the partitioning of a string such that each separate substring is a palindrome.For example, the string"ABAC... 阅读全文

posted @ 2013-08-24 12:03 ACE-Top 阅读(190) 评论(0) 推荐(0) 编辑