Compare commits

...

3 Commits

Author SHA1 Message Date
Luthics 1ca2eb288f re 2023-02-11 17:19:43 +08:00
Luthics 887df2c224 re 2023-02-11 17:19:29 +08:00
Luthics d9fa5acd29 addd 2023-02-11 16:44:25 +08:00
6 changed files with 155 additions and 6 deletions

View File

@ -1,5 +1,5 @@
xxx xxx xxx xxx x x x xxx xxx xxx xxx xxx xxx
x x x x x x x x x x x x x x x x x x
xxx xxx xxx xxx xxx xxx x 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
xxx xxx xxx xxx x x xxx xxx xxx xxx xxx xxx
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

View File

@ -35,6 +35,18 @@ int main(){
}
// cout << endl;
}
// for(int i=0;i<12;i++){
// if(i<10){
// for(int j=0;j<5;j++){
// datas[j]+=numbers[i][j];
// }
// }
// else{
// for(int j=0;j<5;j++){
// datas[j]+=sign[i-10][j];
// }
// }
// }
for(int i=0;i<=10;i++){
if(i%2==1){
int signx = randn(1,2);

BIN
maker.exe

Binary file not shown.

View File

@ -0,0 +1,137 @@
#include <bits/stdc++.h>
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++){
getline(cin,datas[i]);
data[i][0]=0;
datas[i]+=" ";
}
for(int i=0;i<5;i++){
for (int j=1;j<=datas[i].size();j++){
if(datas[i][j-1] == 'x') data[i][j]=1;
else data[i][j]=0;
}
}
for(int i=1;i<=datas[0].size()-4;i++){
if(data[0][i] == 0 && data[0][i+1] == 0 && data[0][i+2] == 0){
if(rec(i,10)){
s+="+";
}
else if(rec(i,11)){
s+="-";
}
}
else {
for(int k=0;k<10;k++){
if(rec(i,k)){
s+=k+'0';
i+=2;
}
}
}
}
cout << s;
return 0;
}

BIN
solver.exe Normal file

Binary file not shown.

View File

@ -1 +1 @@
c
return 0;