132572025-01-07 11:05:35PKBMorze (60 pont)cpp17Accepted 60/601ms540 KiB
#include <iostream>
#include <vector>

using namespace std;

int main() {
    vector<string> morze;

    morze.push_back("-----");
    morze.push_back(".----");
    morze.push_back("..---");
    morze.push_back("...--");
    morze.push_back("....-");

    morze.push_back(".....");
    morze.push_back("-....");
    morze.push_back("--...");
    morze.push_back("---..");
    morze.push_back("----.");

    string szam_morze;
    cin >> szam_morze;
    vector<int> szam;
    string temp;



    for (int i = 0; i < szam_morze.size() / 5; i++) {
        temp = szam_morze.substr(i*5, 5);
        for (int j = 0; j < 10; j++) {
            if (temp == morze[j]) {

                szam.push_back(j);
            }
        }

    }





    for (int i = 0; i < szam.size(); i++) {
        cout << szam[i];
    }




}
SubtaskSumTestVerdictTimeMemory
base60/60
1Accepted0/01ms508 KiB
2Accepted0/01ms508 KiB
3Accepted3/31ms316 KiB
4Accepted3/31ms316 KiB
5Accepted3/31ms316 KiB
6Accepted3/31ms316 KiB
7Accepted3/31ms540 KiB
8Accepted3/31ms316 KiB
9Accepted4/41ms368 KiB
10Accepted4/41ms316 KiB
11Accepted4/41ms508 KiB
12Accepted7/71ms316 KiB
13Accepted7/71ms316 KiB
14Accepted8/81ms316 KiB
15Accepted8/81ms316 KiB