# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
959135 | Ariadna | Marko (COCI15_marko) | C++14 | 11 ms | 1112 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;
int main() {
int n;
cin >> n;
unordered_map<string, int> dictionary;
dictionary.reserve(n);
while (n--) {
string s, new_s = "";
cin >> s;
for (char c : s) {
if (c <= 'c') new_s += '2';
else if (c <= 'f') new_s += '3';
else if (c <= 'i') new_s += '4';
else if (c <= 'l') new_s += '5';
else if (c <= 'o') new_s += '6';
else if (c <= 's') new_s += '7';
else if (c <= 'v') new_s += '8';
else new_s += '9';
}
dictionary[new_s]++;
}
string s;
cin >> s;
cout << dictionary[s] << '\n';
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |