摘要:
#include <iostream> #include <cstring> #include <algorithm> using namespace std; const int N = 500; int n, m, g[N][N], d[N]; bool st[N]; int dijkstra( 阅读全文
摘要:
#include <iostream> #include <algorithm> #include <cstring> using namespace std; const int N = 100010, M = 2 * N; int n, ans = N; int h[N], e[M], ne[M 阅读全文
摘要:
散列法: #include <cstdio> #include <iostream> #include <string.h> using namespace std; const int N = 100010, null = 0x3f3f3f3f; int h[N], e[N], ne[N], id 阅读全文
摘要:
堆: #include <cstdio> #include <iostream> using namespace std; const int N = 100010; int n,m,h[N],s; void down(int u) { int t = u; if(u * 2 <= s && h[u 阅读全文
摘要:
在一个字符串集合当中进行字符串的插入和查找,采用的是由上而下的存储从首字母开始的一个树结构。 进行字符串的插入操作: int insert(char str[]) { int p = 0; for(int i = 0;str[i];i++) { int u = str[i] - 'a'; if(!s 阅读全文