# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
713797 | 2023-03-23T04:49:24 Z | Dulguun88 | Karte (COCI15_karte) | C++14 | 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] ; t+=s[i+1]; t+=s[i+2] ; //cout<<t<<endl; 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
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 1 ms | 212 KB | Output is correct |
3 | Correct | 1 ms | 212 KB | Output is correct |
4 | Correct | 1 ms | 296 KB | Output is correct |
5 | Correct | 1 ms | 212 KB | Output is correct |
6 | Correct | 1 ms | 300 KB | Output is correct |
7 | Correct | 1 ms | 212 KB | Output is correct |
8 | Correct | 0 ms | 212 KB | Output is correct |
9 | Correct | 1 ms | 296 KB | Output is correct |
10 | Correct | 0 ms | 212 KB | Output is correct |