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

FT, 两个编号写错了

Posted by hz02ruc at 2004-07-28 00:23:56 on Problem 1679
In Reply To:Re:你可以编个程序试试他的数据 Posted by:hz02ruc at 2004-07-28 00:22:38
> 刚才试数据,在求MST之前判连通,不连通就来个死循环,结果WA, 去掉之后一直是RE
> 数据应该对的,但是JUDGE结果也应该一样啊,不管了,说说我是怎么做的
> 
> 1. 先求MST,得出费用和MST的边集E
> 2. 当E不空, 则进行3
> 3. 删掉MST中的一条边
> 3. 若此时图连通,再求MST'
>        如果此时的费用和开始的一样,就说明不唯一,退出,
>        否则恢复这条边, 转2.
>    否则 转2
> 
> 4. MST是唯一的,输出费用
>  
> 不知道有没有什么问题?

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