#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main(){
int n;
string str[101];
string g="***ABCDEFGHIJKLMNOPQRSTUVWXYZ***";
string st;
cin>>n;
for(int i=0;i<n;i++) cin>>str[i];
cin>>st;
int l=st.length();
vector<bool> v(32,false);
for(int i=0;i<n;i++){
string sub=str[i].substr(0,l);
if(sub==st) v[g.find(str[i][l])]=true;
}
for(int i=0;i<32;i+=8){
for(int j=0;j<8;j++){
if(v[i+j])cout<<g[i+j];
else cout<<'*';
}
cout<<'\n';
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
268 KB |
Output is correct |
2 |
Correct |
1 ms |
364 KB |
Output is correct |
3 |
Correct |
1 ms |
364 KB |
Output is correct |
4 |
Correct |
1 ms |
364 KB |
Output is correct |
5 |
Correct |
1 ms |
364 KB |
Output is correct |
6 |
Correct |
1 ms |
364 KB |
Output is correct |
7 |
Correct |
1 ms |
364 KB |
Output is correct |
8 |
Correct |
2 ms |
364 KB |
Output is correct |
9 |
Correct |
2 ms |
364 KB |
Output is correct |
10 |
Correct |
1 ms |
364 KB |
Output is correct |