来源:牛客网
1 #include<iostream> 2 #include<cstring> 3 #include<cstdio> 4 #include<cmath> 5 #include<cstdlib> 6 #include<algorithm> 7 using namespace std; 8 typedef long long ll; 9 char s[10][5010]; 10 char ans[5010]; 11 int vis[5010]; 12 int main(){ 13 int n; 14 cin>>n; 15 for(int i=0;i<9;i++) 16 cin>>s[i]; 17 for(int i=0;i<9;i++){ 18 for(int j=0;j<n;j++){ 19 if(s[i][j]=='o'){ 20 if(i ==0)ans[j]='F',vis[j]=1; 21 if(i==1)ans[j]='E',vis[j]=1; 22 if(i==2)ans[j]='D',vis[j]=1; 23 if(i==3)ans[j]='C',vis[j]=1; 24 if(i==4)ans[j]='B',vis[j]=1; 25 if(i==5)ans[j]='A',vis[j]=1; 26 if(i==6)ans[j]='G',vis[j]=1; 27 if(i==7)ans[j]='F',vis[j]=1; 28 if(i==8)ans[j]='E',vis[j]=1; 29 } 30 if(s[i][j]=='|')ans[j]='|',vis[j]=1; 31 } 32 } 33 for(int i=0;i<n;i++){ 34 if(vis[i]==1) 35 cout<<ans[i]; 36 else 37 cout<<" "; 38 } 39 cout<<endl; 40 return 0; 41 }