码迷,mamicode.com
首页 >  
搜索关键字:买卖    ( 570个结果
删除数组中的重复元素 买卖股票的最高利润 爬楼梯
第一题: #include "stdafx.h" #include<iostream> using namespace std; int main() { int shu[10]; int i; for (i = 0; i < 10; i++) { cin >> shu[i]; } int j,h, ...
分类:编程语言   时间:2017-03-09 18:22:51    阅读次数:135
买卖股票的最佳时机
class Solution {public: /** * @param prices: Given an integer array * @return: Maximum profit */ int maxProfit(vector<int> &prices) { // write your co ...
分类:其他好文   时间:2017-03-09 15:30:06    阅读次数:122
买卖股票的最佳时机
package Maxmoney; public class maxmoney { public static void main(String[] args) { int array[]={8,6,5,4,5}; System.out.println(maxmoney(array)); }publ ...
分类:其他好文   时间:2017-03-09 13:28:39    阅读次数:137
买卖股票的最佳时机
class Solution {public: /** * @param prices: Given an integer array * @return: Maximum profit */ int maxProfit(vector<int> &prices) { // write your co ...
分类:其他好文   时间:2017-03-09 00:44:13    阅读次数:89
买卖股票的最佳时机
public class Solution { /** * @param prices: Given an integer array * @return: Maximum profit */ public int maxProfit(int[] prices) { // write your co ...
分类:其他好文   时间:2017-03-09 00:28:53    阅读次数:116
买卖股票的最佳时机 - C++
class Solution {public: /** * @param prices: Given an integer array * @return: Maximum profit */ int maxProfit(vector<int> &prices) { // write your co ...
分类:编程语言   时间:2017-03-08 23:10:34    阅读次数:183
买卖股票的最佳时机
class Solution { public: /** * @param prices: Given an integer array * @return: Maximum profit */ int maxProfit(vector &prices) { // write your code h... ...
分类:其他好文   时间:2017-03-08 23:02:18    阅读次数:142
买卖股票的最佳时机
class Solution { public: /** * @param prices: Given an integer array * @return: Maximum profit */ int maxProfit(vector<int> &price) { int re = 0; if(p ...
分类:其他好文   时间:2017-03-08 22:59:21    阅读次数:187
买卖股票的最佳时机
if(prices.size()<2) return a; int lowest = prices[0]; for(int n=1;n<prices.size();n++) { int cur = prices[n]; a = max(a,a-lowest); lowest = min(lowest ...
分类:其他好文   时间:2017-03-08 21:34:34    阅读次数:130
570条   上一页 1 ... 33 34 35 36 37 ... 57 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!