• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






William_xh

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

2017年8月15日

杭电1059 Dividing(分石头) 转化为多重背包问题
摘要: Problem Description Marsha and Bill own a collection of marbles. They want to split the collection among themselves so that both receive an equal shar 阅读全文
posted @ 2017-08-15 11:38 William_xh 阅读(169) 评论(0) 推荐(0)
 
背包问题的模版
摘要: int c[105],w[105],num[105]; //分别表示 花费 价值(重量) 和数量 int dp[105]; //表示 动态数组int v,V,V1; // V 表示总的 体积 也就是空间 因为是全局变量 所以下次使用只能用V 而不能用其它 void ZeroOnePack(int c 阅读全文
posted @ 2017-08-15 11:28 William_xh 阅读(191) 评论(0) 推荐(0)