Language: C++

#include <iostream>
#include <vector>
#include <cstdarg>
 
class mystd
{
public:
    static bool Input(int number,...);
    static bool InputArray(std::vector<int> array);
    static bool InputArrays(int number,...);
    static bool InputMatrix(std::vector<std::vector<int>> array);
    static int min(std::vector<int> array);
    static int max(std::vector<int> array);
    static void print(int number,...);
};
 
bool mystd::Input(int number,...){
    va_list args;
    va_start(args, number);
    for (int i = 0; i < number; i++)
    {
        std::cin >> *(va_arg(args, int*));
    }
    return true;
}
 
void mystd::print(int number,...){
    va_list args;
    va_start(args, number);
    for (int i = 0; i < number; i++)
    {
        if(i!=0){
            std::cout << " ";
        }
        std::cout << *(va_arg(args, int*));
    }
    std::cout << std::endl;;
}
 
bool mystd::InputArray(std::vector<int> array){
    for (int &i : array)
    {
        std::cin >> i;
    }
    return true;
}
 
bool mystd::InputArrays(int number,...){
    va_list args;
    va_start(args, number);
    std::vector<std::vector<int>*> arrays(number);
    for (auto &i : arrays)
    {
        i = va_arg(args, std::vector<int>*);
    }
    int length = arrays[0]->size();
 
    for (int j=0;j<length;j++)
    {
        for (auto &&i : arrays)
        {
            std::cin >> (*i)[j];
        }
    }
    return true;
}
 
 
int mystd::min(std::vector<int> array){
    int ans = array[0];
    for (int &i : array)
    {
        if(i < ans){
            ans = i;
        }
    }
    return ans;
}
 
 
int mystd::max(std::vector<int> array){
    int ans = array[0];
    for (int &i : array)
    {
        if(i > ans){
            ans = i;
        }
    }
    return ans;
}
 
void Main();
 
int main(int argc, char const *argv[])
{
    Main();
    return 0;
}
 
 
void Main(){
    int N,A,B,ans;
    mystd::Input(3,&N,&A,&B);
    if ((A-B)%2 == 0)
    {
        if(A>B){
            ans = A-(A+B)/2;
        } else {
            ans = B-(A+B)/2;
        }
    } else {
        if (A>B){
            if (N-B < A-1)
            {
                ans = N-B;
            } else {
                ans = A-1;
            }
        } else {
            if (N-A < B-1)
            {
                ans = N-A;
            } else {
                ans = B-1;
            }
        }       
    }
 
    mystd::print(1,&ans);
} 
#include <iostream>
#include <vector>
#include <cstdarg>

class mystd
{
public:
    static bool Input(int number,...);
    static bool InputArray(std::vector<int> array);
    static bool InputArrays(int number,...);
    static bool InputMatrix(std::vector<std::vector<int>> array);
    static int min(std::vector<int> array);
    static int max(std::vector<int> array);
    static void print(int number,...);
};

bool mystd::Input(int number,...){
    va_list args;
    va_start(args, number);
    for (int i = 0; i < number; i++)
    {
        std::cin >> *(va_arg(args, int*));
    }
    return true;
}

void mystd::print(int number,...){
    va_list args;
    va_start(args, number);
    for (int i = 0; i < number; i++)
    {
        if(i!=0){
            std::cout << " ";
        }
        std::cout << *(va_arg(args, int*));
    }
    std::cout << std::endl;;
}

bool mystd::InputArray(std::vector<int> array){
    for (int &i : array)
    {
        std::cin >> i;
    }
    return true;
}

bool mystd::InputArrays(int number,...){
    va_list args;
    va_start(args, number);
    std::vector<std::vector<int>*> arrays(number);
    for (auto &i : arrays)
    {
        i = va_arg(args, std::vector<int>*);
    }
    int length = arrays[0]->size();

    for (int j=0;j<length;j++)
    {
        for (auto &&i : arrays)
        {
            std::cin >> (*i)[j];
        }
    }
    return true;
}


int mystd::min(std::vector<int> array){
    int ans = array[0];
    for (int &i : array)
    {
        if(i < ans){
            ans = i;
        }
    }
    return ans;
}


int mystd::max(std::vector<int> array){
    int ans = array[0];
    for (int &i : array)
    {
        if(i > ans){
            ans = i;
        }
    }
    return ans;
}

void Main();

int main(int argc, char const *argv[])
{
    Main();
    return 0;
}

void Main(){
    int N,A,B,ans;
    mystd::Input(3,&N,&A,&B);
    if ((A-B)%2 == 0)
    {
        ans = B-(A+B)/2;
    } else {
        if (N-A < B-1)
        {
            ans = N-A;
        } else {
            ans = B-1;
        }
    }       

    mystd::print(1,&ans);
} 

Compiler output:
a.cc:135:7: error: redefinition of 'class mystd'
  135 | class mystd
      |       ^~~~~
a.cc:5:7: note: previous definition of 'class mystd'
    5 | class mystd
      |       ^~~~~
a.cc:147:6: error: redefinition of 'static bool mystd::Input(int, ...)'
  147 | bool mystd::Input(int number,...){
      |      ^~~~~
a.cc:17:6: note: 'static bool mystd::Input(int, ...)' previously defined here
   17 | bool mystd::Input(int number,...){
      |      ^~~~~
a.cc:157:6: error: redefinition of 'static void mystd::print(int, ...)'
  157 | void mystd::print(int number,...){
      |      ^~~~~
a.cc:27:6: note: 'static void mystd::print(int, ...)' previously defined here
   27 | void mystd::print(int number,...){
      |      ^~~~~
a.cc:170:6: error: redefinition of 'static bool mystd::InputArray(std::vector<int>)'
  170 | bool mystd::InputArray(std::vector<int> array){
      |      ^~~~~
a.cc:40:6: note: 'static bool mystd::InputArray(std::vector<int>)' previously defined here
   40 | bool mystd::InputArray(std::vector<int> array){
      |      ^~~~~
a.cc:178:6: error: redefinition of 'static bool mystd::InputArrays(int, ...)'
  178 | bool mystd::InputArrays(int number,...){
      |      ^~~~~
a.cc:48:6: note: 'static bool mystd::InputArrays(int, ...)' previously defined here
   48 | bool mystd::InputArrays(int number,...){
      |      ^~~~~
a.cc:199:5: error: redefinition of 'static int mystd::min(std::vector<int>)'
  199 | int mystd::min(std::vector<int> array){
      |     ^~~~~
a.cc:69:5: note: 'static int mystd::min(std::vector<int>)' previously defined here
   69 | int mystd::min(std::vector<int> array){
      |     ^~~~~
a.cc:211:5: error: redefinition of 'static int mystd::max(std::vector<int>)'
  211 | int mystd::max(std::vector<int> array){
      |     ^~~~~
a.cc:81:5: note: 'static int mystd::max(std::vector<int>)' previously defined here
   81 | int mystd::max(std::vector<int> array){
      |     ^~~~~
a.cc:224:5: error: redefinition of 'int main(int, const char**)'
  224 | int main(int argc, char const *argv[])
      |     ^~~~
a.cc:94:5: note: 'int main(int, const char**)' previously defined here
   94 | int main(int argc, char const *argv[])
      |     ^~~~
a.cc:230:6: error: redefinition of 'void Main()'
  230 | void Main(){
      |      ^~~~
a.cc:101:6: note: 'void Main()' previously defined here
  101 | void Main(){
      |      ^~~~