摘要: Use priority_queue tosimulate : 1 #include 2 #include 3 #include 4 #include 5 #include 6 const int MAXN = 10000+10; 7 using namespace std; 8 9 t... 阅读全文
posted @ 2015-04-19 16:10 纸牌 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 最长公共子序列: dp[i][j] :当前子弹的最大得分,if ([i-1]==[j-1]) dp[i][j]=dp[i-1][j-1]+score[a[i-1]]; else dp[i][j]=max(dp[i-1][j],dp[i][j-1]); 1 #include 2 #inclu... 阅读全文
posted @ 2015-04-19 13:30 纸牌 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 重载 operatory.rp) return 1; 8 else if(x.rp==y.rp && x.name q[MAXN]; 阅读全文
posted @ 2015-04-19 11:54 纸牌 阅读(1298) 评论(0) 推荐(0) 编辑
摘要: 注意以下4种情况:0 0 可以1 1 0 0 不可以 1 2 1 2 0 0 不可以1 2 2 1 0 0 不可以 1 #include 2 #include 3 4 const int MAXN=100000+5; 5 6 int a,b,mycase=1; 7 boo... 阅读全文
posted @ 2015-04-19 11:00 纸牌 阅读(152) 评论(0) 推荐(0) 编辑