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 |
一点点建议,用scanf 不要用cin这题不算难, 两次BFS求最短路径Bessie求一次,Ni求一次, 二者到map[i][j]==4的(i,j)的最短距离的和的最小值就是答案。 算法的时间复杂度都差不多,一般都要几百ms,但一定要用scanf,用cin 肯定TLE。 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator