Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- char str[12][85];
- int main()
- {
- int n,i,j,len,sum,a,x;
- string s;
- char ch;
- scanf("%d",&n);
- getchar();
- for(x=1;x<=n;x++)
- {
- if(x>1)
- {
- getchar();
- }
- for(i=1;i<=10;i++)
- {
- gets(str[i]);
- }
- len = strlen(str[1]);
- s = "";
- sum = 0;
- for(i=1;i<len-1;i++)
- {
- sum = 0;
- for(j=2;j<10;j++)
- {
- a = str[j][i];
- if(a==92)
- {
- sum+=(1<<j-2);
- }
- }
- char ch = sum;
- s+=ch;
- }
- printf("%s\n",s.c_str());
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment