摘要:
hdu1251统计难题 链表版字典树: #include <cstdio> #include <string> using namespace std; class Trie { Trie* next[26]; int num; public: Trie() { for (int i = 0; i 阅读全文
摘要:
I Hate It 线段树: 单点修改 查询区间最小值 #include <cstdio> #include <iostream> #include <algorithm> #include <vector> using namespace std; typedef long long LL; /* 阅读全文
摘要:
并查集(Disjoint Set Union)模板 #include <vector> using namespace std; /** * Disjoint Set Union */ class DSU { vector<int> s; int cnt; // 记录集合个数 public: DSU 阅读全文