a*****2 发帖数: 96 | 1 典型的DP:
dp[i,j] = 1, if exists contiguous subseq up to ith element in seq summing up
to j
dp[i,j] = 0, otherwise
dp[i,0] = sep[i] == 0? 1: 0, i= 0,...,len(seq)-1
dp[0,j] = 0, j = 1,...,total
dp[i,j] = max(dp[i-1,j-seq[i]], seq[i] == j ? 1: 0)
i = 1,...,len(seq)-1
j = 1,...,total
return max(dp[i,total]) i = 0,...,len(seq)-1
O(n) |
|
a*****2 发帖数: 96 | 2 典型的DP:
dp[i,j] = 1, if exists contiguous subseq up to ith element in seq summing up
to j
dp[i,j] = 0, otherwise
dp[i,0] = sep[i] == 0? 1: 0, i= 0,...,len(seq)-1
dp[0,j] = 0, j = 1,...,total
dp[i,j] = max(dp[i-1,j-seq[i]], seq[i] == j ? 1: 0)
i = 1,...,len(seq)-1
j = 1,...,total
return max(dp[i,total]) i = 0,...,len(seq)-1
O(n) |
|
a***e 发帖数: 413 | 3 别人的答案,但不太清楚怎么能证明或者保证两个区间没有相交?我开始是想照CC150
上说的那样把所有可能的情况列出来找规律,但到后面越想就越糊涂了。多谢!
比如
1235
12305
10325
1032502
‘You may not engage in multiple transactions at the same time (ie, you must
sell the stock before you buy again).’
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 complete at most two
transactions.
Note:
You may not engage in multiple transactions at the same time (ie, you must
sell the stock befor... 阅读全帖 |
|
Y*********d 发帖数: 47 | 4 要在所有司机都开最短路线的前提下,使得单独开车的司机数量最少,对应于每个
input, 这个数量应该是固定的。
Dijkstra的算法除了算出0节点到i节点的最短路线距离外,还会记录在这个最短路线上
i节点的前一个节点是什么。我的理解是,既然有K个司机最终分别到达1节点至K节点,
那么从1节点到K节点中,剔除那些作为前节点出现过的,剩下的应该是只有1个司机访
问过的节点,也就是那个司机单独开过到达此类节点的路段,所以剩下的节点数量应该
是单独开车的司机数量。但是我的结果在大多数test case上运行都比标准答案大,不
明白这个算法错在哪里。
原题:
There are R bank locations and there are K drivers to transfer deposits to
those locations. R >= K+1 and all bank locations are numbered from 0 to R-1.
Location 0 is the branch where all drivers start at time 0 and take t... 阅读全帖 |
|
r*****s 发帖数: 1815 | 5 掐头去尾正好16个
很明显是暗示状压到一个short。
那么对于每个节点我们分配一个二进制位。
然后对于每个节点,neng一个数组出来,数组中的ith元素记录的是一条从源点到当前
点的最短路径长度,这条最短路径经过所有i的二进制表示中置1位的节点。
于是对于某一个节点k的某一个状态i,只要把i的二进制表示里面每一个置1的位分别置
0,然后去被置0位的对应节点找对应状态,就回归到了减一规模问题。最后取最小值。
。。有点绕,我发现我这话是说不明白。
anyway,总状态数是2^16*16,状态转移计算量是16。一共是2^24 ~= 1.6e8。这个量级
是可以算的范围。
时间卡得这么好,是个竞赛题么。。
: 这就是TSP变种吧。直接暴力搜 剪枝make sense吧?
|
|
r*****s 发帖数: 1815 | 6 找了个舍得写字的:
http://blog.csdn.net/area_52/article/details/45967269
这类问题好像以前面试很少考,这下发现新大陆了
: 掐头去尾正好16个
: 很明显是暗示状压到一个short。
: 那么对于每个节点我们分配一个二进制位。
: 然后对于每个节点,neng一个数组出来,数组中的ith元素记录的是一条从源点
到当前
: 点的最短路径长度,这条最短路径经过所有i的二进制表示中置1位的节点。
: 于是对于某一个节点k的某一个状态i,只要把i的二进制表示里面每一个置1的位
分别置
: 0,然后去被置0位的对应节点找对应状态,就回归到了减一规模问题。最后取最
小值。
: 。。有点绕,我发现我这话是说不明白。
: anyway,总状态数是2^16*16,状态转移计算量是16。一共是2^24 ~= 1.6e8。这
个量级
: 是可以算的范围。
|
|
x*******o 发帖数: 2581 | 7 我觉得UA里程票好像是可以改地点的。我原来订上海经过芝加哥到syr的票。后来看见
有从上海经ewr到ith的票。我就打电话让改票。然后就改了,原来是头等舱,改成商务
舱。还退了10000个点。当时没有收取费用。我的帐号也就是一般帐号,非高级会员。 |
|
x*******o 发帖数: 2581 | 8 我的理解是21天内的close in fee。如果是21天以前,改票是不要费用的。我曾经将上
海经芝加哥到syr 改成上海 经过ewr到ith。没有收我任何费用。(注明,我就是普通
会员,不是金,白金,银会员) |
|
p****x 发帖数: 4260 | 9 did you dial the right number?...I've never heard about this kind of issue w
ith chase. |
|
z**u 发帖数: 1025 | 10 十分感谢呀!
我不是在美东的纽约,在一个距离纽约大概4-5个小时车程的农村,有个自己的小机场。
我查的就是这个机场ith-san-hnl的,好像没有办法用stopover... |
|
C****A 发帖数: 102 | 11 YMMV, 邮件收到的, 不过term上写着 W“ith this offer you may earn up to $25
cash back” , 可能只能花500 |
|
a*****g 发帖数: 19398 | 12 CPS to make computer science a core subject
Touted as a trailblazing move, computer science is to be elevated from elect
ive to core curriculum in all public high schools and be offered at elementa
ries — the latter unprecedented elsewhere — the Chicago Public Schools ann
ounced Monday.
In the next three years, every high school will offer a foundational compute
r science course, and within five years, CPS plans to be the first urban dis
trict offering kindergarten through eighth-grade computer ... 阅读全帖 |
|
p*d 发帖数: 2091 | 13 http://www.pgeverydaysolutions.com/pgeds/pgeverydaysavings/index.jsp#
There is a new P&G Everyday Savings rebate that is available September 1st.
Buy $50.00 in ANY P&G products and get $110.00 coupon book.
Details:
Purchase $50.00 (before tax and coupon discounts) in ANY P&G products betwee
n 9/1/10 – 12/31/10.
Circle the P&G products and their corresponding prices on your original cash
register receipt(s).
Mail this completed rebate form with the original, dated sales receipt(s), w
ith item de |
|
m*r 发帖数: 37612 | 14 Redeem your 8x8 photo book.
Mobile | Web | Espa?ol
Your previous Best Buy? purchase qualified you for this special offer. Don'
t miss out on this great holiday gift idea. It's only valid until December 1
.
Shipping and handling fees and taxes not included. To redeem yours, follow t
he instructions below.
To redeem yours, follow the instructions:
1. Visit www.shutterfly.com/bestbuy8x8
2. Sign up for a Shutterfly account or, sign in if you're already a member.
3. Copy and paste your offer c... 阅读全帖 |
|
m*r 发帖数: 37612 | 15 Redeem your 8x8 photo book.
Mobile | Web | Espa?ol
Your previous Best Buy? purchase qualified you for this special offer. Don'
t miss out on this great holiday gift idea. It's only valid until December 1
.
Shipping and handling fees and taxes not included. To redeem yours, follow t
he instructions below.
To redeem yours, follow the instructions:
1. Visit www.shutterfly.com/bestbuy8x8
2. Sign up for a Shutterfly account or, sign in if you're already a member.
3. Copy and paste your offer c... 阅读全帖 |
|
m*r 发帖数: 37612 | 16 Redeem your 8x8 photo book.
Mobile | Web | Espa?ol
Your previous Best Buy? purchase qualified you for this special offer. Don'
t miss out on this great holiday gift idea. It's only valid until December 1
.
Shipping and handling fees and taxes not included. To redeem yours, follow t
he instructions below.
To redeem yours, follow the instructions:
1. Visit www.shutterfly.com/bestbuy8x8
2. Sign up for a Shutterfly account or, sign in if you're already a member.
3. Copy and paste your offer c... 阅读全帖 |
|
m*r 发帖数: 37612 | 17 Redeem your 8x8 photo book.
Mobile | Web | Espa?ol
Your previous Best Buy? purchase qualified you for this special offer. Don'
t miss out on this great holiday gift idea. It's only valid until December 1
.
Shipping and handling fees and taxes not included. To redeem yours, follow t
he instructions below.
To redeem yours, follow the instructions:
1. Visit www.shutterfly.com/bestbuy8x8
2. Sign up for a Shutterfly account or, sign in if you're already a member.
3. Copy and paste your offer c... 阅读全帖 |
|
m*r 发帖数: 37612 | 18 Redeem your photo book.
View: Mobile | Web | Espa?ol
Weekly Ad Store Locator Customer Service Forums Visit
Us:
PRODUCTS SERVICES SHOPS & DEALS GIFTS
A professionally bound Shutterfly photo book is a great way to preserve your
memories.
Shipping and handling fees and taxes not included. To redeem yours, follow t
he instructions below.
How to Get Your Free1 Photo Book:
1. Visit www.bestbuy.shutterfly.com/bestbuy8x8
2. Sign up for your Shutterfly ac... 阅读全帖 |
|
m*r 发帖数: 37612 | 19 Redeem your photo book.
View: Mobile | Web | Espa?ol
Weekly Ad Store Locator Customer Service Forums Visit
Us:
PRODUCTS SERVICES SHOPS & DEALS GIFTS
A professionally bound Shutterfly photo book is a great way to preserve your
memories.
Shipping and handling fees and taxes not included. To redeem yours, follow t
he instructions below.
How to Get Your Free1 Photo Book:
1. Visit www.bestbuy.shutterfly.com/bestbuy8x8
2. Sign up for your Shutterfly ac... 阅读全帖 |
|
p******a 发帖数: 803 | 20 昨天受到SYWR Offer(见下), 但加了$30的东西, 在之前最后一步check out 前也没
看到 我会拿到20,000 points(只写我会那到300 points)的Confirmation。
请问有谁有类似经历? 还是这20,000 points是不显示在这儿, 后来自动返倒账号?
Thanks.
Get $20 back in points (20,000 points) when you redeem $25 or more in points。
Offer to earn $20 in points is valid in-store or online on regular or sale
merchandise w ith a minimum 25 in points redemption. Purchase
requirement is before taxes and after discounts. |
|
C**********c 发帖数: 11 | 21 给父母征同行
航班:CO88
时间:4/28/2011
地点:PEK-EWR-ITH (北京经纽瓦克转机至ithaca)
联系方式:c************[email protected] |
|
m**z 发帖数: 787 | 22 时间:9/14/2011
地点:PVG-EWR-ITH,主要是找PVG-EWR的同行
联系方式:站内
谢谢 |
|
|
|
A*****s 发帖数: 13748 | 25 原来是这样:
Place any ordinary paper or notepad on the digital pad. Write on the paper w
ith the digital inking pen.
The digital pad digitally records anything you write in its built-in storage
device or an optional SD card in real time.
One page you write is stored as one digital page.
有点可怕啊。。。sigh |
|
c*********7 发帖数: 7607 | 26 A Kindle-DX showed up on my door step after about a month from its original
order date. Must have nookitis. I chose the Kindle-DX mainly because of the
screen size, native PDF support, and I was accustomed to the Kindle user
interface with my Kindle 1st generation. Plus the KDX is already available
on the market. I really liked the K-1 but wanted more functionality and a
few of its nuisances addressed.
You might consider the KDX an anachronism with the iThing is on its way in
60 or so days. In ... 阅读全帖 |
|
R********A 发帖数: 1759 | 27 Processor Intel Core i7-2620M Processor (2.7GHz, 4MB L3, 1333MHz FSB) USB
3.0
Operating system Genuine Window s 7 Home Premium 64
Operating system language Genuine Window s 7 Home Premium 64 English
Display type 12.5" Premium HD (1366x768) LED Backlit Display, Mobile
Broadband Ready, 2x2 Antenna
Total memory 4 GB DDR3 - 1333MHz (1 DIMM)
Keyboard Keyboard US English
Fingerprint Reader Fingerprint Reader
Camera 720p HD Camera
Hard drive 320 GB Hard Disk Drive, 7200rpm
Micro Hard Drive No Micro Sol... 阅读全帖 |
|
v****e 发帖数: 19471 | 28 finally!
Apple Making Verizon-Ready iPhone by Year End
By YUKARI IWATANI KANE And TING-I TSAI
Apple Inc. plans to begin mass producing a new iPhone by the end of 2010 tha
t would allow Verizon Wireless to sell the smartphone early next year, said
people briefed by Apple.
The new iPhone would be similar in design to the iPhone 4 currently sold by
AT&T Inc. but would be based on an alternative wireless technology called CD
MA used by Verizon, these people said. The phone, for which Qualcomm Inc. i... 阅读全帖 |
|
w********1 发帖数: 3492 | 29 好象大家得意思是要到422就正好了:
Apple’s Magic Share Price: $422
Article
Comments (4)
MARKETBEAT HOME PAGE ?
EmailPrintPermalink
+ More
Text
By Dave Kansas
Bloomberg
iRuler of all?
Yesterday, UBS joined the burgeoning Apple $400-a-share club, as my pal Matt
noted. The group is growing, with members including Goldman Sachs, Bank of
America and CLSA.
This raises an intriguing question: at what price would Apple surpass the
mighty muckers at ExxonMobil to become the most valuable public company in
the land?
It’s... 阅读全帖 |
|
M****r 发帖数: 359 | 30 每人卖掉大概35000股自己手上的,入账 $15million。
小散户们可以考虑接盘,果果要反弹。
ith Vice President of Legal and Government Affairs and General Counsel Bruce
Sewell selling 37,172 shares for $14,944,831
Vice President of Operations Jeffrey Williams selling 36,819 shares for $14,
792,265. |
|
s***m 发帖数: 6197 | 31 JNJ
Johnson & Johnson beats by $0.11, beats on revenue
Johnson & Johnson (NYSE:JNJ): Q2 EPS of $1.66 beats by $0.11.Revenue of $19.
49B (+9.0% Y/Y) beats by $550M.
GS
Goldman Sachs beats by $1.05, beats on revenue
Goldman Sachs (NYSE:GS): Q2 EPS of $4.10 beats by $1.05.Revenue of $9.13B (+
6.0% Y/Y) beats by $1.16B.
JPM
JPMorgan +1.8% after blowing past estimates
Q2 earnings of $6B or $1.46 per share includes $500M or $0.13 per share in a
fter-tax legal expense. Estimates were for earnings of $1... 阅读全帖 |
|
t******n 发帖数: 6242 | 32 航空公司没主动收的话交给gate agent,
否则在飞机上交给空姐
如果你是做飞机走的,保留好登机牌,做如下补救措施:(https://help.cbp.gov/app
/answers/detail/a_id/752)
If you failed to turn in your I-94 Departure Record, please send it, along w
ith any documentation that proves you left the United States to:
DHS - CBP SBU
1084 South Laurel Road
London, KY 40744 |
|
a**n 发帖数: 2431 | 33 Texas Sens. John Cornyn and Kay Bailey Hutchison joined with fellow Republic
ans to block Senate passage of the DREAM Act today, and both defend their no
-votes.
Cornyn said Senate Majority Leader Harry Reid "continues to play politics" w
ith the proposal, which Texas' senators and many other Republican opponents
have supported in the past.
Cornyn says border security and other aspects of immigration policy must com
e first.
"I am sympathetic to the plight of children who have no moral culpabili... 阅读全帖 |
|
A**********e 发帖数: 3102 | 34 Palin 嘲笑的不是这中间的猫腻,而是这个项目本身:
“sometimes these dollars go to projects that have little or nothing to do w
ith the public good. Things like fruit fly research in Paris, France. I kid
you not.”
-- Palin
这足以说明她对这个项目一无所知而且煽动同样一无所知的普通百姓。
不能 |
|
W***n 发帖数: 11530 | 35 Did it yesterday. Miserable Friday evening, beautiful Saturday.
4.5 hr up Ammonoosuc and 3.5 down Jewel trails(w ith frequent stops for
photo sessions).
It's like a mini-carnival up at the top. Constant train rides brought tons
of people and parking lot full of cars.
Weather is so warm tha I only wear one long sleeve shirt.
Hahaha |
|
e******r 发帖数: 549 | 36 版上有人说住市区里都是人傻钱多,市区里什么都不如郊区。
转自Boston Global的文章,自己长眼看看吧。
http://www.bostonglobe.com/business/2015/03/01/boston-historic-
A new age for an old town
The Boston Globe
Share Tweet 95
Dozens of buildings are redefining the skyline and reshaping entire
neighborhoods with offices and luxury dwellings.
By Casey Ross
GLOBE STAFF MARCH 01, 2015
There have been three great ages of development in modern Boston. The first
began after the Back Bay was filled in the late 19th century, a radical
change that tr... 阅读全帖 |
|
a*****g 发帖数: 19398 | 37 CPS to make computer science a core subject
Touted as a trailblazing move, computer science is to be elevated from elect
ive to core curriculum in all public high schools and be offered at elementa
ries — the latter unprecedented elsewhere — the Chicago Public Schools ann
ounced Monday.
In the next three years, every high school will offer a foundational compute
r science course, and within five years, CPS plans to be the first urban dis
trict offering kindergarten through eighth-grade computer ... 阅读全帖 |
|
n********e 发帖数: 1789 | 38 http://www.isucssfa.com/
记得用IE打开,firefox不行
上面说了如何加入CSSFA的email list:
The CSSFA mailing lists keep you updated with CSSFA announcements and inform
ative messages from other local organizations and individuals. The CSSFA str
ongly encourages you to subscribe the mailing lists.
To subscribe, just mail to Administrator y******[email protected] a blank mail w
ith subject "sign in". You will be registered in. http://www.stuorg.iastate.
edu/cssfa/ |
|
n********e 发帖数: 1789 | 39 不靠近学校,可能没什么人能看到你这个帖子,你干脆去加入ISU的maillist碰碰运气
吧。
http://www.isucssfa.com/
记得用IE打开,firefox不行
上面说了如何加入CSSFA的email list:
The CSSFA mailing lists keep you updated with CSSFA announcements and inform
ative messages from other local organizations and individuals. The CSSFA str
ongly encourages you to subscribe the mailing lists.
To subscribe, just mail to Administrator y******[email protected] a blank mail w
ith subject "sign in". You will be registered in. http://www.stuorg.iastate.
edu/cssfa/ |
|
N**D 发帖数: 10322 | 40 http://mobile.latimes.com/wap/news/text.jsp?sid=294&nid=31351795&cid=16677&
scid=1854&ith=4&title=Top+Stories
Reporting from Sacramento-- California voters could be presented with a tou
gh choice by summer under a proposal that Gov.-elect Jerry Brown is consider
ing: Approve new taxes or other revenue in a special election, or live with
far fewer government services.
...
... |
|
|
|
s***3 发帖数: 742 | 43 the first card:1/1024*k *(1024*k)=1
the second card:[1-(k-1)/(k*1024-1)]
the third card::[1-2(k-1)/(k*1024-2)]
.....
the ith card::[1-(i-1)*(k-1)/(k*1024-i+1)]
...
The 1000th card: :[1-999*(k-1)/(k*1024-999)]
这些几率倒数相加=3760.1--》3761 (45)
3634.6 --》3635(15)
闲人不少啊
数次,平均下来要 |
|
s******x 发帖数: 15232 | 44 谁说又不检查又不登记的的?
megabus是在美加之间运行的,即使你以为nyc-ith是美国国内路线,你怎么知道这辆车
不继续前往加拿大?要是过边境的时候有无主/嫌疑行李,整车人都会被耽误。
http://us.megabus.com/luggage-allowance.aspx
Luggage is subject to inspection when crossing international borders. You
will be asked to declare any items subject to duty upon crossing the border.
Passengers must claim their luggage at the border crossing point for
clearance through customs before being allowed to proceed across the border.
No luggage is allowed across the border unless claimed by a pa... 阅读全帖 |
|
m******r 发帖数: 2725 | 45 个人观点而已。 第一,坐飞机能直接坐到ith, 为什么要坐bus?第二,就算你是坐飞
机也不可能带5个包。 帮人很好,可是要评估当时的情况,人不可貌相。
还有一点就是,规定就是规定,你既然break了规定,那你就要承担后果。 举个例子,
警察看到一个老婆婆不给车后座的儿童绑保险带,警察看她又老又穷,就放过了她,可
是她的两个儿童却在一次车祸中死掉了。 有时候,好心并不是办好事,特别是有人违
反了规定这种事不能姑息。 很明显,你坐飞机都只能带2个包了,你坐bus能带5个包?
很多人就是想浑水摸鱼,想你不能为了多几个包就不让我上车吧,这种人就该给他个
教训。
不过话说回来,我在当时我不会想那么多的,举手之劳就帮了。
来不知道规矩正常的很。再说身正怕个毛,说清楚就好了。 |
|
e******o 发帖数: 757 | 46 let x(i) denote the number of coconuts get when the last ith people woke up.
then
4x(i)=5x(i-1)+1
so
4[x(i)+1]=5[x(i-1)+1]
Then:x(i)+1=5/4*[x(i-1)+1]
Then x(5)+1=(5/4)^3[x2+1]
Then x2=63
which means, when the forth people wake up. each person will get 63 coconut
So when the first person woke up, each person will get (5/4)^3*(63+1)-1=124
coconuts.And the total number is 124*5+1=621 |
|
j******3 发帖数: 18319 | 47 your coworker may talk too much, but that might be her job; she speaks with
high piched voice, maybe she was born that way; she laughs loud, maybe she
is sincerely happy. So you should try to understand. And even if she just
acts like a "b*ith" as your discribed, you still need to live with it,
because: first of all, it's not like she is doing something really bad to
you, and second of all, you are not in an isolated world, you just have to
deal with all kinds of sh*t.
There is no who started fi... 阅读全帖 |
|
o*o 发帖数: 5155 | 48 "Perhaps a few hundred million people might own iThings, but just about
everyone on the planet either directly interacts with, or is at least
affected by, applications written in C and/or running on UNIX every
single day of their lives, even if they might not realise it.
Steve Jobs' passing went straight onto the breaking news tickers of the
mainstream media, but so far dmr does not even appear to have a single
byline - there's something telling about what's wrong with this world,
right there." |
|
W***n 发帖数: 11530 | 49 4.5 hr up Ammonoosuc and 3.5 down Jewel trails(w ith frequent stops for
photo sessions).
It's like a mini-carnival up at the top. Constant train rides brought tons
of people and parking lot full of cars.
Weather was so warm tha I only wore one long sleeve shirt.
Hahaha |
|
|