Submission #165847

# Submission time Handle Problem Language Result Execution time Memory
165847 2019-11-29T10:29:59 Z itiam Marko (COCI15_marko) C++11
0 / 50
8 ms 632 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'};
long long Lb[1000003];

int main(){
    long long N,b2,br;
    string s,s2="";
    cin >> N;
    for (int i=0;i<N;i++){
        cin >> s;
        s2="";
        b2=0;
        for (long long j=0;j<s.length();j++){
            s2+=La[(int)s[j]-97];
        }
        stringstream pmc(s2);   //pmc - pomocna varijabla
        pmc >> b2;
        Lb[b2]+=1;
    }
    cin >> br;
    cout << Lb[br];
    return 0;
}

Compilation message

marko.cpp: In function 'int main()':
marko.cpp:19:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (long long j=0;j<s.length();j++){
                            ~^~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Runtime error 3 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Runtime error 3 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
3 Runtime error 3 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)
4 Runtime error 4 ms 632 KB Execution killed with signal 11 (could be triggered by violating memory limits)
5 Incorrect 7 ms 376 KB Output isn't correct
6 Incorrect 7 ms 376 KB Output isn't correct
7 Runtime error 3 ms 376 KB Execution killed with signal 11 (could be triggered by violating memory limits)
8 Runtime error 8 ms 632 KB Execution killed with signal 11 (could be triggered by violating memory limits)
9 Incorrect 7 ms 376 KB Output isn't correct
10 Runtime error 4 ms 504 KB Execution killed with signal 11 (could be triggered by violating memory limits)