# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
959135 | Ariadna | Marko (COCI15_marko) | C++14 | 11 ms | 1112 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |