单选题

阅读程序(2)

第6-11题,组合题

若将代码中的 min(dp[i-1],dp[i-2])+cost[i-1]修改为 dp[i-1]+cost[i-2],输入 cost 数组为{5,10,15}时,程序的输出为( )

A

"10"

B

"15"

C

"20"

D

"25"

赣ICP备20007335号-2