Submission #383154

#TimeUsernameProblemLanguageResultExecution timeMemory
383154IwanttobreakfreeKartomat (COCI17_kartomat)C++98
80 / 80
2 ms364 KiB
#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 timeMemoryGrader output
Fetching results...