摘要:
// 统计 s1 的子序列中是 s1 和 s2 的最长公共子序列的个数 1 #include "bits/stdc++.h" 2 using namespace std; 3 int T; 4 char s1[1010], s2[1010]; 5 int dp[1010][1010]; 6 long... 阅读全文
摘要:
输出一条 LCIS 1 #include "bits/stdc++.h" 2 using namespace std; 3 int T; 4 int len1, len2; 5 int s1[510], s2[510]; 6 int dp[510][510]; 7 int choice[510][5... 阅读全文
摘要:
// 判断出(田忌)的必胜局面和必败局面,则可以容易的得到决策方案// 若没有明显的必胜局面和必败局面,则使用田忌赛马的策略 1 #include "bits/stdc++.h" 2 using namespace std; 3 int N; 4 int v1[1010], v2[1010]; 5 ... 阅读全文
摘要:
//这题的数据是不是有问题... 不考虑宝藏一个也拿不到也能AC... 1 #include "bits/stdc++.h" 2 using namespace std; 3 const int INF = 0x3f3f3f3f; 4 int T; 5 int N, M; 6 int m... 阅读全文