70402023-12-28 19:35:50MagyarKendeSZLGMorze (60 pont)cpp17Accepted 60/603ms3792 KiB
#include <bits/stdc++.h>

#define speed cin.tie(0); ios::sync_with_stdio(0)

using namespace std;

int main() {
    speed;

    map<string, int> m = {
        {"-----", 0},
        {".----", 1},
        {"..---", 2},
        {"...--", 3},
        {"....-", 4},
        {".....", 5},
        {"-....", 6},
        {"--...", 7},
        {"---..", 8},
        {"----.", 9},
    };
    string s;
    cin >> s;
    for (int i = 0; i < s.size(); i += 5) {
        cout << m[s.substr(i, 5)];
    }
}
SubtaskSumTestVerdictTimeMemory
base60/60
1Accepted0/03ms1828 KiB
2Accepted0/03ms2056 KiB
3Accepted3/33ms2268 KiB
4Accepted3/33ms2440 KiB
5Accepted3/33ms2652 KiB
6Accepted3/33ms2868 KiB
7Accepted3/33ms2952 KiB
8Accepted3/33ms2952 KiB
9Accepted4/43ms3192 KiB
10Accepted4/43ms3428 KiB
11Accepted4/43ms3508 KiB
12Accepted7/73ms3628 KiB
13Accepted7/73ms3696 KiB
14Accepted8/83ms3792 KiB
15Accepted8/83ms3780 KiB