# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
383154 | Iwanttobreakfree | Kartomat (COCI17_kartomat) | C++98 | 2 ms | 364 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 |
---|---|---|---|---|
Fetching results... |