# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
105875 | leonarda | Kartomat (COCI17_kartomat) | C++14 | 3 ms | 512 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define F first
#define S second
typedef pair<int, int> pi;
typedef long long int lint;
const int inf = 0x3f3f3f3f;
const int maxn = 0;
int n;
char tip[4][8];
string s[55];
string poc;
bool moze[30];
bool fuki(string t) {
for(int i = 0; i < poc.size(); ++i)
if(t[i] != poc[i])
return 0;
return 1;
}
int main ()
{
ios::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
tip[0][0] = tip[0][1] = tip[0][2] = tip[3][7] = tip[3][6] = tip[3][5] = '*';
int cur = 0;
for(int i = 0; i < 4; ++i) {
for(int j = 0; j < 8; ++j) {
if(tip[i][j] != '*') {
tip[i][j] = cur + 'A';
++cur;
}
}
}
cin >> n;
for(int i = 0; i < n; ++i)
cin >> s[i];
cin >> poc;
for(int i = 0; i < n; ++i)
if(fuki(s[i]))
moze[s[i][poc.size()] - 'A'] = 1;
for(int i = 0; i < 4; ++i) {
for(int j = 0; j < 8; ++j) {
if(tip[i][j] != '*') if( ! moze[tip[i][j] - 'A'])
tip[i][j] = '*';
cout << tip[i][j];
}
cout << endl;
}
return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |