# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
486120 | groupATSU | Karte (COCI15_karte) | C++14 | 0 ms | 204 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define ll long long
const ll inf=1e9;
const int maxn=100;
const ll mod=1e9+7;
void solve(){
string s;
cin>>s;
map <string,int> used;
int cnt1=13,cnt2=13,cnt3=13,cnt4=13;
for(int i=0;i<s.size()-2;i+=3){
string helper="";
helper+=s[i];
helper+=s[i+1];
helper+=s[i+2];
if(used[helper]==1){
cout<<"GRESKA";
return ;
}
used[helper]++;
if(s[i]=='P')cnt1--;
else if(s[i]=='K')cnt2--;
else if(s[i]=='H')cnt3--;
else cnt4--;
}
cout<<cnt1<<" "<<cnt2<<" "<<cnt3<<" "<<cnt4;
}
int main(){
//ios_base::sync_with_stdio(false);
//cin.tie(NULL);
int t=1;
//cin>>t;
while(t--){
solve();
cout<<'\n';
}
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |