Some suggestions about SDET in outsourcing

I'm not sure whether you had accepted the offer.Maybe you had worked several months in MSNTC,so its kinda late for me to give my advice here.Anyway,you still can work out a new goal since you're young.Off course,I dont suggest you accept this offer(if there is any) for the following reasons.First,It seems that you failed to take into account the fact that you have no interest in test job and might feel uncomfortable to be a test engineer.Secondly,as I have mentioned that you're still very young and energic.It will never harm if work ocuppys you too much time although SDE job may be tired and boring but extremely challenging.I believe that you can learn much more from it.
There are lots of outsourcing positions in China HP and IBM,the majority of which are R&D kind of jobs.Why not have a try?It's never too late to try!Good luck to you. 
Sure, here is the code with the suggested modifications: ``` #include <iostream> #include <vector> #define BIAS -1000 #define MY_INT_MIN -20000001 #define MY_INT_MAX 20000001 int main() { int n, res = 0, tmp_pt = 0, last_pt = 0, tmp_val = MY_INT_MAX, last_val = 0, tmp_prt = 0; std::vector<int> queue; std::cin >> n; const int N = n; int mtrx[N][N], w[N], prt[N]; for (int i = 0; i < n; i++) { std::cin >> w[i]; if (w[i] < tmp_val) { tmp_val = w[i]; tmp_pt = i; } } for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { std::cin >> mtrx[i][j]; if (i == j) { mtrx[i][j] = MY_INT_MIN; } } } mtrx[tmp_pt][tmp_pt] = tmp_val; for (int i = 0; i < n - 1; i++) { last_pt = tmp_pt; tmp_val = MY_INT_MAX; for (int j = 0; j < n; j++) { if (mtrx[j][last_pt] < (BIAS - mtrx[j][j])) { mtrx[j][j] = BIAS - mtrx[j][last_pt]; prt[j] = ~last_pt; if (mtrx[j][last_pt] < tmp_val) { tmp_val = mtrx[j][last_pt]; tmp_pt = j; } } else if (BIAS > mtrx[j][j] && mtrx[j][last_pt] < tmp_val) { tmp_val = mtrx[j][last_pt]; tmp_pt = j; } } mtrx[tmp_pt][tmp_pt] = ~prt[tmp_pt]; } for (int i = 0; i < n - 1; i++) { tmp_val = MY_INT_MAX; for (int j = 0; j < n; j++) { if (mtrx[j][j] < 0 && w[j] < tmp_val) { tmp_val = w[j]; tmp_pt = j; } } last_pt = tmp_pt; last_val = tmp_val; while (mtrx[tmp_pt][tmp_pt] < 0) { tmp_prt = ~mtrx[tmp_pt][tmp_pt]; if (mtrx[tmp_pt][tmp_prt] > tmp_val) { tmp_val = mtrx[tmp_pt][tmp_prt]; } tmp_pt = tmp_prt; } if (last_val != tmp_val) { queue.clear(); tmp_pt = last_pt; while (mtrx[tmp_pt][tmp_pt] < 0) { queue.push_back(tmp_pt); tmp_prt = ~mtrx[tmp_pt][tmp_pt]; if (mtrx[tmp_pt][tmp_prt] == tmp_val) { break; } tmp_pt = tmp_prt; } for (int j = queue.size() - 1; j > 0; j--) { mtrx[queue[j]][queue[j]] = ~queue[j - 1]; } mtrx[last_pt][last_pt] = w[last_pt]; } } for (int i = 0; i < n; i++) { if (mtrx[i][i] > 0) { res += mtrx[i][i]; } else { tmp_prt = ~mtrx[i][i]; res += mtrx[i][tmp_prt]; } } std::cout << res << std::endl; return 0; } ``` I hope this helps!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值