17532022-12-02 19:29:21levente19Morze (60 pont)cpp11Accepted 60/603ms3780 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;

    string vissza[] = {
        "-----",
        ".----",
        "..---",
        "...--",
        "....-",
        ".....",
        "-....",
        "--...",
        "---..",
        "----."
    };

    for(int i = 0; i < m.size(); i += 5) {
        string curr = m.substr(i, 5);
        int num = 0;
        while(curr != vissza[num]) num++;
        cout << num;
    }

    cout << endl;

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base60/60
1Accepted0/03ms1828 KiB
2Accepted0/02ms2056 KiB
3Accepted3/32ms2256 KiB
4Accepted3/32ms2432 KiB
5Accepted3/32ms2784 KiB
6Accepted3/32ms2784 KiB
7Accepted3/32ms2876 KiB
8Accepted3/32ms2948 KiB
9Accepted4/42ms2944 KiB
10Accepted4/42ms3080 KiB
11Accepted4/42ms3296 KiB
12Accepted7/72ms3492 KiB
13Accepted7/72ms3560 KiB
14Accepted8/82ms3564 KiB
15Accepted8/82ms3780 KiB