Submission #294004

#TimeUsernameProblemLanguageResultExecution timeMemory
2940047_7_7Kartomat (COCI17_kartomat)C++17
80 / 80
2 ms384 KiB
#include <bits/stdc++.h> using namespace std; int n; vector<string> a; int main() { ios_base::sync_with_stdio(false); cin >> n; for(int i = 1; i <= n; i ++){ string s; cin >> s; a.push_back(s); } string s; cin >> s; vector<int> cnt(26); for(int i = 0; i < n; i ++){ if((int)s.size() < (int)a[i].size()){ if(a[i].substr(0, (int)s.size()) == s){ cnt[a[i][(int)s.size()] - 'A'] = 1; } } } char c = 'A'; for(int i = 1; i <= 4; i ++){ for(int j = 1; j <= 8; j ++){ if(i == 1 && j <= 3){ cout << '*'; }else if(i == 4 && j >= 6){ cout << '*'; }else{ if(cnt[c - 'A'] == 1) cout << c; else cout << '*'; c ++; } } cout << "\n"; } }
#Verdict Execution timeMemoryGrader output
Fetching results...