| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1300322 | tab | Kartomat (COCI17_kartomat) | C++20 | 1 ms | 584 KiB |
#include "bits/stdc++.h"
using namespace std;
#define intt int
#define fi first
#define se second
const intt mxN = 2e5 + 5;
const intt LG = 20;
const intt inf = 1e18;
intt n;
vector<string> key(5);
vector<string> label;
map<char,intt> safe;
void _() {
key[0] = "***ABCDE";
key[1] = "FGHIJKLM";
key[2] = "NOPQRSTU";
key[3] = "VWXYZ***";
cin >> n;
for(intt i = 0; i < n; i++) {
string a;
cin >> a;
label.push_back(a);
}
string pre;
cin >> pre;
for(intt i = 0; i < n; i++){
string po = "";
for(intt j = 0; j < label[i].size(); j++) {
po += label[i][j];
if(po == pre && j + 1 <= label[i].size()-1) {
safe[label[i][j+1]]=1;
}
}
}
for(intt i = 0; i <= 3; i++){
for(intt j = 0; j <= 7; j++){
if(!safe[key[i][j]]) {
cout << "*";
} else {
cout << key[i][j];
}
}
cout << endl;
}
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
intt t = 1, buu = 1;
// cin >> t;
while(t--){
// cout << "Case #" << buu++ << ": ";
_();
}
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
