Submission #165898

#TimeUsernameProblemLanguageResultExecution timeMemory
165898itiamMarko (COCI15_marko)C++11
50 / 50
65 ms32652 KiB
#include <iostream> #include <algorithm> #include <cstdio> #include <sstream> using namespace std; char La[26]={'2','2','2','3','3','3','4','4','4','5','5','5','6','6','6','7','7','7','7','8','8','8','9','9','9','9'}; string Lb[1000003]; int main(){ string s,s2="",br; int N,b2,x; cin >> N; for (int i=0;i<N;i++){ cin >> s; s2=""; b2=0; x=s.length(); for (int j=0;j<x;j++){ s2+=La[(int)s[j]-97]; } Lb[i]=s2; } int bro=0; cin >> br; for (int i=0;i<N;i++){ if (Lb[i]==br) bro+=1; } cout << bro; return 0; }

Compilation message (stderr)

marko.cpp: In function 'int main()':
marko.cpp:13:11: warning: variable 'b2' set but not used [-Wunused-but-set-variable]
     int N,b2,x;
           ^~
#Verdict Execution timeMemoryGrader output
Fetching results...