![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
dfs
文章平均质量分 72
coder_coder_coder
默默的程序猿
展开
-
Hoj 2064 Journey to Tibet(递归)
原文:点击打开链接转载 2014-07-31 23:00:26 · 395 阅读 · 0 评论 -
hdu3887Counting Offspring
#include #include #include #include using namespace std; const int N=100005; int f[N],c[N<<1],s[N<<1],e[N<<1],next[N<<1],n,p,l[N],r[N]; bool vis[N]; void connect(int i,int u,int v){ next[i]=s[原创 2014-08-12 00:41:51 · 339 阅读 · 0 评论 -
poj3321Apple Tree
#include #include #include using namespace std; const int N=100005; int n,m,s[N<<1],e[N<<1],next[N<<1],c[N],l[N],r[N],cnt; bool vis[N]; //s[]start,e[]end, //cnt表示dfs访问时间,l[]记录进入时,r[]记录出去时 //注意c[i]是原创 2014-08-12 00:39:48 · 405 阅读 · 0 评论