Redian新闻
>
EB3 2016年十二月第3绿 TSC PD 10/2012
avatar
EB3 2016年十二月第3绿 TSC PD 10/2012# EB23 - 劳工卡
l*6
1
问一道题~
2D knapsack
class rect{
public:
int width;
int height;
int area;
};
input: vector source , int canvasWidth , int canvasHeight
no overlap allowed , no rotate allowed, each rect int source and be used as
many times as
possible (area = width * height , setting area as another val will be a
similar problem)
compute the max coverage of canvas using the rects int the source
a dp solution
maxCover[row][col] = max (maxCover[subRow][col] + maxCover[row - subRow - 1]
[col]) subRow in [0 , (row - 1)/2]
maxCover[row][col] = max (maxCover[row][subCol] + maxCover[row][col - subCol
- 1]) subCol in [0 , (col - 1)/2]
maxCover
int coverage(const vector &source , int canvasWidth , int canvasHeight)
{
vector> maxCover (canvasHeight , vector(canvasWidth , 0)
);
for(int row = 0 ; row < canvasHeight ; row ++)
{
for(int col = 0 ; col < canvasWidth ; col ++)
{
for(int idx = 0 ; idx < source.size() ; idx ++)
{
if(row + 1 >= source[idx].height && col + 1 >= source[idx].
width)
maxCover[row][col] = max(maxCover[row][col] , source[
idx].area);
}
}
}
for(int row = 0 ; row < canvasHeight ; row ++)
{
for(int col = 0 ; col < canvasWidth ; col ++)
{
for(int subRow = 0 ; subRow <=(row - 1)/ 2 ; subRow ++)
maxCover[row][col] = max(maxCover[row][col] , maxCover[
subRow][col] + maxCover[row - subRow - 1][col]);
for(int subCol = 0 ; subCol <= (col - 1)/2 ; subCol ++; )
maxCover[row][col] = max(maxCover[row][col] , maxCover[row]
[subCol] + maxCover[row][col - subCol - 1]);
}
}
return maxCover[canvasHeight - 1][canvasWidth - 1];
}
my problem : any optimal solution of a rectangle canvas is the sum of two
optimal solution of two sub rectangle canvas (either vertical of horizontal)
what if the optimal solution cannot be formed by sum of two optimal solution
of two sub rectangle canvas?
e.g rect1 . width 5 , height 8 , rect 2 width 8 , height 5 rect 3 width 3
, height 3
canvas: 13 by 13
optimal
______________
| 8 by 5 | 8 |
|________| by |
| | | 5 |
| |___ |_____|
| | |
|_____|________|
mid is a 3 by 3 square
avatar
t*f
2
TSC EB2->EB3
PD 10/2012
RD 6/2015
EB3 140 申请 3/2016, PP 失败
EB3 140 批准 6/2016,排期已倒退
Online SR 9/18, 因为新年排期出来
RELINK EB2->EB3 9/2x, 置顶帖及版上搜的各个地址都邮寄了一份,一共似乎是3份
walk-in找国会议员RELINK 9/2x
RELINK email [email protected]/* */ 10/1
USCIS 回复议员 RELINK 成功 10/5
RFE medical 10/21
RRFE 11/7
Online SR 11/29 本来不知道还能不能催,心想催了又不会怎样,就催了
New Card is being produced 12/1, 主副3人
一点心得是:版上置顶帖及考古找到的各种 RELINK 方式我都做了(不知道有没有漏掉
什么),最后 RELINK 成功不知道究意是哪种渠道起的作用。所以一定不要怕麻烦,书
面 RELINK(如果不确定的话多个邮寄地址都试)、议员、EMAIL 能上就上。
另外就是 RRFE 到了以后我本来不知道还能不能催,根据事后结果,如果早点催应该能
再快一点。
从 PERM 开始 4年多的申请过程中从版上得到了很多帮助,基本上所有遇到的问题在置
顶帖中或考古后都能找到答案、经验。非常感谢各位前人的分享。希望还没绿的大家都
能尽快绿!
avatar
x*0
3
m
avatar
y*3
4
恭喜

★ 发自iPhone App: ChineseWeb 8.7

【在 t*********f 的大作中提到】
: TSC EB2->EB3
: PD 10/2012
: RD 6/2015
: EB3 140 申请 3/2016, PP 失败
: EB3 140 批准 6/2016,排期已倒退
: Online SR 9/18, 因为新年排期出来
: RELINK EB2->EB3 9/2x, 置顶帖及版上搜的各个地址都邮寄了一份,一共似乎是3份
: walk-in找国会议员RELINK 9/2x
: RELINK email [email protected]/* */ 10/1
: USCIS 回复议员 RELINK 成功 10/5

avatar
M*A
5
顶,co-疑惑
avatar
p*o
6
gxgx!
avatar
s*y
7
GXGX!
avatar
f*o
8
big cong
avatar
L*3
9
gongxi!!
avatar
S*A
10
恭喜恭喜
avatar
m*g
11
恭喜恭喜!
avatar
u*0
12
恭喜!
avatar
s*p
13
恭喜恭喜
avatar
g*6
14
恭喜恭喜,希望沾点喜,呵呵!
avatar
l*e
15
cong

【在 t*********f 的大作中提到】
: TSC EB2->EB3
: PD 10/2012
: RD 6/2015
: EB3 140 申请 3/2016, PP 失败
: EB3 140 批准 6/2016,排期已倒退
: Online SR 9/18, 因为新年排期出来
: RELINK EB2->EB3 9/2x, 置顶帖及版上搜的各个地址都邮寄了一份,一共似乎是3份
: walk-in找国会议员RELINK 9/2x
: RELINK email [email protected]/* */ 10/1
: USCIS 回复议员 RELINK 成功 10/5

avatar
L*2
16
thinker, 你好, 感谢你的分享。
有两个问题想请教一下:
1. 9/18/2016 做SR的时候你的PD是不是还没有current,要到10/2016年才current?但
可以提前一点SR, 因为9月份已经知道下个月就current,对吧?
2. 可否分享一下你邮寄的三个地址? 我在置顶的文章里只搜到一个。
多谢了!

【在 t*********f 的大作中提到】
: TSC EB2->EB3
: PD 10/2012
: RD 6/2015
: EB3 140 申请 3/2016, PP 失败
: EB3 140 批准 6/2016,排期已倒退
: Online SR 9/18, 因为新年排期出来
: RELINK EB2->EB3 9/2x, 置顶帖及版上搜的各个地址都邮寄了一份,一共似乎是3份
: walk-in找国会议员RELINK 9/2x
: RELINK email [email protected]/* */ 10/1
: USCIS 回复议员 RELINK 成功 10/5

avatar
b*a
17
恭喜🎉🎉🎉

【在 t*********f 的大作中提到】
: TSC EB2->EB3
: PD 10/2012
: RD 6/2015
: EB3 140 申请 3/2016, PP 失败
: EB3 140 批准 6/2016,排期已倒退
: Online SR 9/18, 因为新年排期出来
: RELINK EB2->EB3 9/2x, 置顶帖及版上搜的各个地址都邮寄了一份,一共似乎是3份
: walk-in找国会议员RELINK 9/2x
: RELINK email [email protected]/* */ 10/1
: USCIS 回复议员 RELINK 成功 10/5

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