Submission #153855

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
1538552019-09-17 05:05:49AlexPascu007Karte (COCI15_karte)C++98
50 / 50
3 ms400 KiB
#include <iostream>
#include <cstring>
using namespace std;
int i,l,x,p[15],k[15],h[15],t[15],sp,sk,sh,st;
char s[1010];
int main() {
cin>>s;
l=strlen(s);
for (i=0;i<l;i+=3) {
if (s[i]=='P') {
if (s[i+1]=='0') {
x=s[i+2]-'0';
p[x]++;
}
else {
x=(s[i+1]-'0')*10+(s[i+2]-'0');
p[x]++;
}
}
else if (s[i]=='K') {
if (s[i+1]=='0') {
x=s[i+2]-'0';
k[x]++;
}
else {
x=(s[i+1]-'0')*10+(s[i+2]-'0');
k[x]++;
}
}
else if (s[i]=='H') {
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...