摘要:
#include<iostream> #include<string> #include<string.h> #include<math.h> #include<cstdio> using namespace std; int main(){ int n,ss=0; int hh[10]; bool 阅读全文
摘要:
#include<iostream> #include<string> #include<string.h> #include<stack> #include<stdio.h> using namespace std; int main(){ int n,mm=0; int a[1010]; whi 阅读全文
摘要:
字典树又叫trie树,利用字符串的公共前缀来降低查询时间的开销,以及字符串的存储开销。所以经常被搜索引擎系统用于文本词频统计。 字典树的数据结构 #define MAX 26 typedef struct Tree { int count; //用来标记该节点是个可以形成一个单词,如果count!= 阅读全文
摘要:
一、 map 头文件 #include<map> 1)map的定义: map<键数据类型,值数据类型> m; 或者 typedef map <数据类型,值数据类型> M; M m; 2)元素的插入 map<int,int> m; 最常用的 m[key]=value; //m[1]=2; m.inse 阅读全文