Language: C++

#include <bits/stdc++.h>
using namespace std;
 
#define st first
#define nd second
#define pb push_back
 
typedef long long   ll;
typedef double      db;
typedef long double ldb;
 
typedef pair<int, int> pii;
typedef pair<ll,  ll>  pll;
typedef pair<ll,  db>  pdd;
typedef pair<ldb, ldb> pldd;
typedef pair<int, ll>  pil;
typedef pair<ll, int>  pli;
 
typedef vector<int>    vi;
typedef vector<ll>     vl;
typedef vector<char>   vc;
typedef vector<string> vs;
typedef vector<db>     vdb;
typedef vector<ldb>    vldb;
typedef vector<pii>    vpii;
typedef vector<pll>    vpll;
typedef vector<pdd>    vpdd;
typedef vector<pldd>   vpldd;
typedef vector<pil>    vpil;
typedef vector<pli>    vpli;
 
template<typename T>
void   print(T begin, T end, char = ' ', string msg = "", char = '\n');
template<typename It, typename T>
void   in(It, int, T (*)());
 
int    si    ();
ll     sl    ();
string ss    (int);
char   sc    ();
float  sf    ();
db     sd    ();
ldb    sld   ();
 
void   pi    (int, char = '\n');
void   pl    (ll, char = '\n');
void   pf    (float, char = '\n');
void   pc    (char, char = '\n');
void   pdb   (db, char = '\n');
void   pldb  (ldb, char = '\n');
void   ps    (string, char = '\n');
 
template<typename T>
void   pv    (vector<T> v, char = ' ', char = '\n');
 
ll russian(ll, ll, ll);
ll fastpow(ll, ll, ll);
ll slowpow(ll, ll, ll);
ll _gcd(ll, ll);
ll _lcm(ll, ll);
ll extgcd(ll, ll, ll&, ll&);
ll _inv(ll, ll);
 
const int INF  = 1e9;
const ll  LINF = 1e18;
 
int main()
{
    int n = si();   
    int H[n];
 
    int res = 0;
    for (int i = 0; i < n; ++i)
    {
        H[i] = si();
        bool good = true;
        for (int j = 0; j < i; ++j)
            if (H[j] > H[i])
                good = false;
 
        if (good)
            ++res;
    }
 
    pi(res);
 
    return 0;
}
 
 
template<typename T>
string get_token_pointer()
{
    if (is_same<T, int*>::value)
        return "%d";
    if (is_same<T, ll*>::value)
        return "%lld";
    if (is_same<T, char*>::value)
        return "%c";
    if (is_same<T, db*>::value)
        return "%.8lf";
    if (is_same<T, ldb*>::value)
        return "%.10Lf";
    if (is_same<T, float*>::value)
        return "%.6f";
    return "%d";
}
 
template<typename T>
string get_token()
{
    if (is_same<T, int>::value)
        return "%d";
    if (is_same<T, ll>::value)
        return "%lld";
    if (is_same<T, char>::value)
        return "%c";
    if (is_same<T, db>::value)
        return "%.8lf";
    if (is_same<T, ldb>::value)
        return "%.10Lf";
    if (is_same<T, float>::value)
        return "%.6f";
    return "%d";
}
 
template<typename It, typename T>
void in(It begin, int nn, T (*get)())
{
    while (nn--)
        *begin++ = get();
}
 
template <typename T>
T scanf_t(string s)
{
    T a;
    scanf(s.c_str(), &a);
    return a;
}
 
template <typename T>
void printf_t(T a, string s, char end_l)
{
    s.push_back(end_l);
    printf(s.c_str(), a);
}
 
// stworzone do tablic tylko
template <typename T>
void print(T begin, T end, char sep, string msg, char end_l)
{
    if (msg != "")
    {
        printf(msg.c_str());
        printf("\n");
    }
    string s = get_token_pointer<T>();
    s.push_back(sep);
    while (begin + 1 != end)
    {
        printf(s.c_str(), *begin);
        begin++;
    }
    if (begin != end)
    {
        s.back() = end_l;
        printf(s.c_str(), *begin);
    }
}
 
int   si   ()  { return scanf_t<int>("%d");   }
ll    sl   ()  { return scanf_t<ll>("%lld");  }
float sf   ()  { return scanf_t<float>("%.6f"); }
char  sc   ()  { return scanf_t<char>(" %c"); }
db    sdb  ()  { return scanf_t<db>("%.8lf");    }
ldb   sldb ()  { return scanf_t<ldb>("%.10Lf");  }
 
void pi   (int a,   char end_l)  { printf_t<int>(a, "%d", end_l);   }
void pl   (ll a,    char end_l)  { printf_t<ll>(a, "%lld", end_l);  }
void pf   (float a, char end_l)  { printf_t<float>(a, "%.6f", end_l); }
void pc   (char a,  char end_l)  { printf_t<char>(a, "%c", end_l);  }
void pdb  (db a,    char end_l)  { printf_t<db>(a, "%.8lf", end_l);   }
void pldb (ldb a,   char end_l)  { printf_t<ldb>(a, "%.10Lf", end_l);  }
 
void ps(string a, char end_l)
{
    string s = "%s";
    s.push_back(end_l);
    printf(s.c_str(), a.c_str());
}
 
template<typename T>
void pv (vector<T> v, char sep, char end_l)
{
    string s = get_token<T>();
    for (size_t i = 0; i < v.size() - 1; ++i)
        printf_t<T>(v[i], s, sep);
    if (!v.empty())
        printf_t<T>(v.back(), s, end_l);
}
 
string ss(int NN)
{
    char T[NN + 7];
    scanf("%s", T);
    return (string)T;
}
 
ll fastpow(ll a, ll k, ll m)
{
    ll r = 1LL;
    while (k)
    {
        if (k & 1LL)
            r = (r * a) % m;
        a = (a * a) % m;
        k >>= 1LL;
    }
    return r;
}
 
ll slowpow(ll a, ll k, ll m)
{
    ll r = 1LL;
    while (k)
    {
        if (k & 1LL)
            r = russian(r, a, m);
        a = russian(a, a, m);
        k >>= 1LL;
    }
    return r;
}
 
ll russian(ll a, ll k, ll m)
{
    ll r = 0LL;
    while (k)
    {
        if (k & 1LL)
            r = (r + a) % m;
        a = (a + a) % m;
        k >>= 1LL;
    }
    return r;
}
 
ll _gcd(ll a, ll b)
{
    while (b)
        swap(a %= b, b);
    return a;
}
 
ll _lcm(ll a, ll b)
{
    return a / _gcd(a, b) * b;
}
 
ll extgcd(ll a, ll b, ll& k, ll& l)
{
    if (b == 0)
    {
        k = 1; l = 0;
        return a;

        }
        ll res = extgcd(b, a % b, l, k);
        l -= a / b * k;
        return res;
    }
     
    ll _inv(ll a, ll p)
    {
        return fastpow(a, p - 2, p);
    }

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

#define st first
#define nd second
#define pb push_back

typedef long long   ll;
typedef double      db;
typedef long double ldb;

typedef pair<int, int> pii;
typedef pair<ll,  ll>  pll;
typedef pair<ll,  db>  pdd;
typedef pair<ldb, ldb> pldd;
typedef pair<int, ll>  pil;
typedef pair<ll, int>  pli;

typedef vector<int>    vi;
typedef vector<ll>     vl;
typedef vector<char>   vc;
typedef vector<string> vs;
typedef vector<db>     vdb;
typedef vector<ldb>    vldb;
typedef vector<pii>    vpii;
typedef vector<pll>    vpll;
typedef vector<pdd>    vpdd;
typedef vector<pldd>   vpldd;
typedef vector<pil>    vpil;
typedef vector<pli>    vpli;

template<typename T>
void   print(T begin, T end, char = ' ', string msg = "", char = '\n');
template<typename It, typename T>
void   in(It, int, T (*)());

int    si    ();
ll     sl    ();
string ss    (int);
char   sc    ();
float  sf    ();
db     sd    ();
ldb    sld   ();

void   pi    (int, char = '\n');
void   pl    (ll, char = '\n');
void   pf    (float, char = '\n');
void   pc    (char, char = '\n');
void   pdb   (db, char = '\n');
void   pldb  (ldb, char = '\n');
void   ps    (string, char = '\n');

template<typename T>
void   pv    (vector<T> v, char = ' ', char = '\n');

ll russian(ll, ll, ll);
ll fastpow(ll, ll, ll);
ll slowpow(ll, ll, ll);
ll _gcd(ll, ll);
ll _lcm(ll, ll);
ll extgcd(ll, ll, ll&, ll&);
ll _inv(ll, ll);

const int INF  = 1e9;
const ll  LINF = 1e18;

int main()
{
    int n = si();   
    int H[n];

    int res = 0;
    for (int i = 0; i < n; ++i)
    {
        H[i] = si();
        bool good = true;
        for (int j = 0; j < i; ++j)
            if (H[j] > H[i])
                good = false;

        if (good)
            ++res;
    }

    pi(res);

    return 0;
}


template<typename T>
string get_token_pointer()
{
    if (is_same<T, int*>::value)
        return "%d";
    if (is_same<T, ll*>::value)
        return "%lld";
    if (is_same<T, char*>::value)
        return "%c";
    if (is_same<T, db*>::value)
        return "%.8lf";
    if (is_same<T, ldb*>::value)
        return "%.10Lf";
    if (is_same<T, float*>::value)
        return "%.6f";
    return "%d";
}

template<typename T>
string get_token()
{
    if (is_same<T, int>::value)
        return "%d";
    if (is_same<T, ll>::value)
        return "%lld";
    if (is_same<T, char>::value)
        return "%c";
    if (is_same<T, db>::value)
        return "%.8lf";
    if (is_same<T, ldb>::value)
        return "%.10Lf";
    if (is_same<T, float>::value)
        return "%.6f";
    return "%d";
}

template<typename It, typename T>
void in(It begin, int nn, T (*get)())
{
    while (nn--)
        *begin++ = get();
}

template <typename T>
T scanf_t(string s)
{
    T a;
    scanf(s.c_str(), &a);
    return a;
}

template <typename T>
void printf_t(T a, string s, char end_l)
{
    s.push_back(end_l);
    printf(s.c_str(), a);
}

// stworzone do tablic tylko
template <typename T>
void print(T begin, T end, char sep, string msg, char end_l)
{
    if (msg != "")
    {
        printf(msg.c_str());
        printf("\n");
    }
    string s = get_token_pointer<T>();
    s.push_back(sep);
    while (begin + 1 != end)
    {
        printf(s.c_str(), *begin);
        begin++;
    }
    if (begin != end)
    {
        s.back() = end_l;
        printf(s.c_str(), *begin);
    }
}

int   si   ()  { return scanf_t<int>("%d");   }
ll    sl   ()  { return scanf_t<ll>("%lld");  }
float sf   ()  { return scanf_t<float>("%.6f"); }
char  sc   ()  { return scanf_t<char>(" %c"); }
db    sdb  ()  { return scanf_t<db>("%.8lf");    }
ldb   sldb ()  { return scanf_t<ldb>("%.10Lf");  }

void pi   (int a,   char end_l)  { printf_t<int>(a, "%d", end_l);   }
void pl   (ll a,    char end_l)  { printf_t<ll>(a, "%lld", end_l);  }
void pf   (float a, char end_l)  { printf_t<float>(a, "%.6f", end_l); }
void pc   (char a,  char end_l)  { printf_t<char>(a, "%c", end_l);  }
void pdb  (db a,    char end_l)  { printf_t<db>(a, "%.8lf", end_l);   }
void pldb (ldb a,   char end_l)  { printf_t<ldb>(a, "%.10Lf", end_l);  }

void ps(string a, char end_l)
{
    string s = "%s";
    s.push_back(end_l);
    printf(s.c_str(), a.c_str());
}

template<typename T>
void pv (vector<T> v, char sep, char end_l)
{
    string s = get_token<T>();
    for (size_t i = 0; i < v.size() - 1; ++i)
        printf_t<T>(v[i], s, sep);
    if (!v.empty())
        printf_t<T>(v.back(), s, end_l);
}

string ss(int NN)
{
    char T[NN + 7];
    scanf("%s", T);
    return (string)T;
}

ll fastpow(ll a, ll k, ll m)
{
    ll r = 1LL;
    while (k)
    {
        if (k & 1LL)
            r = (r * a) % m;
        a = (a * a) % m;
        k >>= 1LL;
    }
    return r;
}

ll slowpow(ll a, ll k, ll m)
{
    ll r = 1LL;
    while (k)
    {
        if (k & 1LL)
            r = russian(r, a, m);
        a = russian(a, a, m);
        k >>= 1LL;
    }
    return r;
}

ll russian(ll a, ll k, ll m)
{
    ll r = 0LL;
    while (k)
    {
        if (k & 1LL)
            r = (r + a) % m;
        a = (a + a) % m;
        k >>= 1LL;
    }
    return r;
}

ll _gcd(ll a, ll b)
{
    while (b)
        swap(a %= b, b);
    return a;
}

ll _lcm(ll a, ll b)
{
    return a / _gcd(a, b) * b;
}

ll extgcd(ll a, ll b, ll& k, ll& l)
{
    if (b == 0)
    {
        k = 1; l = 0;
        return a;
    }
    ll res = extgcd(b, a % b, l, k);
    l -= a / b * k;
    return res;
}

ll _inv(ll a, ll p)
{
    return fastpow(a, p - 2, p);
}

Compiler output:
a.cc:311:8: error: redeclaration of 'template<class T> void print(T, T, char, std::string, char)' may not have default arguments [-fpermissive]
  311 | void   print(T begin, T end, char = ' ', string msg = "", char = '\n');
      |        ^~~~~
a.cc:323:8: error: default argument given for parameter 2 of 'void pi(int, char)' [-fpermissive]
  323 | void   pi    (int, char = '\n');
      |        ^~
a.cc:179:6: note: previous specification in 'void pi(int, char)' here
  179 | void pi   (int a,   char end_l)  { printf_t<int>(a, "%d", end_l);   }
      |      ^~
a.cc:324:8: error: default argument given for parameter 2 of 'void pl(ll, char)' [-fpermissive]
  324 | void   pl    (ll, char = '\n');
      |        ^~
a.cc:180:6: note: previous specification in 'void pl(ll, char)' here
  180 | void pl   (ll a,    char end_l)  { printf_t<ll>(a, "%lld", end_l);  }
      |      ^~
a.cc:325:8: error: default argument given for parameter 2 of 'void pf(float, char)' [-fpermissive]
  325 | void   pf    (float, char = '\n');
      |        ^~
a.cc:181:6: note: previous specification in 'void pf(float, char)' here
  181 | void pf   (float a, char end_l)  { printf_t<float>(a, "%.6f", end_l); }
      |      ^~
a.cc:326:8: error: default argument given for parameter 2 of 'void pc(char, char)' [-fpermissive]
  326 | void   pc    (char, char = '\n');
      |        ^~
a.cc:182:6: note: previous specification in 'void pc(char, char)' here
  182 | void pc   (char a,  char end_l)  { printf_t<char>(a, "%c", end_l);  }
      |      ^~
a.cc:327:8: error: default argument given for parameter 2 of 'void pdb(db, char)' [-fpermissive]
  327 | void   pdb   (db, char = '\n');
      |        ^~~
a.cc:183:6: note: previous specification in 'void pdb(db, char)' here
  183 | void pdb  (db a,    char end_l)  { printf_t<db>(a, "%.8lf", end_l);   }
      |      ^~~
a.cc:328:8: error: default argument given for parameter 2 of 'void pldb(ldb, char)' [-fpermissive]
  328 | void   pldb  (ldb, char = '\n');
      |        ^~~~
a.cc:184:6: note: previous specification in 'void pldb(ldb, char)' here
  184 | void pldb (ldb a,   char end_l)  { printf_t<ldb>(a, "%.10Lf", end_l);  }
      |      ^~~~
a.cc:329:8: error: default argument given for parameter 2 of 'void ps(std::string, char)' [-fpermissive]
  329 | void   ps    (string, char = '\n');
      |        ^~
a.cc:186:6: note: previous specification in 'void ps(std::string, char)' here
  186 | void ps(string a, char end_l)
      |      ^~
a.cc:332:8: error: redeclaration of 'template<class T> void pv(std::vector<_Tp>, char, char)' may not have default arguments [-fpermissive]
  332 | void   pv    (vector<T> v, char = ' ', char = '\n');
      |        ^~
a.cc:342:11: error: redefinition of 'const int INF'
  342 | const int INF  = 1e9;
      |           ^~~
a.cc:64:11: note: 'const int INF' previously defined here
   64 | const int INF  = 1e9;
      |           ^~~
a.cc:343:11: error: redefinition of 'const ll LINF'
  343 | const ll  LINF = 1e18;
      |           ^~~~
a.cc:65:11: note: 'const ll LINF' previously defined here
   65 | const ll  LINF = 1e18;
      |           ^~~~
a.cc:345:5: error: redefinition of 'int main()'
  345 | int main()
      |     ^~~~
a.cc:67:5: note: 'int main()' previously defined here
   67 | int main()
      |     ^~~~
a.cc:370:8: error: redefinition of 'template<class T> std::string get_token_pointer()'
  370 | string get_token_pointer()
      |        ^~~~~~~~~~~~~~~~~
a.cc:92:8: note: 'template<class T> std::string get_token_pointer()' previously declared here
   92 | string get_token_pointer()
      |        ^~~~~~~~~~~~~~~~~
a.cc:388:8: error: redefinition of 'template<class T> std::string get_token()'
  388 | string get_token()
      |        ^~~~~~~~~
a.cc:110:8: note: 'template<class T> std::string get_token()' previously declared here
  110 | string get_token()
      |        ^~~~~~~~~
a.cc:406:6: error: redefinition of 'template<class It, class T> void in(It, int, T (*)())'
  406 | void in(It begin, int nn, T (*get)())
      |      ^~
a.cc:128:6: note: 'template<class It, class T> void in(It, int, T (*)())' previously declared here
  128 | void in(It begin, int nn, T (*get)())
      |      ^~
a.cc:413:3: error: redefinition of 'template<class T> T scanf_t(std::string)'
  413 | T scanf_t(string s)
      |   ^~~~~~~
a.cc:135:3: note: 'template<class T> T scanf_t(std::string)' previously declared here
  135 | T scanf_t(string s)
      |   ^~~~~~~
a.cc:421:6: error: redefinition of 'template<class T> void printf_t(T, std::string, char)'
  421 | void printf_t(T a, string s, char end_l)
      |      ^~~~~~~~
a.cc:143:6: note: 'template<class T> void printf_t(T, std::string, char)' previously declared here
  143 | void printf_t(T a, string s, char end_l)
      |      ^~~~~~~~
a.cc:429:6: error: redefinition of 'template<class T> void print(T, T, char, std::string, char)'
  429 | void print(T begin, T end, char sep, string msg, char end_l)
      |      ^~~~~
a.cc:151:6: note: 'template<class T> void print(T, T, char, std::string, char)' previously declared here
  151 | void print(T begin, T end, char sep, string msg, char end_l)
      |      ^~~~~
a.cc:450:7: error: redefinition of 'int si()'
  450 | int   si   ()  { return scanf_t<int>("%d");   }
      |       ^~
a.cc:172:7: note: 'int si()' previously defined here
  172 | int   si   ()  { return scanf_t<int>("%d");   }
      |       ^~
a.cc:451:7: error: redefinition of 'll sl()'
  451 | ll    sl   ()  { return scanf_t<ll>("%lld");  }
      |       ^~
a.cc:173:7: note: 'll sl()' previously defined here
  173 | ll    sl   ()  { return scanf_t<ll>("%lld");  }
      |       ^~
a.cc:452:7: error: redefinition of 'float sf()'
  452 | float sf   ()  { return scanf_t<float>("%.6f"); }
      |       ^~
a.cc:174:7: note: 'float sf()' previously defined here
  174 | float sf   ()  { return scanf_t<float>("%.6f"); }
      |       ^~
a.cc:453:7: error: redefinition of 'char sc()'
  453 | char  sc   ()  { return scanf_t<char>(" %c"); }
      |       ^~
a.cc:175:7: note: 'char sc()' previously defined here
  175 | char  sc   ()  { return scanf_t<char>(" %c"); }
      |       ^~
a.cc:454:7: error: redefinition of 'db sdb()'
  454 | db    sdb  ()  { return scanf_t<db>("%.8lf");    }
      |       ^~~
a.cc:176:7: note: 'db sdb()' previously defined here
  176 | db    sdb  ()  { return scanf_t<db>("%.8lf");    }
      |       ^~~
a.cc:455:7: error: redefinition of 'ldb sldb()'
  455 | ldb   sldb ()  { return scanf_t<ldb>("%.10Lf");  }
      |       ^~~~
a.cc:177:7: note: 'ldb sldb()' previously defined here
  177 | ldb   sldb ()  { return scanf_t<ldb>("%.10Lf");  }
      |       ^~~~
a.cc:457:6: error: redefinition of 'void pi(int, char)'
  457 | void pi   (int a,   char end_l)  { printf_t<int>(a, "%d", end_l);   }
      |      ^~
a.cc:179:6: note: 'void pi(int, char)' previously defined here
  179 | void pi   (int a,   char end_l)  { printf_t<int>(a, "%d", end_l);   }
      |      ^~
a.cc:458:6: error: redefinition of 'void pl(ll, char)'
  458 | void pl   (ll a,    char end_l)  { printf_t<ll>(a, "%lld", end_l);  }
      |      ^~
a.cc:180:6: note: 'void pl(ll, char)' previously defined here
  180 | void pl   (ll a,    char end_l)  { printf_t<ll>(a, "%lld", end_l);  }
      |      ^~
a.cc:459:6: error: redefinition of 'void pf(float, char)'
  459 | void pf   (float a, char end_l)  { printf_t<float>(a, "%.6f", end_l); }
      |      ^~
a.cc:181:6: note: 'void pf(float, char)' previously defined here
  181 | void pf   (float a, char end_l)  { printf_t<float>(a, "%.6f", end_l); }
      |      ^~
a.cc:460:6: error: redefinition of 'void pc(char, char)'
  460 | void pc   (char a,  char end_l)  { printf_t<char>(a, "%c", end_l);  }
      |      ^~
a.cc:182:6: note: 'void pc(char, char)' previously defined here
  182 | void pc   (char a,  char end_l)  { printf_t<char>(a, "%c", end_l);  }
      |      ^~
a.cc:461:6: error: redefinition of 'void pdb(db, char)'
  461 | void pdb  (db a,    char end_l)  { printf_t<db>(a, "%.8lf", end_l);   }
      |      ^~~
a.cc:183:6: note: 'void pdb(db, char)' previously defined here
  183 | void pdb  (db a,    char end_l)  { printf_t<db>(a, "%.8lf", end_l);   }
      |      ^~~
a.cc:462:6: error: redefinition of 'void pldb(ldb, char)'
  462 | void pldb (ldb a,   char end_l)  { printf_t<ldb>(a, "%.10Lf", end_l);  }
      |      ^~~~
a.cc:184:6: note: 'void pldb(ldb, char)' previously defined here
  184 | void pldb (ldb a,   char end_l)  { printf_t<ldb>(a, "%.10Lf", end_l);  }
      |      ^~~~
a.cc:464:6: error: redefinition of 'void ps(std::string, char)'
  464 | void ps(string a, char end_l)
      |      ^~
a.cc:186:6: note: 'void ps(std::string, char)' previously defined here
  186 | void ps(string a, char end_l)
      |      ^~
a.cc:472:6: error: redefinition of 'template<class T> void pv(std::vector<_Tp>, char, char)'
  472 | void pv (vector<T> v, char sep, char end_l)
      |      ^~
a.cc:194:6: note: 'template<class T> void pv(std::vector<_Tp>, char, char)' previously declared here
  194 | void pv (vector<T> v, char sep, char end_l)
      |      ^~
a.cc:481:8: error: redefinition of 'std::string ss(int)'
  481 | string ss(int NN)
      |        ^~
a.cc:203:8: note: 'std::string ss(int)' previously defined here
  203 | string ss(int NN)
      |        ^~
a.cc:488:4: error: redefinition of 'll fastpow(ll, ll, ll)'
  488 | ll fastpow(ll a, ll k, ll m)
      |    ^~~~~~~
a.cc:210:4: note: 'll fastpow(ll, ll, ll)' previously defined here
  210 | ll fastpow(ll a, ll k, ll m)
      |    ^~~~~~~
a.cc:501:4: error: redefinition of 'll slowpow(ll, ll, ll)'
  501 | ll slowpow(ll a, ll k, ll m)
      |    ^~~~~~~
a.cc:223:4: note: 'll slowpow(ll, ll, ll)' previously defined here
  223 | ll slowpow(ll a, ll k, ll m)
      |    ^~~~~~~
a.cc:514:4: error: redefinition of 'll russian(ll, ll, ll)'
  514 | ll russian(ll a, ll k, ll m)
      |    ^~~~~~~
a.cc:236:4: note: 'll russian(ll, ll, ll)' previously defined here
  236 | ll russian(ll a, ll k, ll m)
      |    ^~~~~~~
a.cc:527:4: error: redefinition of 'll _gcd(ll, ll)'
  527 | ll _gcd(ll a, ll b)
      |    ^~~~
a.cc:249:4: note: 'll _gcd(ll, ll)' previously defined here
  249 | ll _gcd(ll a, ll b)
      |