来完善头文件吧!!!

#include <iostream>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <ctime>

#ifndef UNTITLED_MINE_H
#define UNTITLED_MINE_H

#endif //UNTITLED_MINE_H

#define PI 3.141592653

#define start_random() srand(time(nullptr))

#define BLACK 0
#define RED 1
#define GREEN 2
#define YELLOW 3
#define BLUE 4
#define PURPLE 5
#define CYAN 6
#define WHITE 7
#define NOTHING 8

#define RGB_BLACK 0, 0, 0
#define RGB_RED 255, 0, 0
#define RGB_GREEN 0, 255, 0
#define RGB_BLUE 0, 0, 255
#define RGB_YELLO 255, 255, 0
#define RGB_PURPLE 255, 0, 255
#define RGB_CYAN 0, 255, 255
#define RGB_ORANGE 255, 150, 50
#define RGB_PINK 255, 175, 255
#define RGB_WHIGHT 255, 255, 255

struct HIGH;

long long m_random(long long begin, long long end);

int int_input();

long long llong_input();

float float_input();

double double_input();

char getch(const std::string want);

void nums_input_int(int num[], int lenth);

void nums_input_llong(long long num[], int lenth);

void nums_input_float(float num[], int lenth);

void nums_input_double(double num[], int lenth);

int max(int num_1, int num_2);

int min(int num_1, int num_2);

int max_of(int num[], int lenth);

int min_of(int num[], int lenth);

int max_n_of(int num[], int lenth);

int min_n_of(int num[], int lenth);

long long sum_of(int num[], int lenth);

int num_size(int num);

bool is_prime(int num);

unsigned long long fibonacci(unsigned int count);

int gcd(int num_1, int num_2);

int lcm(int num_1, int num_2);

unsigned long long factorial(int num);

bool is_num_ch(char ch);

bool is_letter_ch(char ch);

bool is_big_letter_ch(char ch);

bool is_small_letter_ch(char ch);

void to_big(char &ch);

void to_small(char &ch);

void all_turn_to_big(std::string &str);

void all_turn_to_small(std::string &str);

void clean_line();

namespace sp_draw {
    void s_color(int back_col, int str_col);

    void s_str_color(int red, int green, int blue);

    void s_back_color(int red, int green, int blue);

    void s_under_line();

    void s_big_under_l();

    void s_mid_line();

    void s_light_font();

    void s_slant_font();

    void s_back_draw();

    void s_box(int which);

    void end_sp_draw();
}

HIGH to_high(long long num);

HIGH pow(HIGH num, int n);


//-------------------------------------------------------------------------------------------------------------------------------------------------------------


struct HIGH {
    char num[5000] = {};
    int size = 1;
    bool is_neg = false;

    void input()
    {
        std::string tmp = "";

        std::cin >> tmp;
        memset(num, 0, 5000);

        size = tmp.size();
        if (tmp[0] == '-') {
            is_neg = true;
            --size;
            int size_tmp = tmp.size();
            for (int i = 0; i < size_tmp; ++i)
                tmp[i] = tmp[i + 1];
        } else {
            is_neg = false;
        }
        for (int i = 0, j = size - 1; i < size; ++i, --j)
            num[i] = tmp[j] - '0';
    }

    void print(const std::string behind)
    {
        if (is_neg)
            printf("-");
        for (int i = size - 1; i >= 0; --i) {
            printf("%d", num[i]);
        }
        std::cout << behind;
    }

    bool all_zero()
    {
        for (int i = 0; i < size; ++i) {
            if (num[i] != 0)
                return false;
        }
        is_neg = false;
        return true;
    }

    HIGH abs()
    {
        HIGH tmp;
        tmp.initial();
        tmp.size = size;
        for (int i = 0; i < size; ++i)
            tmp.num[i] = num[i];
        tmp.is_neg = false;
        return tmp;
    }

    void get_long()
    {
        while (num[size - 1] == 0 && size > 1)
            --size;
    }

    void initial()
    {
        memset(num, 0, 5000);
        size = 1;
        is_neg = false;
    }

    HIGH operator +(HIGH num_2)
    {
        HIGH ans;
        ans.size = size;
        ans.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            ans.num[i] = num[i];

        if (!ans.is_neg && !num_2.is_neg || ans.is_neg && num_2.is_neg) {
            ans.size = max(size, num_2.size);
            for (int i = 0; i < max(size, num_2.size); ++i) {
                ans.num[i] += num_2.num[i];
                if (ans.num[i] > 9) {
                    if (i == ans.size - 1)
                        ++ans.size;
                    ans.num[i + 1] += ans.num[i] / 10;
                    ans.num[i] %= 10;
                }
            }
        } else {
            if (ans.is_neg)
                std::swap(ans, num_2);
            char ans_big = -1;
            if (ans.size > num_2.size) {
                ans_big = 1;
            } else if (ans.size < num_2.size) {
                ans_big = 0;
            } else if (ans.size == num_2.size) {
                for (int i = ans.size - 1; i >= 0; --i) {
                    if (ans.num[i] > num_2.num[i]) {
                        ans_big = 1;
                        break;
                    } else if (ans.num[i] < num_2.num[i]) {
                        ans_big = 0;
                        break;
                    }
                }
            }
            if (ans_big == -1) {
                for (int i = 0; i < ans.size; ++i) {
                    ans.num[i] = 0;
                }
                ans.size = 1;
                ans.is_neg = false;

                return ans;
            }
            if (!ans_big)
                ans = num_2;
            for (int i = 0; i < ans.size; ++i) {
                ans.num[i] -= num_2.num[i];
                if (ans.num[i] < 0) {
                    --ans.num[i + 1];
                    ans.num[i] += 10;
                }
            }
            ans.get_long();
        }

        return ans;
    }

    HIGH operator +(long long num_2)
    {
        HIGH ans;
        ans.size = size;
        ans.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            ans.num[i] = num[i];

        ans = ans + to_high(num_2);

        return ans;
    }

    void operator +=(HIGH num_2)
    {
        HIGH ans;
        ans.size = size;
        ans.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            ans.num[i] = num[i];

        ans = ans + num_2;
        size = ans.size;
        is_neg = ans.is_neg;
        for (int i = 0; i < ans.size; ++i)
            num[i] = ans.num[i];
    }

    void operator +=(long long num_2)
    {
        HIGH ans;
        ans.size = size;
        ans.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            ans.num[i] = num[i];

        ans = ans + num_2;
        size = ans.size;
        is_neg = ans.is_neg;
        for (int i = 0; i < ans.size; ++i)
            num[i] = ans.num[i];
    }

    HIGH operator -(HIGH num_2)
    {
        HIGH ans;
        ans.size = size;
        ans.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            ans.num[i] = num[i];
        bool ans_big = true;

        if (ans.size > num_2.size) {
            ans_big = true;
        } else if (ans.size < num_2.size) {
            ans_big = false;
        } else {
            for (int i = ans.size - 1; i >= 0; --i) {
                if (ans.num[i] > num_2.num[i]) {
                    ans_big = true;
                    break;
                } else if (ans.num[i] < num_2.num[i]) {
                    ans_big = false;
                    break;
                }
            }
        }

        if (!ans.is_neg && !num_2.is_neg || ans.is_neg && num_2.is_neg) {
            if (ans_big) {
                for (int i = 0; i < ans.size; ++i) {
                    ans.num[i] -= num_2.num[i];
                    if (ans.num[i] < 0) {
                        --ans.num[i + 1];
                        ans.num[i] += 10;
                    }
                }
                ans.get_long();
            } else {
                std::swap(ans, num_2);
                if (ans.is_neg)
                    ans.is_neg = false;
                else
                    ans.is_neg = true;
                for (int i = 0; i < ans.size; ++i) {
                    ans.num[i] -= num_2.num[i];
                    if (ans.num[i] < 0) {
                        --ans.num[i + 1];
                        ans.num[i] += 10;
                    }
                }
                ans.get_long();
            }
        } else {
            ans.size = max(size, num_2.size);
            for (int i = 0; i < max(size, num_2.size); ++i) {
                ans.num[i] += num_2.num[i];
                if (ans.num[i] > 9) {
                    if (i == ans.size - 1)
                        ++ans.size;
                    ans.num[i + 1] += ans.num[i] / 10;
                    ans.num[i] %= 10;
                }
            }
        }

        return ans;
    }

    HIGH operator -(long long num_2)
    {
        HIGH ans;
        ans.size = size;
        ans.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            ans.num[i] = num[i];

        ans = ans - to_high(num_2);

        return ans;
    }

    void operator -=(HIGH num_2)
    {
        HIGH ans;
        ans.size = size;
        ans.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            ans.num[i] = num[i];

        ans = ans - num_2;
        size = ans.size;
        is_neg = ans.is_neg;
        for (int i = 0; i < ans.size; ++i)
            num[i] = ans.num[i];
    }

    void operator -=(long long num_2)
    {
        HIGH ans;
        ans.size = size;
        ans.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            ans.num[i] = num[i];

        ans = ans - num_2;
        size = ans.size;
        is_neg = ans.is_neg;
        for (int i = 0; i < ans.size; ++i)
            num[i] = ans.num[i];
    }

    HIGH operator *(HIGH num_2)
    {
        HIGH ans;
        ans.initial();

        for (int i = 0; i < num_2.size; ++i) {
            HIGH tmp;
            tmp.initial();
            tmp.is_neg = false;
            tmp.size = 0;
            for (int j = 0; j < i; ++j) {
                tmp.num[j] = 0;
                ++tmp.size;
            }
            tmp.size += size;
            for (int j = i, k = 0; k < size; ++k, ++j)
                tmp.num[j] = num[k];
            tmp.get_long();
            char tmp_2 = 0;
            for (int j = i; j < tmp.size; ++j) {
                tmp.num[j] *= num_2.num[i];
                tmp.num[j] += tmp_2;
                tmp_2 = 0;
                if (tmp.num[j] > 9) {
                    if (j == tmp.size - 1)
                        ++tmp.size;
                    tmp_2 = tmp.num[j] / 10;
                    tmp.num[j] %= 10;
                }
            }
            ans += tmp;
        }
        if (is_neg && num_2.is_neg || !is_neg && !num_2.is_neg)
            ans.is_neg = false;
        else
            ans.is_neg = true;

        return ans;
    }

    HIGH operator *(long long num_2)
    {
        HIGH ans;
        ans.size = size;
        ans.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            ans.num[i] = num[i];

        ans = ans * to_high(num_2);

        return ans;
    }

    void operator *=(HIGH num_2)
    {
        HIGH ans;
        ans.size = size;
        ans.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            ans.num[i] = num[i];

        ans = ans * num_2;
        size = ans.size;
        is_neg = ans.is_neg;
        for (int i = 0; i < ans.size; ++i)
            num[i] = ans.num[i];
    }

    void operator *=(long long num_2)
    {
        HIGH ans;
        ans.size = size;
        ans.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            ans.num[i] = num[i];

        ans = ans * num_2;
        size = ans.size;
        is_neg = ans.is_neg;
        for (int i = 0; i < ans.size; ++i)
            num[i] = ans.num[i];
    }

    HIGH operator /(HIGH num_2)
    {
        HIGH temp;
        temp.size = size;
        temp.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            temp.num[i] = num[i];
        if (temp.abs() < num_2.abs())
            return to_high(0);

        HIGH ans;
        ans.initial();
        ans.size = size - num_2.size + 1;
        HIGH temp2;
        temp2.initial();
        for (int i = ans.size - 1; i >= 0; --i) {
            HIGH temp_sum;
            temp_sum.initial();
            temp2.size = temp.size - i;
            for (int j = temp.size - 1, k = temp2.size - 1; k >= 0; --j, --k)
                temp2.num[k] = temp.num[j];
            temp2.get_long();
            while (temp2 >= num_2) {
                temp2 -= num_2;
                temp_sum += num_2;
                ++ans.num[i];
            }
            temp -= pow(to_high(10), i) * temp_sum;
        }
        ans.get_long();
        ans.is_neg = !(is_neg == num_2.is_neg);

        return ans;
    }

    HIGH operator /(long long num_2)
    {
        HIGH ans;
        ans.size = size;
        ans.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            ans.num[i] = num[i];

        ans = ans / to_high(num_2);

        return ans;
    }

    void operator /=(HIGH num_2)
    {
        HIGH ans;
        ans.size = size;
        ans.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            ans.num[i] = num[i];

        ans = ans / num_2;
        size = ans.size;
        is_neg = ans.is_neg;
        for (int i = 0; i < ans.size; ++i)
            num[i] = ans.num[i];
    }

    void operator /=(long long num_2)
    {
        HIGH ans;
        ans.size = size;
        ans.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            ans.num[i] = num[i];

        ans = ans / num_2;
        size = ans.size;
        is_neg = ans.is_neg;
        for (int i = 0; i < ans.size; ++i)
            num[i] = ans.num[i];
    }

    HIGH operator %(HIGH num_2)
    {
        HIGH ans;
        ans.size = size;
        ans.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            ans.num[i] = num[i];

        ans -= ans / num_2 * num_2;

        return ans;
    }

    HIGH operator %(long long num_2)
    {
        HIGH ans;
        ans.size = size;
        ans.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            ans.num[i] = num[i];

        ans = ans % to_high(num_2);

        return ans;
    }

    void operator %=(HIGH num_2)
    {
        HIGH ans;
        ans.size = size;
        ans.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            ans.num[i] = num[i];

        ans = ans % num_2;
        size = ans.size;
        is_neg = ans.is_neg;
        for (int i = 0; i < ans.size; ++i)
            num[i] = ans.num[i];
    }

    void operator %=(long long num_2)
    {
        HIGH ans;
        ans.size = size;
        ans.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            ans.num[i] = num[i];

        ans = ans % num_2;
        size = ans.size;
        is_neg = ans.is_neg;
        for (int i = 0; i < ans.size; ++i)
            num[i] = ans.num[i];
    }

    bool operator ==(HIGH num_2)
    {
        HIGH temp;
        temp.size = size;
        temp.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            temp.num[i] = num[i];
        HIGH temp_2 = num_2 - temp;
        if (temp_2.all_zero())
            return true;
        else
            return false;
    }

    bool operator ==(long long num_2)
    {
        HIGH temp;
        temp.size = size;
        temp.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            temp.num[i] = num[i];
        HIGH temp_2 = temp - num_2;
        if (temp_2.all_zero())
            return true;
        else
            return false;
    }

    bool operator !=(HIGH num_2)
    {
        HIGH temp;
        temp.size = size;
        temp.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            temp.num[i] = num[i];
        HIGH temp_2 = num_2 - temp;
        if (temp_2.all_zero())
            return false;
        else
            return true;
    }

    bool operator !=(long long num_2)
    {
        HIGH temp;
        temp.size = size;
        temp.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            temp.num[i] = num[i];
        HIGH temp_2 = temp - num_2;
        if (temp_2.all_zero())
            return false;
        else
            return true;
    }

    bool operator >(HIGH num_2)
    {
        HIGH temp;
        temp.size = size;
        temp.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            temp.num[i] = num[i];
        HIGH temp_2 = temp - num_2;
        if (!temp_2.is_neg && !temp_2.all_zero())
            return true;
        else
            return false;
    }

    bool operator >(long long num_2)
    {
        HIGH temp;
        temp.size = size;
        temp.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            temp.num[i] = num[i];
        HIGH temp_2 = temp - num_2;
        if (!temp_2.is_neg && !temp_2.all_zero())
            return true;
        else
            return false;
    }

    bool operator <(HIGH num_2)
    {
        HIGH temp;
        temp.size = size;
        temp.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            temp.num[i] = num[i];
        HIGH temp_2 = num_2 - temp;
        if (!temp_2.is_neg && !temp_2.all_zero())
            return true;
        else
            return false;
    }

    bool operator <(long long num_2)
    {
        HIGH temp;
        temp.size = size;
        temp.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            temp.num[i] = num[i];
        HIGH temp_2 = temp - num_2;
        if (temp_2.is_neg)
            return true;
        else
            return false;
    }

    bool operator >=(HIGH num_2)
    {
        HIGH temp;
        temp.size = size;
        temp.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            temp.num[i] = num[i];
        HIGH temp_2 = temp - num_2;
        if (!temp_2.is_neg)
            return true;
        else
            return false;
    }

    bool operator >=(long long num_2)
    {
        HIGH temp;
        temp.size = size;
        temp.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            temp.num[i] = num[i];
        HIGH temp_2 = temp - num_2;
        if (!temp_2.is_neg)
            return true;
        else
            return false;
    }

    bool operator <=(HIGH num_2)
    {
        HIGH temp;
        temp.size = size;
        temp.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            temp.num[i] = num[i];
        HIGH temp_2 = num_2 - temp;
        if (!temp_2.is_neg)
            return true;
        else
            return false;
    }

    bool operator <=(long long num_2)
    {
        HIGH temp;
        temp.size = size;
        temp.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            temp.num[i] = num[i];
        HIGH temp_2 = temp - num_2;
        if (temp_2.is_neg || temp == 0)
            return true;
        else
            return false;
    }

    HIGH operator ++()
    {
        HIGH temp;
        temp.size = size;
        temp.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            temp.num[i] = num[i];

        temp += to_high(1);
        size = temp.size;
        is_neg = temp.is_neg;
        for (int i = 0; i < temp.size; ++i)
            num[i] = temp.num[i];

        return temp;
    }

    HIGH operator --()
    {
        HIGH temp;
        temp.size = size;
        temp.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            temp.num[i] = num[i];

        temp -= to_high(1);
        size = temp.size;
        is_neg = temp.is_neg;
        for (int i = 0; i < temp.size; ++i)
            num[i] = temp.num[i];

        return temp;
    }
    
    void operator =(long long num_2)
    {
        HIGH temp;
        temp.size = size;
        temp.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            temp.num[i] = num[i];

        temp = to_high(num_2);
        size = temp.size;
        is_neg = temp.is_neg;
        for (int i = 0; i < temp.size; ++i)
            num[i] = temp.num[i];
    }

    bool lindomes() {
        for (int i = 0, j = size - 1; i < j; ++i, --j) {
            if (num[i] != num[j])
                return false;
        }
        return true;
    }

    HIGH sqrt()
    {
        HIGH temp;
        temp.size = size;
        temp.is_neg = is_neg;
        for (int i = 0; i < size; ++i)
            temp.num[i] = num[i];
        HIGH right = temp, left = to_high(1);
        HIGH mid;
        mid.initial();

        while (left <= right) {
            mid = (left + right + to_high(1)) / to_high(2);
            if (pow(mid, 2) >= temp)
                right = mid - to_high(1);
            else
                left = mid + to_high(1);
        }

        if (pow(left, 2) > temp)
            --left;

        return left;
    }
};

long long m_random(long long begin, long long end)
{
    return rand() % (end - begin + 1) + begin;
}

int int_input()
{
    int num = 0;
    scanf("%d", &num);
    return num;
}

long long llong_input()
{
    long long num = 0;
    scanf("%lld", &num);
    return num;
}

float float_input()
{
    float num = 0.0f;
    scanf("%f", &num);
    return num;
}

double double_input()
{
    double num = 0.0;
    scanf("%lf", &num);
    return num;
}

char getch(const std::string want)
{
    bool has[128] = {};
    for (int i = 0; i < want.size(); ++i)
        has[want[i]] = true;
    if (want == "all") {
        for (int i = 0; i < 128; ++i) {
            has[i] = true;
        }
    }

    char temp = 0;
    do
        scanf("%c", &temp);
    while (!has[temp]);

    return temp;
}

void nums_input_int(int num[], int lenth)
{
    for (int i = 0; i < lenth; ++i)
        scanf("%d", &num[i]);
}

void nums_input_llong(long long num[], int lenth)
{
    for (int i = 0; i < lenth; ++i)
        scanf("%lld", &num[i]);
}

void nums_input_float(float num[], int lenth)
{
    for (int i = 0; i < lenth; ++i)
        scanf("%f", &num[i]);
}

void nums_input_double(double num[], int lenth)
{
    for (int i = 0; i < lenth; ++i)
        scanf("%lf", &num[i]);
}

int max(int num_1, int num_2)
{
    return num_1 >= num_2 ? num_1: num_2;
}

int min(int num_1, int num_2)
{
    return num_1 < num_2 ? num_1: num_2;
}

int max_of(int num[], int lenth)
{
    int max = -1e9;

    for (int i = 0; i < lenth; ++i) {
        if (num[i] > max)
            max = num[i];
    }

    return max;
}

int min_of(int num[], int lenth)
{
    int min = 1e9;

    for (int i = 0; i < lenth; ++i) {
        if (num[i] < min)
            min = num[i];
    }

    return min;
}

int max_n_of(int num[], int lenth)
{
    int max = -1e9;
    int max_n = 0;

    for (int i = 0; i < lenth; ++i) {
        if (num[i] > max) {
            max = num[i];
            max_n = i;
        }
    }

    return max_n;
}

int min_n_of(int num[], int lenth)
{
    int min = 1e9;
    int min_n = 0;

    for (int i = 0; i < lenth; ++i) {
        if (num[i] < min) {
            min = num[i];
            min_n = i;
        }
    }

    return min_n;
}

long long sum_of(int num[], int lenth)
{
    long long sum = 0;

    for (int i = 0; i < lenth; ++i)
        sum += num[i];

    return sum;
}

int num_size(int num)
{
    int size = 0;

    while (num) {
        num /= 10;
        ++size;
    }
    if (size == 0)
        size = 1;

    return size;
}

bool is_prime(int num)
{
    if (num < 2)
        return false;
    for (int i = 2; i <= sqrt(num); ++i) {
        if (num % i == 0)
            return false;
    }
    return true;
}

unsigned long long fibonacci(unsigned int count)
{
    unsigned long long nums[50] = {1, 1};
    if (count <= 2)
        return 1;
    for (int i = 2; i < count; ++i) {
        nums[i] = nums[i - 2] + nums[i - 1];
    }
    return nums[count - 1];
}

int gcd(int num_1, int num_2)
{
    while (num_2) {
        int temp = num_2;
        num_2 = num_1 % num_2;
        num_1 = temp;
    }
    return num_1;
}

int lcm(int num_1, int num_2)
{
    return num_1 * num_2 / gcd(num_1, num_2);
}

unsigned long long factorial(int num)
{
    unsigned long long ans = 1;
    for (int i = 2; i <= num; ++i) {
        ans *= i;
    }
    return ans;
}

bool is_num_ch(char ch)
{
    if (ch >= '0' && ch <= '9')
        return true;
    return false;
}

bool is_letter_ch(char ch)
{
    return is_small_letter_ch(ch) || is_big_letter_ch(ch);
}

bool is_big_letter_ch(char ch)
{
    if (ch >= 'A' && ch <= 'Z')
        return true;
    return false;
}

bool is_small_letter_ch(char ch)
{
    if (ch >= 'a' && ch <= 'z')
        return true;
    return false;
}

void to_big(char &ch)
{
    if (is_small_letter_ch(ch))
        ch -= 'a' - 'A';
}

void to_small(char &ch)
{
    if (is_big_letter_ch(ch))
        ch += 'a' - 'A';
}

void all_turn_to_big(std::string &str)
{
    for (int i = 0; i < str.size(); ++i) {
        if (is_small_letter_ch(str[i]))
            str[i] -= 'a' - 'A';
    }
}

void all_turn_to_small(std::string &str)
{
    for (int i = 0; i < str.size(); ++i) {
        if (is_big_letter_ch(str[i]))
            str[i] += 'a' - 'A';
    }
}

void clean_line()
{
    printf("\r\b");
}

namespace sp_draw {
    void s_color(int back_col, int str_col)
    {
        if (back_col != NOTHING)
            back_col += 40;
        if (str_col != NOTHING)
            str_col += 30;
        printf("\033[%d;%dm\033[5m", back_col, str_col);
    }

    void s_str_color(int red, int green, int blue)
    {
        printf("\033[38;2;%d;%d;%dm", red, green, blue);
    }

    void s_back_color(int red, int green, int blue)
    {
        printf("\033[48;2;%d;%d;%dm", red, green, blue);
    }

    void s_under_line()
    {
        printf("\033[4m");
    }

    void s_big_under_l()
    {
        printf("\033[21m");
    }

    void s_mid_line()
    {
        printf("\033[9m");
    }

    void s_light_font()
    {
        printf("\033[1m");
    }

    void s_slant_font()
    {
        printf("\033[3m");
    }

    void s_back_draw()
    {
        printf("\033[7m");
    }

    void s_box(int which)
    {
        if (which == 0)
            printf("\033[51m");
        else
            printf("\033[52m");
    }

    void end_sp_draw()
    {
        printf("\033[0m");
    }
}

HIGH to_high(long long num)
{
    HIGH ans;
    ans.initial();
    ans.size = num_size(num);
    if (num < 0)
        ans.is_neg = true;
    else
        ans.is_neg = false;
    for (int i = 0; i < ans.size; ++i) {
        ans.num[i] = num % 10;
        num /= 10;
    }

    return ans;
}

HIGH pow(HIGH num, int n)
{
    HIGH ans = to_high(1);

    for (int i = 0; i < n; ++i) {
        ans *= num;
    }

    return ans;
}

本蒟蒻写了几个月的头文件,请各位大佬修改!
注:里面有高精度、质数判断等等内容,主要是高精度(HIGH)

3 个赞

共1237行(若有编译错误,请加上头文件:cstring,我用的编译器是CLion, CLion的iostream中有cstring)

1 个赞

怎么没有dalao?! :confounded:

1 个赞

此帖子已被社区举报,现已被临时隐藏。

警告一次