![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
模板
Davenny
O ever youthful,O ever weeping.
展开
-
堆模板
//维持最小堆 //调整 void down(int p) { int q=p*2; a=heap[p]; while(q<=hlength) { if(q<hlenth&&heap[q]>heap[q+1])//寻找当前子节点中较小的那个 { q++; } if(heap[q]>原创 2017-07-02 15:32:29 · 240 阅读 · 0 评论 -
平衡二叉树模板
poj2418字典树#include <cstdio> #include <algorithm> #include <cstring> using namespace std; typedef struct AVLTree { char name[31]; int cnt; struct AVLTree *pLeft; struct AVLTree *pRight;原创 2017-07-02 14:54:04 · 333 阅读 · 0 评论 -
Trie字典树模板
#include<iostream> #include<cstring> using namespace std; typedef struct Trie_node { int count; // 统计单词前缀出现的次数 struct Trie_node* next[26]; // 指向各个子树的指针 boo原创 2017-07-03 11:21:15 · 397 阅读 · 0 评论