标签:solution rgb nbsp i++ ++ amp return leetcode tor
//C++ class Solution { public: vector<int> finalPrices(vector<int>& prices) { vector<int> arr; int i,j; for(i=0; i<prices.size()-1; i++) { for(j=i+1; j<prices.size(); j++) { if(prices[i]>=prices[j]){ prices[i]-=prices[j]; break; } } } return prices; } };
标签:solution rgb nbsp i++ ++ amp return leetcode tor
原文地址:https://www.cnblogs.com/ganxiang/p/13833193.html