diff --git a/input.txt b/input.txt index 64d332e..098a036 100644 --- a/input.txt +++ b/input.txt @@ -1,5 +1,5 @@ -xxx xxxxxxxx xxxxxxxxxxxxxxxx -x x x x xx xx x xx xx x x -x x xxxxxxxxxxxxxxxx xxxxxxxxxxxxx -x x xx x x xx x xx x x x -xxx xxxxxxx xxxxxxx xxxxxxx +xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx +x x x x x x x x x x x x x x x x x x x x x +xxx x xxx xxx x x xxx xxx xxx xxx xxx xxx xxx x x x xxx x xxx + x x x x x x x x x x x x x x x x x x x +xxx x xxx xxx xxx xxx xxx xxx x xxx x xxx diff --git a/maker.exe b/maker.exe index 06a31db..088f09d 100644 Binary files a/maker.exe and b/maker.exe differ diff --git a/solver.cpp b/solver.cpp index 3e7bf40..7941c9f 100644 --- a/solver.cpp +++ b/solver.cpp @@ -4,18 +4,134 @@ using namespace std; string datas[5]; int data[5][256]; +int models[12][5][5]={ + { + {0,1,1,1,0}, + {0,1,0,1,0}, + {0,1,0,1,0}, + {0,1,0,1,0}, + {0,1,1,1,0} + }, + { + {0,0,0,1,0}, + {0,0,0,1,0}, + {0,0,0,1,0}, + {0,0,0,1,0}, + {0,0,0,1,0} + }, + { + {0,1,1,1,0}, + {0,0,0,1,0}, + {0,1,1,1,0}, + {0,1,0,0,0}, + {0,1,1,1,0} + }, + { + {0,1,1,1,0}, + {0,0,0,1,0}, + {0,1,1,1,0}, + {0,0,0,1,0}, + {0,1,1,1,0} + }, + { + {0,1,0,1,0}, + {0,1,0,1,0}, + {0,1,1,1,0}, + {0,0,0,1,0}, + {0,0,0,1,0} + }, + { + {0,1,1,1,0}, + {0,1,0,0,0}, + {0,1,1,1,0}, + {0,0,0,1,0}, + {0,1,1,1,0} + }, + { + {0,1,1,1,0}, + {0,1,0,0,0}, + {0,1,1,1,0}, + {0,1,0,1,0}, + {0,1,1,1,0} + }, + { + {0,1,1,1,0}, + {0,0,0,1,0}, + {0,0,0,1,0}, + {0,0,0,1,0}, + {0,0,0,1,0} + }, + { + {0,1,1,1,0}, + {0,1,0,1,0}, + {0,1,1,1,0}, + {0,1,0,1,0}, + {0,1,1,1,0} + }, + { + {0,1,1,1,0}, + {0,1,0,1,0}, + {0,1,1,1,0}, + {0,0,0,1,0}, + {0,1,1,1,0} + }, + { + {0,0,0,0,0}, + {0,0,1,0,0}, + {0,1,1,1,0}, + {0,0,1,0,0}, + {0,0,0,0,0} + }, + { + {0,0,0,0,0}, + {0,0,0,0,0}, + {0,1,1,1,0}, + {0,0,0,0,0}, + {0,0,0,0,0} + } +}; + +int rec(int x,int y){ + for(int i=0;i<5;i++){ + for(int j=-1;j<=3;j++){ + if(data[i][x+j] != models[y][i][j+1]) return 0; + } + } + return 1; +} int main(){ freopen("input.txt","r",stdin); + string s = ""; for(int i=0;i<5;i++){ - cin >> datas[i]; + getline(cin,datas[i]); + data[i][0]=0; + datas[i]+=" "; } for(int i=0;i<5;i++){ - for (int j=0;j