# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
82796 | xiaowuc1 | Marko (COCI15_marko) | C++14 | 22 ms | 2844 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;
typedef long long ll;
int idx[256];
int main() {
idx['a'] = 2;
idx['b'] = 2;
idx['c'] = 2;
idx['d'] = 3;
idx['e'] = 3;
idx['f'] = 3;
idx['g'] = 4;
idx['h'] = 4;
idx['i'] = 4;
idx['j'] = 5;
idx['k'] = 5;
idx['l'] = 5;
idx['m'] = 6;
idx['n'] = 6;
idx['o'] = 6;
idx['p'] = 7;
idx['q'] = 7;
idx['r'] = 7;
idx['s'] = 7;
idx['t'] = 8;
idx['u'] = 8;
idx['v'] = 8;
idx['w'] = 9;
idx['x'] = 9;
idx['y'] = 9;
idx['z'] = 9;
int n;
cin >> n;
vector<string> v;
while(n--) {
string s;
cin >> s;
v.push_back(s);
}
int ret = 0;
string want;
cin >> want;
for(string out: v) {
bool good = out.size() == want.size();
for(int i = 0; good && i < out.size(); i++) {
good = idx[out[i]] == want[i] - '0';
}
if(good) ret++;
}
printf("%d\n", ret);
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |