HBC16632money题解 (whitecloud)

一天到晚红烧的鱼 算法基础篇 42 0
想要成为编程高手?那就来试试全网最全C++题库,让您在练习中快速成长。
White Cloud has built n stores numbered from 1 to n.White Rabbit wants to visit these stores in the order from 1 to n.The store numbered i has a price a[i] representing that White Rabbit can spend a[i] dollars to buy a product or sell a product to get a[i] dollars when it is in the i-th store.The product is too heavy so that White Rabbit can only take one product at the same time.White Rabbit wants to know the maximum profit after visiting all stores.Also, White Rabbit wants to know the minimum number of transactions while geting the maximum profit.Notice that White Rabbit has infinite money initially.

White Cloud has built n stores numbered from 1 to n. White Rabbit wants to visit these stores in the order from 1 to n. The store numbered i has a price a[i] representing that White Rabbit can spend a[i] dollars to buy a product or sell a product to get a[i] dollars when it is in the i-th store. The product is too heavy so that White Rabbit can only take one product at the same time. White Rabbit wants to know the maximum profit after visiting all stores. Also, White Rabbit wants to know the minimum number of transactions while geting the maximum profit. Notice that White Rabbit has infinite money initially.

HBC16632money题解
(whitecloud)-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
想要在职场中立于不败之地?那就来试试全网最全C++题库,让您在练习中快速提升技能。

标签: HBC16632money题解