摘要:
题目链接: 方法一、\(\rm Trie\) #include <bits/stdc++.h> using namespace std; const int N = 5e5 + 10; int ch[N][26], idx, cnt[N]; void insert(string s) { int p 阅读全文
摘要:
题目链接: 自己的做法: class Solution { public: char repeatedCharacter(string s) { int n = s.size(); vector<int> v(28); vector<pair<char,int> > p; for (int i = 阅读全文
摘要:
题目链接: 第一次提交:依据题意直接模拟,喜提 \(\sf TLE\)。 #include <bits/stdc++.h> using namespace std; bool check(string a, string b) { for (int i = 0; i < a.size(); i++) 阅读全文