分析minf存储最小值,maxf存储最大值,每次最大值可能由上一个位置转化而来或者当前位置,再或者从最小值(此时为负数得情况)。class Solution {public: int maxProduct(vector<int>& nums) { vector