摘要:
1.迭代 void add(int a , int b , int c) { e[idx] = b , w[idx] = c , ne[idx] = h[a] , h[a] = idx++; } int gcd(int a , int b) { return b ? gcd(b , a%b) : a 阅读全文
摘要:
#include <iostream> #include <cstring> using namespace std; const int N = 100003; int h[N] , e[N] , ne[N] , idx;//h是数组头,e是存的插的链表的值,ne是其下一个的idx void in 阅读全文
摘要:
1.Trie树 , 高速地存储和查找字符串集合的数据结构 #include <iostream> #include <cstring> #include <algorithm> using namespace std; const int N = 1e5+10; int son[N][26] , c 阅读全文