摘要:
字典树 点击查看代码 void insert(char *str){ int rot = 0; // 当前子树根节点 int len = strlen(str); int res = 0 ; // 表示字典树路径上存在有几个别的单词,用于这道题统计答案 for(int i = 0; i < len; 阅读全文
摘要:
树的直径 例题 SP1437 PT07Z - Longest path in a tree 输出直径长度 点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 1e4+10 阅读全文