158272025-03-03 23:05:32rennMorze (60 pont)cpp17Accepted 60/601ms508 KiB
#include <bits/stdc++.h>
using namespace std;

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(0);

    int bifa[] = {5, 4, 0, 3, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 6, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 8, 0, 9, 0};

    int curr = 0;
    char c;
    int state;
    cin >> c;
    while(cin)
    {
        state = 0;
        for(int i = 0; i < 5; i++)
        {
            state = state*2+1 + (c == '-');
            cin >> c;
        }
        cout << bifa[state-31];
    }
    cout << "\n";
}
SubtaskSumTestVerdictTimeMemory
base60/60
1Accepted0/01ms316 KiB
2Accepted0/01ms508 KiB
3Accepted3/31ms316 KiB
4Accepted3/31ms316 KiB
5Accepted3/31ms316 KiB
6Accepted3/31ms316 KiB
7Accepted3/31ms508 KiB
8Accepted3/31ms316 KiB
9Accepted4/41ms364 KiB
10Accepted4/41ms316 KiB
11Accepted4/41ms500 KiB
12Accepted7/71ms316 KiB
13Accepted7/71ms316 KiB
14Accepted8/81ms316 KiB
15Accepted8/81ms316 KiB