Redian新闻
>
请教一个申请住院医生和绿卡的问题
avatar
请教一个申请住院医生和绿卡的问题# Immigration - 落地生根
l*c
1
N皇后,写出来总是报错
说我placeQueen里面没有声明vector>& reta
好久没写C++了。请帮忙提个错
多谢
vector > solveNQueens(int n) {
// Start typing your C/C++ solution below
// DO NOT write int main() function
vector> ret = new vector>();
if (n <= 0) {
return ret;
}
int * sol = new int[n];
placeQueen(sol, n, 0, ret);
return ret;
}
void placeQueen(int sol[], int n, int row, vector>& reta)
{
if (row == n) {
reta.push_back(transform(sol),n);
return;
}
for (int i = 0; i < n; i++) {
if (!taken(sol, row, i)) {
sol[row] = i;
placeQueen(sol, n, row+1, reta);
}
}
}
avatar
J*s
2
目前是researcher,准备申请Eb-1b,同时准备申请做住院医生。如果住院医生开始的
时候140还没有批,怎么办?或者140批了,485还没过,怎么办?多谢了。
avatar
b*h
3
到了那个函数里 >> 之间没空格了
avatar
f*2
4
if you are able to file 485 before application (around 9/2012), you can use
EAD to match. otherwise you will need H1 sponsorship.
if your 140 is approved before the start of resident training you are
generally safe. if not you probably need to get prepared for questions
regarding switch from research to clinical practice. but should give it a
try nevertheless, start your green card process right now and adjust your
plan accordingly. good luck!
avatar
q*c
5
A couple problems:
1. when you use new, you should return a pointer
2. You don't need new for vector, so use this:
vector > ret;
avatar
c*2
6
you can change job after I-485 pending 180 days, IF you can satisfy USCIS
that a medical resident is the same and similar position as your research
job as decribed in the EB1B I-140.
avatar
l*c
7
thanks ! Now it's ok.
vector > solveNQueens(int n) {
// Start typing your C/C++ solution below
// DO NOT write int main() function
//vector> ret = new vector>();
vector > ret;
if (n <= 0) {
return ret;
}
int * sol = new int[n];
placeQueen(sol, n, 0, ret);
return ret;
}
void placeQueen(int sol[], int n, int row, vector >& reta
) {
if (row == n) {
reta.push_back(transform(sol, n));
return;
}
for (int i = 0; i < n; i++) {
if (!taken(sol, row, i)) {
sol[row] = i;
placeQueen(sol, n, row+1, reta);
}
}
}
bool taken(int sol[], int row, int col) {
//check col and diag
for (int i = 0; i < row; i++) {
if (sol[i] == col) {
return true;
}
if (row-i == abs(col-sol[i])) {
return true;
}
}
return false;
}
vector transform(int sol[], int n){

vector ret;
for (int i = 0; i < n; i++) {
string sb ="";
for (int j = 0; j < n; j++) {
if (j == sol[i]) {
sb=sb+"Q";
}
else {
sb=sb+".";
}
}
ret.push_back(sb);
}
return ret;
}

【在 q********c 的大作中提到】
: A couple problems:
: 1. when you use new, you should return a pointer
: 2. You don't need new for vector, so use this:
: vector > ret;

avatar
s*t
8
考虑140 pp
申请材料尽量往clinical research 方向靠。如果以后不幸有RFE,问为何转做医生也好解释:有很多医生看病同时也做 Biomedical research
avatar
J*s
9
多谢回答。
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。