Submission #339806

#TimeUsernameProblemLanguageResultExecution timeMemory
339806ammar2000Marko (COCI15_marko)C++17
50 / 50
18 ms1132 KiB
#include <bits/stdc++.h> using namespace std; string s; char l[]={'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+=l[in[i]-'a'];} mp[s]++; //cout <<s; s.clear(); } cin>>s; cout <<mp[s]; return 0; }

Compilation message (stderr)

marko.cpp: In function 'int main()':
marko.cpp:14:23: 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...