# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
182404 | 2020-01-09T17:34:34 Z | XmtosX | Kartomat (COCI17_kartomat) | C++17 | 2 ms | 376 KB |
#include <bits/stdc++.h> using namespace std; string ans="*******************************************",a; vector <string> s; int n; void fin() { for (int i=0;i<4;i++) { for (int j=0;j<8;j++) cout <<ans[j+i*8]; cout <<endl; } } int main() { cin >>n; for (int i=0;i<n;i++) { cin >>a; s.push_back(a); } cin >>a; for (int i=0;i<s.size();i++) { if (s[i].size()<=a.size()||s[i].substr(0,a.size())!=a) { s.erase(s.begin()+i); i--; } } for (int i=0;i<s.size();i++) { ans[s[i][a.size()]-'A'+3]=s[i][a.size()]; } fin(); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 256 KB | Output is correct |
2 | Correct | 2 ms | 376 KB | Output is correct |
3 | Correct | 2 ms | 376 KB | Output is correct |
4 | Correct | 2 ms | 256 KB | Output is correct |
5 | Correct | 2 ms | 376 KB | Output is correct |
6 | Correct | 2 ms | 256 KB | Output is correct |
7 | Correct | 2 ms | 256 KB | Output is correct |
8 | Correct | 2 ms | 252 KB | Output is correct |
9 | Correct | 2 ms | 256 KB | Output is correct |
10 | Correct | 2 ms | 256 KB | Output is correct |