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