摘要:
感觉比I还水能买卖多次...问最大收益...class Solution {public: int maxProfit(vector &prices) { // Start typing your C/C++ solution below // DO NOT write int main() function int ans = 0; for(int i = 1 ; i 0) ans += prices[i] - prices[i-1]; return ans; }}; 阅读全文
posted @ 2013-08-22 20:48 1957 阅读(142) 评论(0) 推荐(0)
浙公网安备 33010602011771号