- 在线时间
- 1 小时
- 最后登录
- 2014-5-13
- 注册时间
- 2010-11-19
- 听众数
- 3
- 收听数
- 0
- 能力
- 0 分
- 体力
- 20 点
- 威望
- 0 点
- 阅读权限
- 20
- 积分
- 9
- 相册
- 0
- 日志
- 0
- 记录
- 0
- 帖子
- 6
- 主题
- 1
- 精华
- 0
- 分享
- 0
- 好友
- 0
升级 4.21% 该用户从未签到
|
model:
sets:
wh /1..256/:ver;
h /1..16/;
circulation(h,wh):flow;
endsets
data:
ver=
0 4 5 3 2 5 3 6 3 2 6 3 2 4 1 2
3 0 3 5 2 2 4 5 2 5 2 3 4 6 4 0
3 2 0 4 8 2 5 2 1 3 3 2 4 2 2 2
0 3 5 0 5 2 6 3 4 4 1 2 5 4 2 4
5 4 0 7 0 2 5 2 5 7 3 5 1 4 3 4
5 3 7 4 2 0 3 2 2 4 3 4 2 4 2 1
3 7 2 4 3 2 0 2 3 5 1 2 5 4 3 1
5 2 2 3 3 2 1 0 3 5 3 5 1 3 6 2
2 6 2 3 1 4 2 3 0 3 4 5 1 2 3 5
7 5 2 2 3 1 2 0 5 0 3 6 1 5 4 6
5 3 6 2 1 3 3 4 2 1 0 1 5 3 3 5
2 2 4 1 4 4 3 3 4 7 6 0 2 7 3 4
6 3 1 4 3 2 5 3 4 6 7 4 0 4 2 3
2 2 5 5 5 3 1 2 1 2 5 5 4 0 3 1
2 2 7 2 3 3 3 2 4 4 3 3 5 4 0 4
8 0 4 2 4 2 3 7 6 3 3 2 3 2 2 0
;
enddata
[obj] max=@sum(circulation(i,j)|
(@mod(j-1,16) #ne# @floor((j-1)/16) #and# @mod(j-1,16) #ne# (i-1)):flow(i,j));
@for(circulation(i,j)|
(@mod(j-1,16) #eq# @floor((j-1)/16) #or# @mod(j-1,16) #eq# (i-1)):flow(i,j)=0);
@for(wh(j)| @mod(j-1,16) #ne# @floor((j-1)/16):
@sum(h(i)| @mod(j-1,16) #ne# (i-1) : flow(i,j)) <= ver(j));
@for(wh(j)| @mod(j-1,16) #ne# @floor((j-1)/16):
@sum(h(i)| @mod(j-1,16) #ne# (i-1) : flow(i,j)) =
@sum(circulation(m,n)| (m-1) #eq# @mod(j-1,16) #and# @mod(n-1,16) #eq# @floor((j-1)/16):flow(m,n)) );
end
|
zan
|