답안 #604108

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
604108 2022-07-24T18:17:54 Z Hussein3600 Karte (COCI15_karte) C++14
10 / 50
1 ms 300 KB
#include<bits/stdc++.h>
using namespace std ;
typedef long long ll ;
int main()
{
    map<string,ll> mp ;
    bool ok=true;
    map<char,ll> p;
    string s , t;
    cin >> s ;
    for(int i=0;i<s.size();i+=3)
    {
        t="";
        t+=s[i]+s[i+1]+s[i+2] ;
        if(mp[t]>0)ok=false;
        mp[t]++;
        p[s[i]]++;
    }
    if(ok)
    cout<<13-p['P']<<" "<<13-p['K']<<" "<<13-p['H']<<" "<<13-p['T']<<endl;
    else cout<<"GRESKA";
}

Compilation message

karte.cpp: In function 'int main()':
karte.cpp:11:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   11 |     for(int i=0;i<s.size();i+=3)
      |                 ~^~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Incorrect 1 ms 300 KB Output isn't correct
3 Correct 1 ms 212 KB Output is correct
4 Incorrect 1 ms 212 KB Output isn't correct
5 Incorrect 1 ms 212 KB Output isn't correct
6 Incorrect 1 ms 212 KB Output isn't correct
7 Incorrect 0 ms 212 KB Output isn't correct
8 Incorrect 0 ms 212 KB Output isn't correct
9 Incorrect 1 ms 296 KB Output isn't correct
10 Correct 1 ms 212 KB Output is correct