Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: cyblox_boi

Problemset: Sign Factory

Language: cpp

Time: 0.003 second

Submitted On: 2026-01-01 01:40:48

#include <bits/stdc++.h>
using namespace std;

void printPattern(int type, int textLength, bool isReverse)
{
    vector<string> patterns = {"^#^*#*", "#*##^#"};

    cout << string(3, '#');

    if (!isReverse)
    {
        for (int j = 0; j < textLength * 3; j++)
        {
            cout << patterns[type][j % 6];
        }
    }
    else
    {
        for (int j = textLength * 3 - 1; j >= 0; j--)
        {
            cout << patterns[type][j % 6];
        }
    }

    cout << string(3, '#');
}

void printText(string &text, bool isCenter)
{
    cout << string(3, '#');

    if (isCenter)
    {
        cout << string(text.length(), ' ') << text << string(text.length(), ' ');
    }
    else
    {
        cout << string(text.length() * 3, '-');
    }

    cout << string(3, '#');
}

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

    string text;
    cin >> text;

    int space = 2;

    for (int i = 0; i < 2; i++, space--)
    {
        cout << string(space, ' ');

        printPattern(i, text.length(), false);

        cout << string(2 - space, ' ') << "||";
        cout << string(2 - space, ' ');

        printPattern(i, text.length(), true);

        cout << '\n';
    }

    for (int i = 0; i < 3; i++)
    {
        printText(text, i == 1);

        cout << string(2 - space, ' ') << "||";
        cout << string(2, ' ');

        printText(text, i == 1);

        cout << '\n';
    }

    space = 1;

    for (int i = 1; i >= 0; i--, space++)
    {
        cout << string(space, ' ');

        printPattern(i, text.length(), false);

        cout << string(2 - space, ' ') << "||";
        cout << string(2 - space, ' ');

        printPattern(i, text.length(), true);

        cout << '\n';
    }

    return 0;
}