Submission #999230

#TimeUsernameProblemLanguageResultExecution timeMemory
999230AliHasanliMarko (COCI15_marko)C++17
50 / 50
9 ms1156 KiB
#include <bits/stdc++.h> using namespace std; string s; char c[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'}; int n; map<string,int>mp; int main() { cin>>n; while (n--) { string in; cin>>in; for(int i=0;i<in.length();i++) s+=c[in[i]-'a']; mp[s]++; s.clear(); } cin>>s; cout<<mp[s]; return 0; }

Compilation message (stderr)

marko.cpp: In function 'int main()':
marko.cpp:14:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   14 |         for(int i=0;i<in.length();i++)
      |                     ~^~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...