# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
23196 | model_code | Marko (COCI15_marko) | C++11 | 29 ms | 2680 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <vector>
#include <string>
using namespace std;
int n;
vector <string> V;
int dig[] = {0, 3, 3, 3, 3, 3, 4, 3, 4};
char set_digit (char x) {
int digpos = 0;
int pos = x - 'a' + 1;
while (pos > 0)
pos -= dig[digpos++];
return '0' + digpos;
}
int main (void){
cin >> n;
for (int i = 0; i < n; ++i) {
string str;
cin >> str;
for (auto &x: str)
x = set_digit(x);
V.push_back(str);
}
string s;
cin >> s;
int ans = 0;
for (auto x: V)
ans += s == x;
printf("%d\n", ans);
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |