摘要:
Trie树 Trie:用来高效存储和查找的字符串集合,从根节点开始依次存储字符串的各个字符, 并在最后一个字符中做出标记表示 以此结束是一个字符串。 例题: 测试样例: 5 I abc Q abc Q ab I ab Q ab 预期输出: 1 0 1 代码实现: #include<bits/stdc 阅读全文
摘要:
输入数据: 6 2 3 4 5 6 1 期望输出: 5 代码实现: #include<bits/stdc++.h> using namespace std; const int N = 1e6+9; typedef long long ll; int n; int q[N],temp[N]; ll 阅读全文
摘要:
输入样例: 5 3 2 4 1 5 3 期望输出: 3 代码实现 #include<bits/stdc++.h> using namespace std; const int N = 1e6+9; int n,m; int a[N]; int quick_sort(int l,int r,int m 阅读全文