# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
87852 | jvalsortav | Marko (COCI15_marko) | C++14 | 87 ms | 3056 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 <cstdio>
#include <cstdlib>
#include <cmath>
#include <iostream>
#include <cctype>
#include <ctime>
#include <set>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <utility>
#include <string>
#include <map>
#include <string.h>
using namespace std;
int n, l, b;
vector <string> v;
string s, t, m;
bool inf;
int main() {
cin >> n;
for (int i = 0; i < n; i++){
cin >> s;
v.push_back(s);
}
cin >> t;
l = s.size();
for (vector <string> :: iterator it = v.begin(); it != v.end(); it++){
inf = true;
s = *it;
/*cout << "hmmmmmmmmmm " << *it << endl;*/
for (int j = 0; j < l; j++){
if (s.substr(j, 1) >= "a" and s.substr(j, 1) <= "c"){
m = "2";
}
if (s.substr(j, 1) >= "d" and s.substr(j, 1) <= "f"){
m = "3";
}
if (s.substr(j, 1) >= "g" and s.substr(j, 1) <= "i"){
m = "4";
}
if (s.substr(j, 1) >= "j" and s.substr(j, 1) <= "l"){
m = "5";
}
if (s.substr(j, 1) >= "m" and s.substr(j, 1) <= "o"){
m = "6";
}
if (s.substr(j, 1) >= "p" and s.substr(j, 1) <= "s"){
m = "7";
}
if (s.substr(j, 1) >= "t" and s.substr(j, 1) <= "v"){
m = "8";
}
if (s.substr(j, 1) >= "w" and s.substr(j, 1) <= "z"){
m = "9";
}
/*cout << s.substr(j, 1) << " "<< m << endl;*/
if (m != t.substr(j, 1)){
inf = false;
break;
}
}
if (inf) b++;
}
cout << b;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |