zoj 3658(坑坑坑!)

本文描述了小女生Alice在Gensokyo的五个山中采摘蘑菇的故事。每个山采摘的蘑菇重量不同,她必须在回家途中经过三个仙女的检查,给出总重量为整公斤的三包蘑菇,否则将失去所有蘑菇。魔法师Marisa还会偷走她一部分蘑菇,直到她的蘑菇总量不超过1公斤。问题在于,Alice如何最大化带回的蘑菇数量,且结果需要对20121014取模。
摘要由CSDN通过智能技术生成
The Little Girl who Picks Mushrooms

Time Limit: 2 Seconds Memory Limit: 32768 KB

It's yet another festival season in Gensokyo. Little girl Alice planned to pick mushrooms in five mountains. She brought five bags with her and used different bags to collect mushrooms from different mountains. Each bag has a capacity of 2012 grams. Alice has finished picking mushrooms in 0 ≤ n ≤ 5 mountains. In the the i-th mountain, she picked 0 ≤ wi ≤ 2012 grams of mushrooms. Now she is moving forward to the remained mountains. After finishing picking mushrooms in all the five mountains, she want to bring as much mushrooms as possible home to cook a delicious soup.

Alice lives in the forest of magic. At the entry of the forest of magic, lives three mischievous fairies, Sunny, Lu

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值