摘要: #include <iostream> using namespace std; const int N = 310; int n; int s[N]; int f[N][N]; int main() { cin >> n; for (int i = 1; i <= n; ++ i) cin >> 阅读全文
posted @ 2021-08-30 17:51 青衫客36 阅读(51) 评论(0) 推荐(0) 编辑
摘要: #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 阅读(16) 评论(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) 编辑
摘要: #include <iostream> #include <vector> #include <algorithm> using namespace std; vector<int> div(vector<int> A, int b, int &r) { vector<int> C; r = 0; 阅读全文
posted @ 2021-08-28 17:58 青衫客36 阅读(29) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <vector> using namespace std; vector<int> mul(vector<int> A, int b) { vector<int> C; int t = 0; for (int i = 0; i < A.siz 阅读全文
posted @ 2021-08-28 17:56 青衫客36 阅读(32) 评论(0) 推荐(0) 编辑