摘要:
求出走到每个点有的方法数a[i],再求出每个点到终点的方法数b[i]。每条边走的 次数=a[u[i]]*b[v[i]] 。可以用类spfa按照拓扑序求a[i],把入度为0的点都入栈然后a[e[j]]=a[e[j]]+a[q[h]]求b[i]可以把边反向重新spfa一遍。[toggle Title="code "][pascal]uses math;varu,v,rud,next,e,head:Ar... 阅读全文
posted @ 2013-03-19 15:53
lbz007
阅读(134)
评论(0)
推荐(0)
摘要:
Welcome to WordPress. This is your first post. Edit or delete it, then start blogging! 阅读全文
posted @ 2013-03-19 08:52
lbz007
阅读(96)
评论(0)
推荐(0)
摘要:
This is an example page. It's different from a blog post because it will stay in one place and will show up in your site navigation (in most themes). Most people start with an About page that introduc... 阅读全文
posted @ 2013-03-19 08:52
lbz007
阅读(153)
评论(0)
推荐(0)