17522022-12-02 19:23:52levente19Morze (60 pont)cpp11Wrong answer 23/603ms4260 KiB
#include <bits/stdc++.h>
#define gyorsan ios::sync_with_stdio(0);cin.tie(0)

using namespace std;

int main()
{
    gyorsan;

    string m;
    cin >> m;

    vector<int> digits;

    for(int i = 0; i < m.size(); i += 5) {
        string curr = m.substr(i, 5);
        int num;
        if(curr == "-----") num = 0;
        else if(curr == ".----") num = 2;
        else if(curr == "..---") num = 3;
        else if(curr == "...--") num = 3;
        else if(curr == "....-") num = 4;
        else if(curr == ".....") num = 5;
        else if(curr == "-....") num = 6;
        else if(curr == "--...") num = 7;
        else if(curr == "---..") num = 8;
        else num = 9;
        digits.push_back(num);
    }

    for(int i : digits) {
        cout << i;
    }

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base23/60
1Wrong answer0/03ms1832 KiB
2Wrong answer0/02ms2156 KiB
3Accepted3/32ms2104 KiB
4Accepted3/32ms2292 KiB
5Wrong answer0/32ms2500 KiB
6Accepted3/32ms2708 KiB
7Accepted3/32ms3060 KiB
8Accepted3/32ms3264 KiB
9Accepted4/42ms3328 KiB
10Wrong answer0/42ms3536 KiB
11Accepted4/42ms3740 KiB
12Wrong answer0/72ms3740 KiB
13Wrong answer0/72ms4108 KiB
14Wrong answer0/82ms4260 KiB
15Wrong answer0/82ms4100 KiB