2008年7月25日星期五

ZJU/ZOJ 1366 Cash Machine 解题报告

题目大意是给出目标金额和货币面值数量,每种货币面值以及该货币面值钱数。求能够组合出的和目标金额最接近(<=目标金额)的金额。

很明显的背包模型。只是注意要从大数额金额开始倒序枚举,否则会产生重复造成错误。有一个显而易见的优化是由于货币面值较小,在处理同一种货币面值时极易产生许多重复的枚举,因此可以开一个数组来记录处理同一种货币面值时已经处理过的金额,避免重复处理。这一优化的效果非常明显。

3003605 2008-07-25 00:01:06 Accepted 1366 FPC 00:00.03 600K IwfWcf@LZOI

4 条评论:

  1. toms outlet, http://www.tomsoutlet-stores.com/
    nike roshe, http://www.nikerosherunshoes.co.uk/
    prada handbags, http://www.pradahandbagsoutlet.co.uk/
    soccer jerseys, http://www.cheapsoccerjersey.net/
    michael kors outlet store, http://www.michaelkorsoutlet-store.us.com/
    true religion jeans, http://www.truereligionjeansoutlets.us.com/
    oakley sunglasses, http://www.oakleysunglasses-outlet.us.com/
    nike free 5, http://www.nikefree5.us/
    louis vuitton bags, http://www.louisvuittonbag.us.com/
    chanel handbags, http://www.chanelhandbags-outlet.co.uk/
    chanel handbags, http://www.chanelhandbags-outlet.us.com/
    louis vuitton handbags, http://www.louisvuittonhandbag.us/
    louis vuitton outlet, http://www.louisvuittonoutlet.in.net/
    ghd hair straighteners, http://www.ghdhairstraightenerssale.co.uk/
    nba jerseys, http://www.nbajerseys.us.com/
    coach outlet, http://www.coachoutletstores.com.co/
    true religion jeans, http://www.truereligionjeanscanada.com/
    swarovski crystal, http://www.swarovskicrystals.co.uk/
    mbt shoes, http://www.mbtshoesoutlet.us.com/
    michael kors handbags, http://www.michaelkorshandbags.in.net/
    chanel handbags, http://www.chanelhandbagsoutlet.in.net/
    michael kors outlet online, http://www.michaelkorsoutletonline.in.net/
    polo ralph lauren, http://www.poloralphlauren.us.org/
    the north face clearance, http://www.thenorthfaceclearances.us.com/
    jordan shoes, http://www.jordan-shoes.us.com/
    beats by dr dre, http://www.beatsbydrdre-headphones.us.com/
    the north face uk, http://www.thenorthfaces.org.uk/
    1003maoqiuyun

    回复删除

相关文章

 
Creative Commons License
除非另有声明,本网站采用知识共享署名-非商业性使用-相同方式共享 3.0 许可协议授权。