poj2940 Wine Trading in Gergovia-----想法题

本文介绍了Gergovia城市的葡萄酒交易情况,每个居民都是葡萄酒商人,需求和供应总是平衡的。每天居民决定买卖的葡萄酒数量,目标是通过最优化交易路径来最小化整体运输工作。问题简化为沿直线排列的房屋,每户有特定的葡萄酒买卖需求,将一瓶酒运到隔壁房屋会产生一单位工作量。输入包含多个测试用例,每个用例给出居民数和他们的买卖需求,输出是满足所有需求的最小工作量。
摘要由CSDN通过智能技术生成
Wine Trading in Gergovia
Time Limit: 1000MS   Memory Limit: 65536K
Total Submissions: 2770   Accepted: 1248

Description

As you may know from the comic “Asterix and the Chieftain’s Shield”, Gergovia consists of one street, and every inhabitant of the city is a wine salesman. You wonder how this economy works? Simple enough: everyone buys wine from other inhabitants of the city. Every day each inhabitant decides how much wine he wants to buy or sell. Interestingly, demand and supply is always the same, so that each inhabitant gets what he wants.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值