# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
994021 | 2024-06-07T03:09:55 Z | vjudge1 | Kartomat (COCI17_kartomat) | C++17 | 1 ms | 348 KB |
#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
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 0 ms | 348 KB | Output is correct |
7 | Correct | 0 ms | 348 KB | Output is correct |
8 | Correct | 0 ms | 348 KB | Output is correct |
9 | Correct | 1 ms | 348 KB | Output is correct |
10 | Correct | 1 ms | 348 KB | Output is correct |