Simply judge from price, we can get the conclusion that XPROG-M V5.5.5 is obviously much stronger than version V5.50.Here comes withnewest V5.5.5 X-PR...
分类:
其他好文 时间:
2015-03-16 19:20:15
阅读次数:
121
这道题使用贪心法,为了得到最多的javabean,需要从价格最便宜的开始买,直到所有的food都用完。#include #include #include struct sg{ double javabean; double foodcat; double price;};stru...
分类:
其他好文 时间:
2015-03-16 19:02:08
阅读次数:
143
Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a...
分类:
其他好文 时间:
2015-03-16 00:54:36
阅读次数:
160
1.题目Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the stock),...
分类:
其他好文 时间:
2015-03-15 16:56:53
阅读次数:
122
【描述】同学们一起看了小品《不差钱》,LX神突发奇想,想刁难一下十八居士,他让十八居士模拟一下点菜的过程。【输入格式】输入第一行为一个数price,表示价钱大于price的菜赵本山都不要。以下几行表示点菜的过程,每行两个整数p,np=1 表示在菜谱中添加一个价格为n的菜,这是第i个1号命令,这个菜的...
分类:
其他好文 时间:
2015-03-15 16:41:57
阅读次数:
191
【项目4 - 图书馆的书】
编写一个Book类,包含name(书名)、writer(著者)、public_name(出版社)、price(价格)、number(数量)、NO(书号)等数据成员。定义成员函数setBook,用来为书籍的数据成员赋值,定义成员函数borrow和restore,分别办理借出和还回(借、还书时,暂时只完成数量的增1减1,这里的书仍是一种书的概念,随着课程进展,我们继续...
分类:
其他好文 时间:
2015-03-15 13:57:17
阅读次数:
141
Best Time to Buy and Sell Stock IVSay you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the ...
分类:
其他好文 时间:
2015-03-15 12:05:30
阅读次数:
115
费用流
双向边 (u,v,f,c) 拆分成4条边 (u,v,f,c) (v,u,0,-c) (v,u,f,c) (u,v,0,-c)
建立城市->汇点(u,T,inf,-price)
#include
#include
#include
#include
#include
#define V 800+10
#define E 8000+10
#define inf 9999...
分类:
其他好文 时间:
2015-03-15 09:35:50
阅读次数:
123
把下面的数据{ "name_a":{"price":100}, "name_b":{"price":400}, "name_c":{"price":200}, "name_d":{"price":300}}按照价格升序排列,例如:名称:name_a价格100 名称:n...
分类:
其他好文 时间:
2015-03-14 13:52:50
阅读次数:
104
Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a...
分类:
编程语言 时间:
2015-03-12 20:45:30
阅读次数:
144