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

大哥你算法有问题

Posted by justryit at 2013-07-31 09:56:19 on Problem 1062 and last updated at 2013-07-31 10:04:03
In Reply To:Dijstra算法,大侠的所有数据都能通过,但却不能过oj,很是悲剧,有谁帮看一下吧,有注释 Posted by:hopeztm at 2011-11-09 09:23:21
1 4
10000 3 2
2 1
3 3
1000 2 2
4 1
3 1
1000 3 1
4 2
100 4 0

你的程序出104,答案105。
算算吧你的程序没有考虑间接身份差异不可行的情况
对于这组数据你的程序是4->3->2->1的,但4和2不能并存
应当枚举每个身份区间,对每一个都dijkstra一遍

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