hdu1470Closest Common Ancestors LCA
//刚学lca,代码是参考大神的
#include
#include
#include
using namespace std;
const int maxn=1010;
const int maxq=500010;
int parent[maxn];
int ancestor[maxn];
int answer[maxq];
//**********************/
原创
2015-03-09 21:19:05 ·
506 阅读 ·
0 评论