Submission #165898

# Submission time Handle Problem Language Result Execution time Memory
165898 2019-11-29T14:06:03 Z itiam Marko (COCI15_marko) C++11
50 / 50
65 ms 32652 KB
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <sstream>

using namespace std;

char La[26]={'2','2','2','3','3','3','4','4','4','5','5','5','6','6','6','7','7','7','7','8','8','8','9','9','9','9'};
string Lb[1000003];

int main(){
    string s,s2="",br;
    int N,b2,x;
    cin >> N;
    for (int i=0;i<N;i++){
        cin >> s;
        s2="";
        b2=0;
        x=s.length();
        for (int j=0;j<x;j++){
            s2+=La[(int)s[j]-97];
        }
        Lb[i]=s2;
    }
    int bro=0;
    cin >> br;
    for (int i=0;i<N;i++){
        if (Lb[i]==br)  bro+=1;
    }
    cout << bro;
    return 0;
}

Compilation message

marko.cpp: In function 'int main()':
marko.cpp:13:11: warning: variable 'b2' set but not used [-Wunused-but-set-variable]
     int N,b2,x;
           ^~
# Verdict Execution time Memory Grader output
1 Correct 31 ms 31608 KB Output is correct
2 Correct 31 ms 31676 KB Output is correct
3 Correct 33 ms 31608 KB Output is correct
4 Correct 64 ms 32652 KB Output is correct
5 Correct 36 ms 31864 KB Output is correct
6 Correct 36 ms 31736 KB Output is correct
7 Correct 50 ms 32248 KB Output is correct
8 Correct 65 ms 32632 KB Output is correct
9 Correct 35 ms 31736 KB Output is correct
10 Correct 55 ms 32376 KB Output is correct