avatar
PD 提前了20几年# EB23 - 劳工卡
r*n
1
解决这个问题的同学说一声。
我用ubuntu, gcc 4.6.3
avatar
r*g
2
I-140 上给的PD早了二十多年 才发现 实际PD应该也到了 USCIS的错 该怎么办?现在
提交I-485 还是等USCIS
改过来之后再交。 有类似的情况吗? 怎么处理的?
avatar
a*e
3
请问能说一下是哪道题么?最好能把code贴出来

【在 r*******n 的大作中提到】
: 解决这个问题的同学说一声。
: 我用ubuntu, gcc 4.6.3

avatar
v*2
4
没试过将错就错直接提交485?
avatar
r*n
5
Best Time to Buy and Sell Stock III

int maxProfit(vector &prices) {
int sum =0;
int max_profit;
int times=2;
while(prices.size()>1 && times-->0){
int buy=0;
int sell=0;
max_profit=0;
for(int i=1; iif(prices[buy]>prices[i]){
buy=i;
}
int cur_diff = prices[i]-prices[buy];
if(cur_diff>max_profit){
max_profit=cur_diff;
sell=i;
}
}
sum += max_profit;

prices.erase(prices.begin()+buy);
prices.erase(prices.begin()+sell-1);

}
return sum;
}

【在 a******e 的大作中提到】
: 请问能说一下是哪道题么?最好能把code贴出来
avatar
r*g
6
刚发现 但实际PD应该也到了 不知该怎么办。请指点

【在 v*********2 的大作中提到】
: 没试过将错就错直接提交485?
avatar
a*e
7
没看懂 -_-!
lz能大概讲讲思路么~
avatar
l*n
8
到了就提交吧。然后再改PD。不然错过的这次交485 多不划算
avatar
r*n
9
运行 Best Time to Buy and Sell Stock I 两次
第一次运行完把 把相应的最小值和最大值从prices里删掉,
再进行第二次。
我不确定这么做对,但是【1,2,4】这个case没有通过说run time error
我在自己的机子上能出结果,结果是3

【在 a******e 的大作中提到】
: 没看懂 -_-!
: lz能大概讲讲思路么~

avatar
p*i
10
这么好的事儿怎么没落到我头上?

【在 r********g 的大作中提到】
: I-140 上给的PD早了二十多年 才发现 实际PD应该也到了 USCIS的错 该怎么办?现在
: 提交I-485 还是等USCIS
: 改过来之后再交。 有类似的情况吗? 怎么处理的?

avatar
a*e
11
You may not engage in multiple transactions at the same time (ie, you must
sell the stock before you buy again)
我不确定能不能在同一天买卖
avatar
a*g
12
银行错打钱到你账户里,如果你花了,算是犯法好像,不知道这个是怎么算
avatar
r*n
13
错了的话,应该给wrong answer而不是run time error.

【在 a******e 的大作中提到】
: You may not engage in multiple transactions at the same time (ie, you must
: sell the stock before you buy again)
: 我不确定能不能在同一天买卖

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。