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

一点点建议,用scanf 不要用cin

Posted by hehexiaobai at 2010-08-22 15:53:19 on Problem 3170
这题不算难, 两次BFS求最短路径Bessie求一次,Ni求一次,

二者到map[i][j]==4的(i,j)的最短距离的和的最小值就是答案。

算法的时间复杂度都差不多,一般都要几百ms,但一定要用scanf,用cin 肯定TLE。

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