hiho week 30 register

Ended

Participants:387

Verdict:Accepted
Score:100 / 100
Submitted:2015-01-27 06:26:54

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <string>
#include <iostream> 
#include <queue>
using namespace std;
#define N 100000
int 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++){
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX