摘要: Example 有如下单词 1.abacb 2.abc 3.acb 4.aaa 5.bcb 构建字典树如下图 template #define N 3000005 #define M 70 int trie[N][M],index,cnt[N]; std::string s; namespace T 阅读全文
posted @ 2024-01-06 15:29 一个追寻光的人 阅读(42) 评论(0) 推荐(0)
摘要: 50 pts 只需要按照题目意思模拟即可,得出以下打表程序。 #include<iostream> #include<cstring> #include<cmath> int t,n; int mc(std::string x,std::string y){ int res=0; for(int i 阅读全文
posted @ 2024-01-06 11:58 一个追寻光的人 阅读(65) 评论(0) 推荐(0)