← 回題庫

卷別

資料結構與演算法

選擇

國立臺灣大學 2025 · 考試 · 第 6 題

考科演算法

(5 points) Consider a knapsack with capacity 17 and five types of items, each with its size and value listed below. All items are available in unlimited quantities and each item can be selected more than once. The goal is to maximize the total value of the items placed in the knapsack. If the maximum value of the knapsack is 10a+b10a + b where aa and bb are integers in {0,1,2,…,9}\{0, 1, 2, \dots, 9\}, what is the value of a+ba + b?

itemABCDE
size34789
value45101112
  • (A)
    3
  • (B)
    4
  • (C)
    5
  • (D)
    6
  • (E)
    7

標準解析

AI 已複查