67352023-12-18 12:27:05GhostMorze (60 pont)cpp17Accepted 60/603ms3628 KiB
#include <iostream>
#include <string>
#include <vector>

using namespace std;

int main()
{
    vector<string> morse = {"-----", ".----", "..---", "...--", "....-", ".....", "-....", "--...", "---..", "----."};
    string code;
    cin >> code;
    
    vector<string> out(code.size() / 5);
    for (int i = 0; i < out.size(); i++) {
        for (int j = 0; j < 5; j++) {
            out[i].push_back(code[j + 5 * i]);
        }
    }
    for (int i = 0; i < out.size(); i++) {
        for (int j = 0; j < 10; j++) {
            if (out[i] == morse[j]) {
                cout << j;
                break;
            }
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base60/60
1Accepted0/03ms2088 KiB
2Accepted0/03ms2320 KiB
3Accepted3/33ms2348 KiB
4Accepted3/33ms2448 KiB
5Accepted3/33ms2700 KiB
6Accepted3/33ms2868 KiB
7Accepted3/33ms2920 KiB
8Accepted3/33ms3160 KiB
9Accepted4/43ms3132 KiB
10Accepted4/43ms3288 KiB
11Accepted4/43ms3280 KiB
12Accepted7/73ms3312 KiB
13Accepted7/73ms3388 KiB
14Accepted8/83ms3392 KiB
15Accepted8/83ms3628 KiB