Submission #95297

#TimeUsernameProblemLanguageResultExecution timeMemory
95297karlopuhMarko (COCI15_marko)C++14
0 / 50
28 ms1528 KiB
#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'){ cout<<"?"; 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)

marko.cpp: In function 'int main()':
marko.cpp:15:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int j=0;j<r.length();j++){
               ~^~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...