A
Active Volcano
now we have a two-dimension matrix,the dimension is MxN,such as :int
map[M][N],the element of matrix satisfy all the below:
1)initial condition:
1.the element belong to the set:{0,1,2,3}
2.matrix's initial state satisfy:
(*):
for the column , if map[pos] == 0, then map[k][pos] == 0, i<=k<M,
0<=i<M,0<=pos<M
2)requirement:
1. delete element of landscape orientation and lengthwise direction
which sastify:continuous equal and the number >= 3, then need to
sastify (*).
such as:
23000
11122
delete element of landscape orientation:111,turn to:
00000
23022
2.first of all, need to delete element of landscape orientation
May some people give C/C++ code, i had realize this less than 200
line of c++ code 。
map[M][N],the element of matrix satisfy all the below:
1)initial condition:
1.the element belong to the set:{0,1,2,3}
2.matrix's initial state satisfy:
(*):
for the column , if map[pos] == 0, then map[k][pos] == 0, i<=k<M,
0<=i<M,0<=pos<M
2)requirement:
1. delete element of landscape orientation and lengthwise direction
which sastify:continuous equal and the number >= 3, then need to
sastify (*).
such as:
23000
11122
delete element of landscape orientation:111,turn to:
00000
23022
2.first of all, need to delete element of landscape orientation
May some people give C/C++ code, i had realize this less than 200
line of c++ code 。