zj před 5 roky
rodič
revize
60c9e5bbd7
1 změnil soubory, kde provedl 172 přidání a 0 odebrání
  1. 172 0
      I.cpp

+ 172 - 0
I.cpp

@@ -0,0 +1,172 @@
+#include <bits/stdc++.h>
+using namespace std;
+
+char c[10][7][5]={
+        '*','*','*','*','*',
+        '*','.','.','.','*',
+        '*','.','.','.','*',
+        '*','.','.','.','*',
+        '*','.','.','.','*',
+        '*','.','.','.','*',
+        '*','*','*','*','*',
+
+        '.','.','.','.','*',
+        '.','.','.','.','*',
+        '.','.','.','.','*',
+        '.','.','.','.','*',
+        '.','.','.','.','*',
+        '.','.','.','.','*',
+        '.','.','.','.','*',
+
+        '*','*','*','*','*',
+        '.','.','.','.','*',
+        '.','.','.','.','*',
+        '*','*','*','*','*',
+        '*','.','.','.','.',
+        '*','.','.','.','.',
+        '*','*','*','*','*',
+
+        '*','*','*','*','*',
+        '.','.','.','.','*',
+        '.','.','.','.','*',
+        '*','*','*','*','*',
+        '.','.','.','.','*',
+        '.','.','.','.','*',
+        '*','*','*','*','*',
+
+        '*','.','.','.','*',
+        '*','.','.','.','*',
+        '*','.','.','.','*',
+        '*','*','*','*','*',
+        '.','.','.','.','*',
+        '.','.','.','.','*',
+        '.','.','.','.','*',
+
+        '*','*','*','*','*',
+        '*','.','.','.','.',
+        '*','.','.','.','.',
+        '*','*','*','*','*',
+        '.','.','.','.','*',
+        '.','.','.','.','*',
+        '*','*','*','*','*',
+
+        '*','*','*','*','*',
+        '*','.','.','.','.',
+        '*','.','.','.','.',
+        '*','*','*','*','*',
+        '*','.','.','.','*',
+        '*','.','.','.','*',
+        '*','*','*','*','*',
+
+        '*','*','*','*','*',
+        '.','.','.','.','*',
+        '.','.','.','.','*',
+        '.','.','.','.','*',
+        '.','.','.','.','*',
+        '.','.','.','.','*',
+        '.','.','.','.','*',
+
+        '*','*','*','*','*',
+        '*','.','.','.','*',
+        '*','.','.','.','*',
+        '*','*','*','*','*',
+        '*','.','.','.','*',
+        '*','.','.','.','*',
+        '*','*','*','*','*',
+
+        '*','*','*','*','*',
+        '*','.','.','.','*',
+        '*','.','.','.','*',
+        '*','*','*','*','*',
+        '.','.','.','.','*',
+        '.','.','.','.','*',
+        '*','*','*','*','*'};
+
+char s[7][11];
+
+int book(int a)
+{
+    int b;
+    if(s[0][a+1]=='.')
+    {
+        if(s[0][a]=='.')
+            b=1;
+        else
+            b=4;
+    }
+    else
+    {
+        if(s[3][a+1]=='.')
+        {
+            if(s[3][a]=='*')
+                b=0;
+            else
+                b=7;
+        }
+        else if(s[4][a]=='*'&&s[5][a]=='*')
+        {
+            if(s[1][a+4]=='*'&&s[2][a+4]=='*'&&s[4][a+4]=='.'&&s[5][a+4]=='.')
+                b=2;
+            else if(s[1][a+4]=='*'&&s[2][a+4]=='*'&&s[4][a+4]=='*'&&s[5][a+4]=='*')
+                b=8;
+            else
+                b=6;
+        }
+        else
+        {
+            if(s[1][a]=='.'&&s[2][a]=='.'&&s[4][a]=='.'&&s[5][a]=='.')
+                b=3;
+            else if(s[1][a+4]=='.'&&s[2][a+4]=='.'&&s[4][a+4]=='*'&&s[5][a+4]=='*')
+                b=5;
+            else
+                b=9;
+        }
+    }
+    return b;
+}
+
+int main()
+{
+    //freopen("test1.in","r",stdin);
+    //freopen("test1.out","w",stdout);
+    int a,b,sum;
+    int t;
+    scanf("%d",&t);
+    for(int p=0;p<t;p++)
+    {
+        for(int i=0;i<7;i++)
+        {
+            scanf("%s",&s[i]);
+        }
+        a=book(0);
+        b=book(6);
+        sum=a+b;
+        if(sum<10)
+        {
+            for(int i=0;i<=6;i++)
+            {
+                for(int j=0;j<=4;j++)
+                {
+                    printf("%c",c[sum][i][j]);
+                }
+                printf("\n");
+            }
+        }
+        else
+        {
+            int n;
+            n=sum%10;
+            for(int i=0;i<=6;i++)
+            {
+                for(int j=0;j<=4;j++)
+                    printf("%c",c[1][i][j]);
+                printf(".");
+                for(int j=0;j<=4;j++)
+                    printf("%c",c[n][i][j]);
+                printf("\n");
+            }
+        }
+        printf("\n");
+    }
+    return 0;
+}