Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:Yeah……厉害厉害In Reply To:Re:对每个点,算出起点到该点的走法数F[i]< O( N ) >,和该点到终点的走法数G[i]< O( N ) >,然后枚举每个边< O( M ) >,设s为始点,e为终点,则所有边的F[s]*G[e]的最大值即为答案.时间复杂度为O(N+N+M) Posted by:ecjtuxsyuan at 2008-07-21 16:13:11 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator