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 whenmary at 2008-08-29 00:38:53 on Problem 1087 and last updated at 2008-08-29 00:41:44
我的算法不是很高效,32ms跑过。不知道他们0ms的怎么过的。。。我没有用floyd,只用了最大流。
源点到每个插座容量为一的边;如果插座a能变成b,那么a到b有一条无限量的边,
物品x需要插座a,那么a到x一条容量无限的边,所有物品到汇一条容量为1的边,最后一个最大流,
流量就是最多可以插上多少物品
源点编号为0,最多可能有400种插座,
那么物品就从400开始吧,最后汇就是500

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