摘要: 原题链接 题解 1.看到拼接,有种背包dp的感觉 所以方法1,暴力背包dp \(Code1\) #include<bits/stdc++.h> using namespace std; int vis[200005]={0}; vector<string> a; int main() { strin 阅读全文
posted @ 2024-04-01 22:51 纯粹的 阅读(113) 评论(0) 推荐(0)
摘要: 原题链接 题解 1.字符串集合map?但是无法做到字典序排序,所以是字典树 2.n<=3000,所以 \(O(n^2)\) 而且本题的特殊性,即每个子串都要放进去,所以要在 \(n^2\) 一边遍历一边放 code #include<bits/stdc++.h> using namespace st 阅读全文
posted @ 2024-04-01 14:19 纯粹的 阅读(18) 评论(0) 推荐(0)