# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
294004 | 7_7_7 | Kartomat (COCI17_kartomat) | C++17 | 2 ms | 384 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 <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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |