g*u
2 楼
本问题适用垃圾股以及蓝筹。
假设MM如果拉高出货完毕。如果高位站岗的所有人死捂不割肉,那MM回头再来一次,就
不能超过这个价位,不然不是把站岗的给解放了吗?除非认定有很多人愿意到更高的价
位站岗。
假设MM如果拉高出货完毕。如果高位站岗的所有人死捂不割肉,那MM回头再来一次,就
不能超过这个价位,不然不是把站岗的给解放了吗?除非认定有很多人愿意到更高的价
位站岗。
b*e
4 楼
那就破产。总之散户总体不可能赚钱。
s*x
5 楼
我是在原矩阵上改的啊,贴一下我的代码吧
public void solve(char[][] board) {
if(board == null || board.length == 0) return;
int m = board.length, n = board[0].length;
// Scan the four edges of the board, if you meet an 'O', call a
recursive mark function to mark that region to '+';
for(int i = 0; i < m; i++) {
bfs(i, 0, board);
bfs(i, n - 1, board);
}
for(int j = 1; j < n-1; j++) {
bfs(0, j, board);
bfs(m - 1, j, board);
}
for(int i = 0; i < m; i++){
for(int j = 0; j < n; j++) {
if(board[i][j] == 'O') {
// flip 'O' to 'X';
board[i][j] = 'X';
} else if(board[i][j] == '+') {
// flip '+' to 'O';
board[i][j] = 'O';
}
}
}
}
private void bfs(int i, int j, char[][] board){
if (board[i][j] != 'O') return;
Queue q = new LinkedList();
q.add(new Point(i,j));
while(!q.isEmpty()){
Point cur = q.poll();
for (Point neighbor : getNeighbors(cur, board)) {
q.add(neighbor);
}
board[cur.x][cur.y] = '+';
}
}
private ArrayList getNeighbors(Point p, char[][] board){
int m = board.length, n = board[0].length;
ArrayList neighbors = new ArrayList();
if (p.x - 1>=0 && board[p.x-1][p.y] == 'O')
neighbors.add(new Point(p.x-1, p.y)); // left
if (p.x + 1 neighbors.add(new Point(p.x+1, p.y)); // right
if (p.y + 1 neighbors.add(new Point(p.x, p.y+1)); // up
if (p.y - 1>=0 && board[p.x][p.y-1] == 'O')
neighbors.add(new Point(p.x, p.y-1)); // down
return neighbors;
}
【在 A*********c 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: 不要传数组,在原数组上改动。递归,再改回来。
public void solve(char[][] board) {
if(board == null || board.length == 0) return;
int m = board.length, n = board[0].length;
// Scan the four edges of the board, if you meet an 'O', call a
recursive mark function to mark that region to '+';
for(int i = 0; i < m; i++) {
bfs(i, 0, board);
bfs(i, n - 1, board);
}
for(int j = 1; j < n-1; j++) {
bfs(0, j, board);
bfs(m - 1, j, board);
}
for(int i = 0; i < m; i++){
for(int j = 0; j < n; j++) {
if(board[i][j] == 'O') {
// flip 'O' to 'X';
board[i][j] = 'X';
} else if(board[i][j] == '+') {
// flip '+' to 'O';
board[i][j] = 'O';
}
}
}
}
private void bfs(int i, int j, char[][] board){
if (board[i][j] != 'O') return;
Queue
q.add(new Point(i,j));
while(!q.isEmpty()){
Point cur = q.poll();
for (Point neighbor : getNeighbors(cur, board)) {
q.add(neighbor);
}
board[cur.x][cur.y] = '+';
}
}
private ArrayList
int m = board.length, n = board[0].length;
ArrayList
if (p.x - 1>=0 && board[p.x-1][p.y] == 'O')
neighbors.add(new Point(p.x-1, p.y)); // left
if (p.x + 1
if (p.y + 1
if (p.y - 1>=0 && board[p.x][p.y-1] == 'O')
neighbors.add(new Point(p.x, p.y-1)); // down
return neighbors;
}
【在 A*********c 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: 不要传数组,在原数组上改动。递归,再改回来。
L*n
6 楼
MM把股票全卖给你, 拿了钱去捧新的股票, 你就只好用5000年的历史来一边站岗一边
安慰自己了, 呵呵。
安慰自己了, 呵呵。
A*c
7 楼
你这个代码,我觉得有点略长。你看这个你能不能改成java的。
class Solution {
public:
void solve(vector> &board) {
if (board.size() == 0) return;
const int m = board.size(); const int n = board[0].size();
queue> q;
for (int i = 0; i < m; ++i) {q.push({i, 0}); q.push({i, n-1});}
for (int j = 1; j < n-1; ++j) {q.push({0, j}); q.push({m-1, j});}
while (!q.empty()) {
pair p = q.front(); q.pop();
int i = p.first, j = p.second;
if (outOfBound(i,j,m,n) || board[i][j] != 'O') continue;
board[i][j] = '+';
q.push({i-1, j}); q.push({i+1, j});q.push({i, j-1});q.push({i, j
+1});
}
for (int i = 0; i < m; ++i)
for(int j = 0; j < n; ++j)
if ('+' == board[i][j]) board[i][j] = 'O';
else board[i][j] = 'X'; //这时候board[i][j]不是'O'就是'X',
所以我们不需要判断
}
bool outOfBound(const int &i, const int &j, const int &m, const int &n) {
return (i<0 || i>=m || j<0 || j>=n);
}
};
【在 s********x 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: 我是在原矩阵上改的啊,贴一下我的代码吧
: public void solve(char[][] board) {
: if(board == null || board.length == 0) return;
: int m = board.length, n = board[0].length;
: // Scan the four edges of the board, if you meet an 'O', call a
: recursive mark function to mark that region to '+';
: for(int i = 0; i < m; i++) {
: bfs(i, 0, board);
: bfs(i, n - 1, board);
: }
class Solution {
public:
void solve(vector
if (board.size() == 0) return;
const int m = board.size(); const int n = board[0].size();
queue
for (int i = 0; i < m; ++i) {q.push({i, 0}); q.push({i, n-1});}
for (int j = 1; j < n-1; ++j) {q.push({0, j}); q.push({m-1, j});}
while (!q.empty()) {
pair
int i = p.first, j = p.second;
if (outOfBound(i,j,m,n) || board[i][j] != 'O') continue;
board[i][j] = '+';
q.push({i-1, j}); q.push({i+1, j});q.push({i, j-1});q.push({i, j
+1});
}
for (int i = 0; i < m; ++i)
for(int j = 0; j < n; ++j)
if ('+' == board[i][j]) board[i][j] = 'O';
else board[i][j] = 'X'; //这时候board[i][j]不是'O'就是'X',
所以我们不需要判断
}
bool outOfBound(const int &i, const int &j, const int &m, const int &n) {
return (i<0 || i>=m || j<0 || j>=n);
}
};
【在 s********x 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: 我是在原矩阵上改的啊,贴一下我的代码吧
: public void solve(char[][] board) {
: if(board == null || board.length == 0) return;
: int m = board.length, n = board[0].length;
: // Scan the four edges of the board, if you meet an 'O', call a
: recursive mark function to mark that region to '+';
: for(int i = 0; i < m; i++) {
: bfs(i, 0, board);
: bfs(i, n - 1, board);
: }
s*x
9 楼
谢啦,accepted
【在 A*********c 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: 你这个代码,我觉得有点略长。你看这个你能不能改成java的。
: class Solution {
: public:
: void solve(vector> &board) {
: if (board.size() == 0) return;
: const int m = board.size(); const int n = board[0].size();
: queue> q;
: for (int i = 0; i < m; ++i) {q.push({i, 0}); q.push({i, n-1});}
: for (int j = 1; j < n-1; ++j) {q.push({0, j}); q.push({m-1, j});}
: while (!q.empty()) {
【在 A*********c 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: 你这个代码,我觉得有点略长。你看这个你能不能改成java的。
: class Solution {
: public:
: void solve(vector
: if (board.size() == 0) return;
: const int m = board.size(); const int n = board[0].size();
: queue
: for (int i = 0; i < m; ++i) {q.push({i, 0}); q.push({i, n-1});}
: for (int j = 1; j < n-1; ++j) {q.push({0, j}); q.push({m-1, j});}
: while (!q.empty()) {
q*m
11 楼
你这个bfs 里面会有重复访问吗,感觉一个点deque 以后还有可能enque
【在 A*********c 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: 你这个代码,我觉得有点略长。你看这个你能不能改成java的。
: class Solution {
: public:
: void solve(vector> &board) {
: if (board.size() == 0) return;
: const int m = board.size(); const int n = board[0].size();
: queue> q;
: for (int i = 0; i < m; ++i) {q.push({i, 0}); q.push({i, n-1});}
: for (int j = 1; j < n-1; ++j) {q.push({0, j}); q.push({m-1, j});}
: while (!q.empty()) {
【在 A*********c 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: 你这个代码,我觉得有点略长。你看这个你能不能改成java的。
: class Solution {
: public:
: void solve(vector
: if (board.size() == 0) return;
: const int m = board.size(); const int n = board[0].size();
: queue
: for (int i = 0; i < m; ++i) {q.push({i, 0}); q.push({i, n-1});}
: for (int j = 1; j < n-1; ++j) {q.push({0, j}); q.push({m-1, j});}
: while (!q.empty()) {
t*s
12 楼
MM会把你手中的股票反复的short sale(你还不知道),直到零,或者你抗不住了割肉
,MM马上买来cover。总之,会死的很难看。
,MM马上买来cover。总之,会死的很难看。
g*l
19 楼
不能看去年的高价,比去年的平均价低应该能出水,赚多赚少看命了,说实话,垃圾赚点就
跑吧
跑吧
D*C
24 楼
你要是在30多块捂了C,等盈利只能等到小孩上大学了.....
要是捂了Bear Stern.....
要是捂了Bear Stern.....
h*n
27 楼
You do not need to worry for MMs.
The real scenario would be:
Those indiviuals who bought at a higher price that decided to hold if the
price dropped are those who would sell first when they were out of water and
regret if the price continue to climb.
They will be the persons likely to buy at a even higher price later when
they finish regretting and decided to chase high again, then they will hold
again if the price dropped. However they already hand over the money to MMs
(the price differences
【在 g*****u 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: 本问题适用垃圾股以及蓝筹。
: 假设MM如果拉高出货完毕。如果高位站岗的所有人死捂不割肉,那MM回头再来一次,就
: 不能超过这个价位,不然不是把站岗的给解放了吗?除非认定有很多人愿意到更高的价
: 位站岗。
The real scenario would be:
Those indiviuals who bought at a higher price that decided to hold if the
price dropped are those who would sell first when they were out of water and
regret if the price continue to climb.
They will be the persons likely to buy at a even higher price later when
they finish regretting and decided to chase high again, then they will hold
again if the price dropped. However they already hand over the money to MMs
(the price differences
【在 g*****u 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: 本问题适用垃圾股以及蓝筹。
: 假设MM如果拉高出货完毕。如果高位站岗的所有人死捂不割肉,那MM回头再来一次,就
: 不能超过这个价位,不然不是把站岗的给解放了吗?除非认定有很多人愿意到更高的价
: 位站岗。
J*s
29 楼
MMs know that this will never happen. If 所有人都采取买了死捂, they have to
change their strategies.
The key point that you MUST be unique in this market. If you are just an
ordinary investor following others (including analysts), you will lose. So
my point is, we should all be proud of BEING DIFFERENT.
【在 g*****u 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: 本问题适用垃圾股以及蓝筹。
: 假设MM如果拉高出货完毕。如果高位站岗的所有人死捂不割肉,那MM回头再来一次,就
: 不能超过这个价位,不然不是把站岗的给解放了吗?除非认定有很多人愿意到更高的价
: 位站岗。
change their strategies.
The key point that you MUST be unique in this market. If you are just an
ordinary investor following others (including analysts), you will lose. So
my point is, we should all be proud of BEING DIFFERENT.
【在 g*****u 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: 本问题适用垃圾股以及蓝筹。
: 假设MM如果拉高出货完毕。如果高位站岗的所有人死捂不割肉,那MM回头再来一次,就
: 不能超过这个价位,不然不是把站岗的给解放了吗?除非认定有很多人愿意到更高的价
: 位站岗。
g*l
30 楼
光UNIQUE也不行吧,还要算准了,估计今天多数都甩了AIG,我今天UNIQUE了
to
【在 J******s 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: MMs know that this will never happen. If 所有人都采取买了死捂, they have to
: change their strategies.
: The key point that you MUST be unique in this market. If you are just an
: ordinary investor following others (including analysts), you will lose. So
: my point is, we should all be proud of BEING DIFFERENT.
to
【在 J******s 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: MMs know that this will never happen. If 所有人都采取买了死捂, they have to
: change their strategies.
: The key point that you MUST be unique in this market. If you are just an
: ordinary investor following others (including analysts), you will lose. So
: my point is, we should all be proud of BEING DIFFERENT.
J*s
31 楼
Maybe I did not make it clear. Being unique means you have your own
strategies. I am not suggesting you pursue uniqueness just for the sake of
uniqueness. Clearly, everyone should do his/her own DD.
It comes down to Buffet's "fear and greed" strategy, implying being a
minority might be a better approach to success (since the majority is
mediocre and is losing money). That said, each of us should never disrespect
others just because they are different. After all, our investment returns
are the on
【在 g***l 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: 光UNIQUE也不行吧,还要算准了,估计今天多数都甩了AIG,我今天UNIQUE了
:
: to
strategies. I am not suggesting you pursue uniqueness just for the sake of
uniqueness. Clearly, everyone should do his/her own DD.
It comes down to Buffet's "fear and greed" strategy, implying being a
minority might be a better approach to success (since the majority is
mediocre and is losing money). That said, each of us should never disrespect
others just because they are different. After all, our investment returns
are the on
【在 g***l 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: 光UNIQUE也不行吧,还要算准了,估计今天多数都甩了AIG,我今天UNIQUE了
:
: to
相关阅读