Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- #include<iostream>
- #include<math.h>
- #include<vector>
- #include<set>
- #include<queue>
- #include<algorithm>
- #include<cstring> //for memset
- using namespace std;
- #define lli int long long
- #define ull unsigned long long
- #define ld long double
- #define pi acos(-1)
- #define pb push_back
- #define pbk pop_back
- #define mp make_pair
- #define ff first
- #define ss second
- #define pii pair<int,int>
- #define gcd(a,b) __gcd(a,b)
- #define lcm(a,b) (a/gcd(a,b))*b
- #define READ freopen("in.txt","r",stdin);
- #define WRITE freopen("outer.txt","w",stdout);
- #define sort(t) sort(t.begin(),t.end())
- #define mem(a,b) memset(a,b,sizeof a)
- #define sf scanf
- #define pf printf
- #define cs(p) printf("Case %d: ", ++(p))
- #define dist(ax,ay,bx,by) sqrt((ax-bx)*(ax-bx)+(ay-by)*(ay-by))
- #define MM 100003
- #define inf 10000000000000000+7
- #define M 1000000002
- #define MINI -1000000003
- //const int fx[]={+1,-1,+0,+0};
- //const int fy[]={+0,+0,+1,-1};
- //const int fx[]={+0,+0,+1,-1,-1,+1,-1,+1}; // Kings Move
- //const int fy[]={-1,+1,+0,+0,+1,+1,-1,-1}; // Kings Move
- //#define for(i,a,n) for(int i=a;i<n;i++)
- //it=myset.find(20);
- //int a[8]= {0,0,-1,1,-1,1,-1,1};
- //int b[8]= {-1,1,0,0,-1,1,1 ,-1};
- int main()
- {
- string s[9];
- int n,i,j,k;
- for(i=0;i<7;i++)
- {
- cin>>s[i];
- }
- int r=s[0].size();
- int p1=0,p2=4,ss=0,ss1=0;
- while(p2<r)
- //cout<<s[0][p1]<<" "<<s[0][p2]<<" "<<s[6][p1]<<" "<<s[6][p2]<<endl;
- {
- if(s[0][p1]=='.' && s[0][p2]=='.' && s[6][p1]=='.' && s[6][p2]=='*')
- {
- cout<<"Q";
- }
- else if(s[0][p1]=='.' && s[0][p2]=='*' && s[6][p1]=='*' && s[6][p2]=='.')
- {
- cout<<"S";
- }
- else if(s[0][p1]=='.' && s[0][p2]=='.' && s[6][p1]=='.' && s[6][p2]=='.')
- {
- if(s[1][p1]=='.')
- {
- cout<<"I";
- }
- else if(s[4][p1+3]=='*')
- {
- cout<<"G";
- }
- else if(s[2][p2]=='*')cout<<"O";
- else cout<<"C";
- }
- else if(s[0][p1]=='*' && s[0][p2]=='.' && s[6][p1]=='*' && s[6][p2]=='*')
- {
- if(s[0][p1+1]=='*')
- {
- cout<<"R";
- }
- else
- {
- cout<<"L";
- }
- }
- else if(s[0][p1]=='*' && s[0][p2]=='*' && s[6][p1]=='*' && s[6][p2]=='*')
- {
- if(s[3][p1+2]=='.')
- {
- cout<<"K";
- }
- else if(s[3][p2]=='.')
- {
- if(s[1][p1]=='.') cout<<"Z";
- else if(s[2][p1]=='.') cout<<"X";
- else cout<<"E";
- }
- else
- {
- if(s[1][p1+1]=='*') cout<<"M";
- else if(s[2][p1+1]=='*')cout<<"N";
- else cout<<"H";
- }
- }
- else if(s[0][p1]=='*' && s[0][p2]=='.' && s[6][p1]=='*' && s[6][p2]=='.')
- {
- if(s[5][p2]=='.')
- {
- cout<<"P";
- }
- else if(s[3][p2]=='.')cout<<"B";
- else cout<<"D";
- }
- else if(s[0][p1]=='*' && s[0][p2]=='*' && s[6][p1]=='.' && s[6][p2]=='.')
- {
- if(s[0][p1+1]=='*')
- {
- cout<<"T";
- }
- else if(s[2][p1]=='.')
- {
- cout<<"Y";
- }
- else if(s[4][p1]=='.')
- {
- cout<<"V";
- }
- else if(s[6][p1+2]=='*')
- {
- cout<<"U";
- }
- else
- {
- cout<<"W";
- }
- }
- else if(s[0][p1]=='.' && s[0][p1+1]=='.')
- {
- cout<<"J";
- }
- else if(s[0][p1]=='.' && s[0][p2]=='.' && s[6][p1]=='*' && s[6][p2]=='*')
- {
- cout<<"A";
- }
- else
- cout<<"F";
- p1=p1+6;
- p2=p2+6;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement