제출 #94928

#제출 시각아이디문제언어결과실행 시간메모리
94928MohamedAhmed0Karte (COCI15_karte)C++14
50 / 50
2 ms380 KiB
#include <bits/stdc++.h> using namespace std; int main() { string s ; cin>>s ; map< pair<char ,int> , int>mp ; map<char , int>ans ; for(int i = 0 ; i < s.size() ; ++i) { if(s[i] >= '0' && s[i] <= '9') continue; int num = 0 ; for(int j = i+1 ; j <= i+2 ; ++j) num = num * 10 + (s[j]-'0') ; if(mp[{s[i] , num}] == 0) mp[{s[i] , num}] = 1 , ans[s[i]]++; else return cout<<"GRESKA\n" , 0 ; } return cout<<13 - ans['P']<<" "<<13 - ans['K']<<" "<<13 - ans['H']<<" "<<13 - ans['T']<<"\n" , 0 ; }

컴파일 시 표준 에러 (stderr) 메시지

karte.cpp: In function 'int main()':
karte.cpp:11:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i = 0 ; i < s.size() ; ++i)
                     ~~^~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...