摘要: 有 N 件物品和一个容量是 V 的背包,背包能承受的最大重量是 M。 每件物品只能用一次。体积是 vi,重量是 mi,价值是 wi。 求解将哪些物品装入背包,可使物品总体积不超过背包容量,总重量不超过背包可承受的最大重量,且价值总和最大。输出最大价值。 输入格式 第一行两个整数,N,V,M,用空格隔 阅读全文
posted @ 2020-10-26 23:19 莳曳 阅读(92) 评论(0) 推荐(0)
摘要: https://www.acwing.com/problem/content/7/ 有 NN 种物品和一个容量是 V 的背包。 物品一共有三类: 第一类物品只能用1次(01背包); 第二类物品可以用无限次(完全背包); 第三类物品最多只能用 si 次(多重背包); 每种体积是 vi,价值是 wi。 阅读全文
posted @ 2020-10-26 19:36 莳曳 阅读(124) 评论(0) 推荐(0)
摘要: Carneginon was a chic bard. But when he was young, he was frivolous and had joined many gangs. Recently, Caneginon was to be crowned, because the king 阅读全文
posted @ 2020-10-26 12:36 莳曳 阅读(63) 评论(0) 推荐(0)
摘要: Cyclic Nacklace Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 25249 Accepted Submission(s): 101 阅读全文
posted @ 2020-10-26 12:26 莳曳 阅读(80) 评论(0) 推荐(0)
摘要: A. Crazy Computer time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output ZS the Coder is coding 阅读全文
posted @ 2020-10-26 11:39 莳曳 阅读(162) 评论(0) 推荐(0)
摘要: Alice has a cute cat. To keep her cat fit, Alice wants to design an exercising walk for her cat! Initially, Alice's cat is located in a cell (x,y)(x,y 阅读全文
posted @ 2020-10-26 11:34 莳曳 阅读(97) 评论(0) 推荐(0)