码迷,mamicode.com
首页 >  
搜索关键字:buy tickets    ( 1402个结果
leetcode 122 . Best Time to Buy and Sell Stock II
class Solution { public: int maxProfit(vector& prices) { int local=0,golal = 0; for (int i=0; i<prices.size()-1; i++) { local = ma... ...
分类:其他好文   时间:2017-10-12 01:02:17    阅读次数:110
hdu 2828 Buy Tickets
Buy Tickets Problem Description Railway tickets were difficult to buy around the Lunar New Year in China, so we must get up early and join a long queu ...
分类:其他好文   时间:2017-10-06 17:33:57    阅读次数:168
HDU1260 Tickets —— DP
题目链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=1260 Tickets Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Tota ...
分类:其他好文   时间:2017-10-03 22:18:32    阅读次数:164
121. Best Time to Buy and Sell Stock【easy】
121. Best Time to Buy and Sell Stock【easy】 Say you have an array for which the ith element is the price of a given stock on day i. If you were only pe ...
分类:其他好文   时间:2017-10-03 16:55:06    阅读次数:202
PAT1092:To Buy or Not to Buy
1092. To Buy or Not to Buy (20) 时间限制 100 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue 时间限制 100 ms 时间限制 100 ms 内存限制 65536 kB 内存限制 65536 k ...
分类:其他好文   时间:2017-10-03 00:50:11    阅读次数:199
poj 2828 buy tickets
题目大意: 一些人要排队,开始时队为空 给定一些数对 表示这些人的状态 这些人按数对的顺序准备入队 其中每个数对第一个数a表示这个人来的时候站在当前队伍中a个人的后面,a=0时站在队伍最前面 第二个数b表示这个人的编号 求最终队伍的顺序,即依次输出他们的编号 思路: 首先可知最后一个人进入时 数对的 ...
分类:其他好文   时间:2017-10-02 13:27:13    阅读次数:163
123. Best Time to Buy and Sell Stock III
压缩 ...
分类:其他好文   时间:2017-10-02 09:32:29    阅读次数:213
【CodeForces】866D. Buy Low Sell High
【题意】已知n天股价,每天可以买入一股或卖出一股或不作为,最后必须持0股,求最大收益。 【算法】堆 贪心? 【题解】 不作为思想:【不作为=买入再卖出】 根据不作为思想,可以推出中转站思想。 中转站思想:【买卖可以借助中转站,差值累加】 做法:从左到右,每次将两个-v加入堆,然后取大堆顶出来组成买卖 ...
分类:其他好文   时间:2017-10-01 13:12:55    阅读次数:212
122. Best Time to Buy and Sell Stock II
Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may comple ...
分类:其他好文   时间:2017-09-29 13:19:50    阅读次数:140
Use the Coupon code "4golds" to buy cheap RS Mobile Gold & runescape gold on buyrunescape4golds
Basedonourunderstanding,heremaybeofficiallysaid,2017OSRSDeadman winterseasonbeganat5pmhours.UTConSept23rd.Thismeansthatyoucould participateinRuneFest2017inacoupleofhours.Ifyouareanewcomerto OldSchoolRunescapeGoldpassingawaypatterns,youneedmoreinfo.Inorderto..
分类:其他好文   时间:2017-09-25 11:52:49    阅读次数:116
1402条   上一页 1 ... 31 32 33 34 35 ... 141 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!