摘要: Electric FencesKolstad & Schrijvers Farmer John has decided to construct electric fences. He hasfenced his fields into a number of bizarre shapes an... 阅读全文
posted @ 2014-11-26 23:48 PlasticSpirit 阅读(306) 评论(0) 推荐(0)
摘要: 题目大意:给一个由,(,),[,]组成的字符串,其中(),[]可以匹配,求最大匹配数题解:区间dp:dp[i][j]表示区间 [i,j]中的最大匹配数初始状态 dp[i][i+1]=(i,i+1可以匹配)?2:0状态转移见代码代码:#include #include #include#include... 阅读全文
posted @ 2014-11-26 21:39 PlasticSpirit 阅读(260) 评论(0) 推荐(0)