#include #include #include #include #include using namespace std; char cisla[11][7][6]={ {"+---+", "| |", "| |", "+ +", "| |", "| |", "+---+"}, {" +", " |", " |", " +", " |", " |", " +"}, {"+---+", " |", " |", "+---+", "| ", "| ", "+---+"}, {"+---+", " |", " |", "+---+", " |", " |", "+---+"}, {"+ +", "| |", "| |", "+---+", " |", " |", " +"}, {"+---+", "| ", "| ", "+---+", " |", " |", "+---+"}, {"+---+", "| ", "| ", "+---+", "| |", "| |", "+---+"}, {"+---+", " |", " |", " +", " |", " |", " +"}, {"+---+", "| |", "| |", "+---+", "| |", "| |", "+---+"}, {"+---+", "| |", "| |", "+---+", " |", " |", "+---+"}, {" ", " ", "o", " ", "o", " ", " "} }; bool match(char *str,int cislo,int riadok){ if(strlen(str)!=strlen(cisla[cislo][riadok]))return false; int len=min(strlen(str),strlen(cisla[cislo][riadok])); for(int i=0;i1){ printf("ambiguous\n"); return true; } if(count==0)printf("WTF\n"); count=0; for(int i=0;i<60;i++){ int a=i/10; int b=i%10; if(possible[3][a]&&possible[4][b]){ count++; vystup[3]=a+'0'; vystup[4]=b+'0'; } } if(count==0)printf("WTF\n"); if(count>1){ printf("ambiguous\n"); return true; } printf("%s\n",vystup); return true; } int main(){ while(gogog()){} printf("end\n"); }