Redian新闻
>
【EB2 2015年六月第92绿】TSC EB2->EB3 PD 2011.12 RD 2014.2
avatar
【EB2 2015年六月第92绿】TSC EB2->EB3 PD 2011.12 RD 2014.2# EB23 - 劳工卡
z*2
1
8 -1 4
3 -1 -1
5 2 2
total region =2, 一個是 83522. 另一個是4,
-1就是 當 一個 分隔區域的 separator
如何最快就出一個 given 2d matrix 有多少個 regions? DFS? run time = ???
謝謝
avatar
j*a
2
forgot to kiss Liza flower and yoyo, if his wife doesn't complain:)
Lisa shared the best RFE EVL info with me although I didn't got EVL RFE.
Yoyo is the generator of downgrade. I can't think of any board member that
is so helpful on this mitbbs!
your card has been ordered for both principle applicant and spouse.
PD 2011,12
RD 2014,2
EB2-EB3
EAD approved 2nd time Mar 2015 for 2 years
relink at 5/1/15 but didn't work until I found my lovely congressman
secretary. She followed up and found me still in EB3 category.
then send my EB2 I-140 to her liaison. Then they replied to her say ok we
can approve her visa number.
RFE for medical 6/3/15
RFE material received and showed on website 6/11/15
anxiously waiting for the card production since 6/1/15
contacted congrassman twice but she didn't heard back from TSC liaison.
she emailed TSC directly today just to make sure. Then got greened in the
afternoon!
What a lovely congrassman secretory!
filed so many SRs about 5 or 6...out of normal processing time!
timeline已加在downgrade那一tab
avatar
u*g
3
你要最快的话可能是disjoint set吧。。?
avatar
n*h
4
gxgx
avatar
r*h
5
我的想法是,首先从任意一个非separator的点开始,做dfs分离出一个region。途中将
所有遇到的separator送进一个队列。然后每次从队列里面送出一个separator,遍历和
他相邻的还未被访问的其他region,或者将和他相邻的还未入过队列的separator入队
。直到队列变成空。
总时间复杂度是matrix的元素个数。

【在 z***2 的大作中提到】
: 8 -1 4
: 3 -1 -1
: 5 2 2
: total region =2, 一個是 83522. 另一個是4,
: -1就是 當 一個 分隔區域的 separator
: 如何最快就出一個 given 2d matrix 有多少個 regions? DFS? run time = ???
: 謝謝

avatar
L*M
6
恭喜恭喜
avatar
f*t
7
这样?O(n),n是matrix元素数目
void dfs(hash_set&s, vector>& matrix,int row,int col)
{
int dir[4][2] = {{1,0},{-1,0},{0,1},{0,-1}};
s.insert(row*matrix[0].size()+col);
for(int i=0;i<4;i++)
{
int newRow = row+dir[i][0],newCol = col+dir[i][1];
if(newRow>=0&&newnewCol>=0&&newColmatrix[newRow][newCol]!=-1)
dfs(s,matrix,newRow,newCol);
}
}
int regionNum(vector>& matrix)
{
//special case return
hash_set s;
int region = 0;
for(int i=0;ifor(int j=0;jif(s.find(i*matrix[0].size()+j)!=s.end()&&matrix[i][j]!=-1)
{
dfs(s,matrix,i,j);
region++;
}
return region;
}
avatar
P*1
8
cong
avatar
r*h
9
是哦。。。直接找未遍历的分区中某一点就行
我想复杂了。。

【在 f******t 的大作中提到】
: 这样?O(n),n是matrix元素数目
: void dfs(hash_set&s, vector>& matrix,int row,int col)
: {
: int dir[4][2] = {{1,0},{-1,0},{0,1},{0,-1}};
: s.insert(row*matrix[0].size()+col);
: for(int i=0;i<4;i++)
: {
: int newRow = row+dir[i][0],newCol = col+dir[i][1];
: if(newRow>=0&&new: newCol>=0&&newCol
avatar
x*u
10
cong!zhan!

【在 j*******a 的大作中提到】
: forgot to kiss Liza flower and yoyo, if his wife doesn't complain:)
: Lisa shared the best RFE EVL info with me although I didn't got EVL RFE.
: Yoyo is the generator of downgrade. I can't think of any board member that
: is so helpful on this mitbbs!
: your card has been ordered for both principle applicant and spouse.
: PD 2011,12
: RD 2014,2
: EB2-EB3
: EAD approved 2nd time Mar 2015 for 2 years
: relink at 5/1/15 but didn't work until I found my lovely congressman

avatar
l*b
11
这个是不是可以用union find来做?
avatar
m*0
12
92绿啦
avatar
y*o
13
8 -1 4
3 3 -1
5 2 2
will be 1 region?

【在 z***2 的大作中提到】
: 8 -1 4
: 3 -1 -1
: 5 2 2
: total region =2, 一個是 83522. 另一個是4,
: -1就是 當 一個 分隔區域的 separator
: 如何最快就出一個 given 2d matrix 有多少個 regions? DFS? run time = ???
: 謝謝

avatar
k*h
14
还是小朋友录得快!
avatar
b*z
15
Should the loop if condition:
S.find() == s.end?

【在 f******t 的大作中提到】
: 这样?O(n),n是matrix元素数目
: void dfs(hash_set&s, vector>& matrix,int row,int col)
: {
: int dir[4][2] = {{1,0},{-1,0},{0,1},{0,-1}};
: s.insert(row*matrix[0].size()+col);
: for(int i=0;i<4;i++)
: {
: int newRow = row+dir[i][0],newCol = col+dir[i][1];
: if(newRow>=0&&new: newCol>=0&&newCol
avatar
s*8
16
GXGX
avatar
Z*4
17
flood fill可以不?
avatar
d*3
18
gxgx
今天是个好日子
avatar
y*g
19
dfs bfs无所谓吧 color-fill能遍历就行
avatar
j*a
20
I have become a big mom after so many years of waiting!
Tears~ female principle applicant equals all tears!

【在 k*****h 的大作中提到】
: 还是小朋友录得快!
avatar
L*M
21
赞!同感,握手!沾点喜气:)

【在 j*******a 的大作中提到】
: I have become a big mom after so many years of waiting!
: Tears~ female principle applicant equals all tears!

avatar
y*0
22
沾点喜气:)cong
avatar
E*y
23
恭喜!别忘了分包子哈:)
avatar
l*n
24
gx
avatar
m*y
25
congrats. admire congressman.

【在 j*******a 的大作中提到】
: I have become a big mom after so many years of waiting!
: Tears~ female principle applicant equals all tears!

avatar
d*l
26
恭喜恭喜
avatar
G*r
27
恭喜!
avatar
s*8
28
GXGX!
avatar
l*y
29
恭喜!
avatar
y*0
30
恭喜恭喜!她不介意 哈哈哈
avatar
z*y
31
I don't mind if you kiss me instead.
avatar
c*7
32
庆向尧樽祝
无边广弘愿
二纪犹未平
春日照长安
青天豁眼快
分司有何乐
avatar
u*r
33
恭喜!
chi
pai
avatar
M*r
34
cong!
avatar
j*a
35
用yoyo的话说,你先去报个timeline吧!

【在 z******y 的大作中提到】
: I don't mind if you kiss me instead.
avatar
m*z
36
cong!
avatar
v*6
37
cong
avatar
a*r
38
恭喜恭喜!

【在 j*******a 的大作中提到】
: forgot to kiss Liza flower and yoyo, if his wife doesn't complain:)
: Lisa shared the best RFE EVL info with me although I didn't got EVL RFE.
: Yoyo is the generator of downgrade. I can't think of any board member that
: is so helpful on this mitbbs!
: your card has been ordered for both principle applicant and spouse.
: PD 2011,12
: RD 2014,2
: EB2-EB3
: EAD approved 2nd time Mar 2015 for 2 years
: relink at 5/1/15 but didn't work until I found my lovely congressman

avatar
h*l
39
Congrats
avatar
m*1
40
gx
avatar
u*0
41
恭喜!
avatar
H*C
42
gxgx
avatar
a*q
43
cong
avatar
c*i
44
恭喜

【在 j*******a 的大作中提到】
: forgot to kiss Liza flower and yoyo, if his wife doesn't complain:)
: Lisa shared the best RFE EVL info with me although I didn't got EVL RFE.
: Yoyo is the generator of downgrade. I can't think of any board member that
: is so helpful on this mitbbs!
: your card has been ordered for both principle applicant and spouse.
: PD 2011,12
: RD 2014,2
: EB2-EB3
: EAD approved 2nd time Mar 2015 for 2 years
: relink at 5/1/15 but didn't work until I found my lovely congressman

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