Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:请教高手,为什么用DFS过不了呀

Posted by wrong123 at 2006-01-04 21:10:06 on Problem 2240
In Reply To:请教高手,为什么用DFS过不了呀 Posted by:041221125 at 2005-12-18 12:14:07
DFS 会TLE
用类似于Floyd的做法。

建立一个二维表,表示各货币间的比率。3重循环遍历,得到各元素间的最大比率。
最后再遍历自身到自身的比率,如果存在一个 > 1 的。。。。

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator