답안 #838652

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
838652 2023-08-27T14:09:05 Z vjudge1 Karte (COCI15_karte) C++17
50 / 50
1 ms 320 KB
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define OYY 1000000005
#define mod 998244353
#define faster ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define mid (start+end)/2
map<string,int> mp1,mp2;

int32_t main(){
    faster
    string s;cin>>s;
    int n=s.length();
    for(int i=0;i<n;i+=3){
        string st="";
        st+=s[i];
        mp1[st]++;
        st+=s[i+1];
        st+=s[i+2];
        if(mp2[st]!=0){
            cout<<"GRESKA"<<'\n';
            return 0;
        }
        mp2[st]++;
    }
    cout<<13-mp1["P"]<<" "<<13-mp1["K"]<<" "<<13-mp1["H"]<<" "<<13-mp1["T"]<<'\n';
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 316 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 0 ms 320 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct