# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
977211 | lemma_holla | Karte (COCI15_karte) | C++17 | 1 ms | 504 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
vector<string> p, k, h, t;
string s;
cin >> s;
string x;
int f = 0;
for (int i = 0; i < s.size(); i += 3){
x = s.substr(i + 1, 2);
if (s[i] == 'P'){
if (count(p.begin(), p.end(), x) > 0){
cout << "GRESKA";
f = 1;
break;
}
else{
p.push_back(x);
}
}
else if (s[i] == 'H'){
if (count(h.begin(), h.end(), x) > 0){
cout << "GRESKA";
f = 1;
break;
} else{
h.push_back(x);
}
}
else if (s[i] == 'K'){
if (count(k.begin(), k.end(), x) > 0){
cout << "GRESKA";
f = 1;
break;
} else{
k.push_back(x);
}
}
else if (s[i] == 'T'){
if (count(t.begin(), t.end(), x) > 0){
cout << "GRESKA";
f = 1;
break;
} else{
t.push_back(x);
}
}
}
if (f == 0){
cout << 13 - p.size() << " " << 13 - k.size() << " " << 13 - h.size() << " " << 13 - t.size();
}
return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |