l**********3 发帖数: 161 | 1 第一题可不可以这么做,O(N)的方法,请大虾指教。
#include
using namespace std;
typedef struct best_days {
int buy;
int sell;
} best_days_t;
best_days_t get_best_days(double* prices, int days){
best_days_t best;
best.buy = best.sell = -1;
int minday = 0;
double dmax = 0.0f;
double minprice = prices[0];
for (int i=1; i
if (prices[i] - minprice > dmax){
dmax = prices[i] - minprice;
best.sell = i;
best.buy = minda... 阅读全帖 |
|
j*****u 发帖数: 1133 | 2 1. 我一开始想成根据history的stock price来做predict了,想了半天。。。
其实是这个题的变种
int array A里找两个position i和j,要求A[j]和A[i]的差maximum,同时i
static void BestDay(int[] stockPrices, out int buyDate, out int sellDate)
{
buyDate = sellDate = 0;
int maxDiff = 0, minPrice = stockPrices[0], minPriceDate = 0;
for (int i = 1; i < stockPrices.Length; ++i)
{
int price = stockPrices[i];
int diff = price - minPrice;
if (diff > maxDiff)
{
buyDate = minPriceDate;
s... 阅读全帖 |
|
w*******y 发帖数: 60932 | 3 You get 20% off and Free Ship on Womens Clothing (does NOT work on clearance
) at Target today.
Also code TGTTUY28 and TGT75HFN for additional discounts ***YOU NEED TO BE
LOGGED IN FOR IT TO APPLY*** Asylum!! (coupon may die at any time)
This pair of $15 jeans:
http://www.target.com/p/Mossimo-Supply-Co-Juniors-Bootcut-Jean-
takes off $10 on any other womens clothing item. I would probably
recommend sizing up, as junior fit is not as hippy as womens fit.
This pair of $15 jeans:
http://www.targ... 阅读全帖 |
|
w*******y 发帖数: 60932 | 4 Target has
Elder Scrolls V: Skyrim XBox or PS3:
http://www.target.com/s?searchTerm=Elder Scrolls V:Skyrim&category=0|All|matchallany|all categories#navigation=true&viewType=medium&sortBy=relevance&minPrice=from&maxPrice=to&isleaf=false&parentCategoryId=0&facetedValue=/-/N-5tdv0&RatingFacet=0
#navigation=true&viewType=medium&sortBy=relevance&minPrice=from&maxPrice=to&
isleaf=false&parentCategoryId=0&facetedValue=/-/N-5tdv0&RatingFacet=0" rel="
nofollow" target="_blank" onclick="_gaq.push(['_track... 阅读全帖 |
|
s**********e 发帖数: 97 | 5 根据学校要求和房子的要求,你可以试试http://schoolandhousing.com/
比如你列的第一个option是小学,中学不错,高中一般,那你可以把找房子的条件设成
esAPI>900, msAPI>850, hsAPI>700.再设定房子的条件,然后查询(一开始为了全面,
你可以设定在Santa Clara county查询)。下面是结果。(从地图里比较容易看出
Cambrian有很多房子满足要求,同时Sunnyvale,Evergreen, Milpitas也都有一些。)
你也可以根据自己的要求调整条件,限定更细的区域。
http://schoolandhousing.com/findhomes.jsp?
esApi=900&msApi=850&hsApi=700&snhScore=1&minPrice=500000&maxPrice=700000
&minBed=3&bath=2&sqft=1250&sort=postdatenew&area=county&county=Santa+Cla
ra
对于你列的第二个option,只找高中好的,那你可以把高中的API设成8... 阅读全帖 |
|
w*******y 发帖数: 60932 | 6 Target.com has 4 different series of 16 piece Squinkies:
http://www.target.com/c/clearance-toys/-/N-5tg3d#navigation=tru
#navigation=true&viewType=medium&sortBy=bestselling&minPrice=from&maxPrice=
to&isleaf=true&navigationPath=5tg3d&parentCategoryId=9611722&facetedValue=/-
/N-5tg3dZ5qhir&RatingFacet=0" rel="nofollow" target="_blank" onclick="_gaq.
push(['_trackEvent', 'thread', 'click', '3818770 - squinkies-2.62-w-fs-w-
target-redcard']);">4 different series of 16 piece Squinkies [4 different
se... 阅读全帖 |
|
|
|
|
|
c*********7 发帖数: 7607 | 11
http://store.nokia.com/webapp/wcs/stores/servlet/productdetailb
minPrice=-1&langId=-1&productId=10000605&maxPrice=-
1&orderBy=PriceH&catalogId=10101&deviceSelected=Y&prodPage=true&
familyPageURL=
familyPage&beginIndex=0&field1=1&storeId=10500&pageSize=8&productPageURL=
produ
ctdetailbymodel&PhByMod=Y&ddkey=http:GOSPOnlineStoreHomeDisplay&cid=estore-
fw-
afc-na-con-na-linkshare-us-19-AffiliateDeepLink&siteID=mPPYFpj1vek-
MpaY44i6XUtrmI46nvD58Q
in stock again |
|
|
|
m********g 发帖数: 692 | 14 咱俩可能说岔劈了, 感觉象小马过河的故事.
你给的地方比German Town还靠北乐, 到bethesda都30miles+乐,
在硅谷要舍得住这么远, 也有便宜房子(能不能搞到这么大不知道). 而且看了一下小学
, 算不上好校区吧.
查下面的link, 左下角, potomac river 附近(potomac 和 bethesda)你随便点个 single house, 看看年头和价格, 看你手气是不是比俺好.
..
http://www.homesdatabase.com/mapsearch.ds?where=20854&what=&propertyType=propertytype..%3D..^Residential%24..%26..Homes+for+Sale&numBeds=&numBaths=&lotSizes=&minPrice=&maxPrice=&mustHaves=&homeTypes=&homeStyles=&homeAges=&heatingTypes=&coolingTypes=&newSe |
|
|
|
|
w*******y 发帖数: 60932 | 18 And many more...
Red card get 5% cash back and free shipping otherwise spend $50 to get free
shipping.
Link:
http://www.target.com/sb/entertainment-movies/-/N-5xsx0#navigat
#navigation=true&facetedValue=/-/N-5xsx0Z5zk8z&viewType=medium&sortBy=
PriceLow&minPrice=from&maxPrice=to&isleaf=false&navigationPath=5xsx0&
parentCategoryId=9975218&facetedValue=/-/N-5xsx0Z5zk8z" rel="nofollow"
target="_blank" onclick="_gaq.push(['_trackEvent', 'thread', 'click', '
4056532 - 5-blurays-kenny-chesney-summer-in... 阅读全帖 |
|