Lang:G++
Edit12345678910111213141516171819202122232425262728293031#include <string>#include <iostream>#include <queue>using namespace std;#define N 100000int mine = 0, nomine = 0;int w; double block[N][3]; int value[N];queue<int> indexlist;void init(){for (int i = 0; i < w; i++){for (int j = 0; j < 3; j++){block[i][j] = -1;}indexlist.push(i);}block[0][0] = block[w - 1][2] = 0;}//前向标记void forwardRemark(int xindex, int yindex){int x = 1;for (int y = yindex - 1; y >= 0; y--){if (xindex + x<w){block[xindex + x][y] = block[xindex][yindex];}x++;}}//后向标记void backwardRemark(int xindex, int yindex){int x = 1;for (int y = yindex + 1; y<3; y++){