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:请教高手,为什么用DFS过不了呀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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator