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

Re:这题有人用差分约束做的么?

Posted by scutacm3 at 2004-07-22 22:29:11 on Problem 1698
In Reply To:Re:这题有人用差分约束做的么? Posted by:XieWenlei at 2004-07-22 22:15:23
用s[i]表示Alice从第一周到第i周总共工作的天数
这样就可以列出一系列的约束条件,比如:

s[i]-s[i-1]>=0
s[i]-s[i-1]<=第i周最多可以工作的天数

然后判断是否存在负权回路,如果有就无解
不知道这样作怎么不对,大家说说哪里欠缺考虑?

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