# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
704692 | delrey | Karte (COCI15_karte) | C++14 | 1 ms | 296 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
bool k[4][20];
int kn[4] = {13, 13, 13, 13};
int main()
{
string s;
cin>>s;
int n = s.length();
for(int i = 0; i < n; i += 3)
{
int num = (s[i + 1] - '0') * 10 + (s[i + 2] - '0'), suit;
if(s[i] == 'P')
suit = 0;
if(s[i] == 'K')
suit = 1;
if(s[i] == 'H')
suit = 2;
if(s[i] == 'T')
suit = 3;
if(k[suit][num])
{
cout<<"GRESKA"<<endl;
return 0;
}
k[suit][num] = true;
kn[suit]--;
}
for(int i = 0; i < 4; i++)
cout<<kn[i]<<" ";
return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |