摘要:
题目链接无语的一个题。做法是普通的O(n^2)的DP,这个题啥意思啊。 1 #include <cstring> 2 #include <cstdio> 3 #include <string> 4 #include <iostream> 5 #include <vector> 6 using namespace std; 7 int dp[101],p[101],o[101]; 8 int f(int a,int b) 9 {10 return a < b ? a:b;11 }12 int main()13 {14 int t, 阅读全文
摘要:
题目链接开始看错题了,导致一直没找到节奏,看宝哥题解过的。 1 #include <cstdio> 2 #include <cstring> 3 #include <cmath> 4 #include <string> 5 #include <map> 6 #include <algorithm> 7 #include <queue> 8 #include <vector> 9 using namespace std;10 #define C 7500 11 int dp[21][20001];12 阅读全文