摘要: #include <iostream> using namespace std; const int N = 1010; int n, m; char a[N], b[N]; int f[N][N]; int main() { cin >> n >> m; cin >> a + 1 >> b + 1 阅读全文
posted @ 2021-08-29 20:03 青衫客36 阅读(17) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; const int N = 1010; int n; int a[N], f[N]; int main() { cin >> n; for (int i = 1; i <= n; ++ i) cin >> a[i]; 阅读全文
posted @ 2021-08-29 19:01 青衫客36 阅读(17) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; const int N = 550, INF = 1e9; int n; int a[N][N], f[N][N]; int main() { cin >> n; for (int i = 1; i <= n; ++ 阅读全文
posted @ 2021-08-29 18:01 青衫客36 阅读(27) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; const int N = 110; int v[N][N], w[N][N]; int s[N], f[N]; int n, m; int main() { cin >> n >> m; for (int i = 1 阅读全文
posted @ 2021-08-29 17:21 青衫客36 阅读(28) 评论(0) 推荐(0) 编辑
摘要: // 朴素解法 #include <iostream> using namespace std; const int N = 110; int n, m; int s[N], v[N], w[N]; int f[N][N]; int main() { cin >> n >> m; for (int 阅读全文
posted @ 2021-08-29 17:20 青衫客36 阅读(31) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; const int N = 1010; int n, m; int v[N], w[N]; int f[N]; int main() { cin >> n >> m; for (int i = 1; i <= n; + 阅读全文
posted @ 2021-08-29 17:16 青衫客36 阅读(18) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; const int N = 1010; int n, m; int v[N], w[N]; int f[N]; int main() { cin >> n >> m; for (int i = 1; i <= n; + 阅读全文
posted @ 2021-08-29 17:14 青衫客36 阅读(13) 评论(0) 推荐(0) 编辑