67272023-12-18 11:15:58GhostMorze (60 pont)cpp17Wrong answer 18/603ms3456 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 < 9; j++) {
            if (out[i] == morse[j]) {
                cout << j;
                break;
            }
        }
    }
}
SubtaskSumTestVerdictTimeMemory
base18/60
1Wrong answer0/03ms1808 KiB
2Wrong answer0/03ms2064 KiB
3Accepted3/33ms2276 KiB
4Accepted3/33ms2316 KiB
5Accepted3/33ms2312 KiB
6Accepted3/33ms2568 KiB
7Accepted3/33ms2652 KiB
8Accepted3/33ms2784 KiB
9Wrong answer0/43ms3004 KiB
10Wrong answer0/43ms3220 KiB
11Wrong answer0/43ms3188 KiB
12Wrong answer0/73ms3196 KiB
13Wrong answer0/73ms3196 KiB
14Wrong answer0/83ms3200 KiB
15Wrong answer0/83ms3456 KiB