# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
95298 | karlopuh | Marko (COCI15_marko) | C++14 | 24 ms | 888 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
vector <string > iz;
int brojac;
int main(){
int n;
cin>>n;
for(int i=0;i<n;i++){
string r;
cin>>r;
string f;
for(int j=0;j<r.length();j++){
if(r[j]>='a' && r[j]<='c'){
f+="2";
}
else if(r[j]>='d' && r[j]<='f'){
f+="3";
}
else if(r[j]>='g' && r[j]<='i'){
f+="4";
}
else if(r[j]>='j' && r[j]<='l'){
f+="5";
}
else if(r[j]>='m' && r[j]<='o'){
f+="6";
}
else if(r[j]>='p' && r[j]<='s'){
f+="7";
}
else if(r[j]>='t' && r[j]<='v'){
f+="8";
}
else if(r[j]>='w' && r[j]<='z'){
f+="9";
}
}
iz.push_back(f);
}
string unos;
cin>>unos;
for(int i = 0; i < n; i++){
if(iz[i]==unos)brojac++;
}
cout<<brojac;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |