# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
994021 | vjudge1 | Kartomat (COCI17_kartomat) | C++17 | 1 ms | 348 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 main()
{
int n;
cin>>n;
string l[n];
for (int i=0;i<n;i++)
cin>>l[i];
string s;
cin>>s;
int m=s.size();
string ans="";
for (int i=0;i<32;i++)
ans+='*';
for (int i=0;i<n;i++)
{
string s1="";
if (l[i].size()<m)
continue;
for (int j=0;j<m;j++)
s1+=l[i][j];
if (s1!=s)
continue;
ans[(l[i][m]-'A')+3]=l[i][m];
}
for (int j=0;j<4;j++)
{
for (int i=j*8;i<(j+1)*8;i++)
cout<<ans[i];
cout<<endl;
}
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |