Language: C++

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <iterator>
#include <numeric>
#include <bitset>
#include <cassert>
#include <functional>

using namespace std;
typedef ll ll;
using Graph = vector<vector<ll>>;
typedef pair<ll, ll> P;
inline ll min(ll x, ll y) { return x < y ? x : y; }
inline ll max(ll x, ll y) { return x > y ? x : y; }

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep1(i, n) for (ll i = 1; i < (ll)(n); i++)
#define all(c) c.begin(), c.end()
#define pb push_back
#define fs first
#define sc second
#define show(x) cout << #x << " = " << (x) << endl
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
const int MAX = 510000;
const int MOD = 1000000007;

ll fac[MAX], finv[MAX], inv[MAX];

// テーブルを作る前処理
void comb_init()
{
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < MAX; i++)
    {
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}

// 二項係数計算
ll comb(int n, int k)
{
    if (n < k)
        return 0;
    if (n < 0 || k < 0)
        return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
// 負の数にも対応した % 演算
ll mod(ll val, ll m)
{
    ll res = val % m;
    if (res < 0)
        res += m;
    return res;
}
// a^n mod を計算する
ll modpow(ll a, ll n, ll mod)
{
    ll res = 1;
    while (n > 0)
    {
        if (n & 1)
            res = res * a % mod;
        a = a * a % mod;
        n >>= 1;
    }
    return res;
}
// a^{-1} mod を計算する
ll modinv(ll a, ll m)
{
    ll b = m, u = 1, v = 0;
    while (b)
    {
        ll t = a / b;
        a -= t * b;
        swap(a, b);
        u -= t * v;
        swap(u, v);
    }
    u %= m;
    if (u < 0)
        u += m;
    return u;
}
//from char to int
ll ctoi(char c)
{
    ll i = c - 48;
}
//素数列挙
vector<ll> eratosthenes_sieve(ll n)
{
    vector<ll> table(n + 1, 0);
    vector<ll> prime_list(0);
    for (ll i = 2; i <= n; i++)
    {
        if (!table[i])
        {
            prime_list.push_back(i);
            for (ll j = 2; j <= n / i; j++)
            {
                table[i * j] = 1;
            }
        }
    }
    return prime_list;
}
//素数判定
bool is_prime(ll X)
{
    for (ll i = 2; i <= ll(sqrt(X)); i++)
    {
        if (X % i == 0)
        {
            return false;
        }
    }
    return true;
}
//平方数判定
bool is_square(ll N)
{
    if (ll(sqrt(N)) * ll(sqrt(N)) == N)
    {
        return true;
    }
    else
    {
        return false;
    }
}
//各位の和の計算
ll sum_of_digits(ll num)
{
    ll sum = 0;
    while (num)
    {
        sum += num % 10;
        num /= 10;
    }
    return sum;
}
//文字カウント
ll mojicnt(vector<char> str, char X)
{
    count(str.cbegin(), str.cend(), X);
}
// にぶたん
// index が条件を満たすかどうか
bool isOK(int index, int key)
{
    if (a[index] >= key)
        return true;
    else
        return false;
}

// 二分探索
int binary_search(int key)
{
    int left = -1;             //「index = 0」が条件を満たすこともあるので、初期値は -1
    int right = (int)a.size(); // 「index = a.size()-1」が条件を満たさないこともあるので、初期値は a.size()

    /* どんな二分探索でもここの書き方を変えずにできる！ */
    while (right - left > 1)
    {
        int mid = left + (right - left) / 2;

        if (isOK(mid, key))
            right = mid;
        else
            left = mid;
    }

    /* left は条件を満たさない最大の値、right は条件を満たす最小の値になっている */
    return right;
}
//pairの2個目逆順sort用
bool pairCompare(const P &firstElof, const P &secondElof)
{
    return firstElof.second > secondElof.second;
}
//ベクトルの積集合
vector<ll> set_product(vector<ll> v1, vector<ll> v2)
{
    vector<ll> ret(0);
    for (ll i : v1)
    {
        if (find(v2.begin(), v2.end(), i) != v2.end())
        {
            ret.push_back(i);
        }
    }
    return ret;
}
//from string to vector<char>
vector<char> stov(string s)
{
    vector<char> v(all(s));
    return v;
}
//from decimal to binary
string itob(ll j)
{
    return bitset<10>(j).to_string();
}
//max of vector
ll vmax(vector<ll> v)
{
    return *max_element(all(v));
}
//min of vector
ll vmin(vector<ll> v)
{
    return *min_element(all(v));
}
//sum of vector
ll vsum(vector<ll> v)
{
    return accumulate(all(v), (ll)0);
}
int main()
{

    return 0;
}


Compiler output:
a.cc:23:9: error: 'll' does not name a type; did you mean 'all'?
   23 | typedef ll ll;
      |         ^~
      |         all
a.cc:24:29: error: 'll' was not declared in this scope; did you mean 'all'?
   24 | using Graph = vector<vector<ll>>;
      |                             ^~
      |                             all
a.cc:24:29: error: template argument 1 is invalid
a.cc:24:29: error: template argument 2 is invalid
a.cc:24:31: error: template argument 1 is invalid
   24 | using Graph = vector<vector<ll>>;
      |                               ^~
a.cc:24:31: error: template argument 2 is invalid
a.cc:25:14: error: 'll' was not declared in this scope; did you mean 'all'?
   25 | typedef pair<ll, ll> P;
      |              ^~
      |              all
a.cc:25:18: error: 'll' was not declared in this scope; did you mean 'all'?
   25 | typedef pair<ll, ll> P;
      |                  ^~
      |                  all
a.cc:25:20: error: template argument 1 is invalid
   25 | typedef pair<ll, ll> P;
      |                    ^
a.cc:25:20: error: template argument 2 is invalid
a.cc:26:8: error: 'll' does not name a type; did you mean 'all'?
   26 | inline ll min(ll x, ll y) { return x < y ? x : y; }
      |        ^~
      |        all
a.cc:27:8: error: 'll' does not name a type; did you mean 'all'?
   27 | inline ll max(ll x, ll y) { return x > y ? x : y; }
      |        ^~
      |        all
a.cc:44:1: error: 'll' does not name a type; did you mean 'all'?
   44 | ll fac[MAX], finv[MAX], inv[MAX];
      | ^~
      | all
a.cc: In function 'void comb_init()':
a.cc:49:5: error: 'fac' was not declared in this scope
   49 |     fac[0] = fac[1] = 1;
      |     ^~~
a.cc:50:5: error: 'finv' was not declared in this scope
   50 |     finv[0] = finv[1] = 1;
      |     ^~~~
a.cc:51:5: error: 'inv' was not declared in this scope; did you mean 'int'?
   51 |     inv[1] = 1;
      |     ^~~
      |     int
a.cc: At global scope:
a.cc:61:1: error: 'll' does not name a type; did you mean 'all'?
   61 | ll comb(int n, int k)
      | ^~
      | all
a.cc:70:1: error: 'll' does not name a type; did you mean 'all'?
   70 | ll mod(ll val, ll m)
      | ^~
      | all
a.cc:78:1: error: 'll' does not name a type; did you mean 'all'?
   78 | ll modpow(ll a, ll n, ll mod)
      | ^~
      | all
a.cc:91:1: error: 'll' does not name a type; did you mean 'all'?
   91 | ll modinv(ll a, ll m)
      | ^~
      | all
a.cc:108:1: error: 'll' does not name a type; did you mean 'all'?
  108 | ll ctoi(char c)
      | ^~
      | all
a.cc:113:8: error: 'll' was not declared in this scope; did you mean 'all'?
  113 | vector<ll> eratosthenes_sieve(ll n)
      |        ^~
      |        all
a.cc:113:10: error: template argument 1 is invalid
  113 | vector<ll> eratosthenes_sieve(ll n)
      |          ^
a.cc:113:10: error: template argument 2 is invalid
a.cc:113:31: error: 'll' was not declared in this scope; did you mean 'all'?
  113 | vector<ll> eratosthenes_sieve(ll n)
      |                               ^~
      |                               all
a.cc:131:15: error: 'll' was not declared in this scope; did you mean 'all'?
  131 | bool is_prime(ll X)
      |               ^~
      |               all
a.cc:143:16: error: 'll' was not declared in this scope; did you mean 'all'?
  143 | bool is_square(ll N)
      |                ^~
      |                all
a.cc:155:1: error: 'll' does not name a type; did you mean 'all'?
  155 | ll sum_of_digits(ll num)
      | ^~
      | all
a.cc:166:1: error: 'll' does not name a type; did you mean 'all'?
  166 | ll mojicnt(vector<char> str, char X)
      | ^~
      | all
a.cc: In function 'bool isOK(int, int)':
a.cc:174:9: error: 'a' was not declared in this scope
  174 |     if (a[index] >= key)
      |         ^
a.cc: In function 'int binary_search(int)':
a.cc:184:22: error: 'a' was not declared in this scope
  184 |     int right = (int)a.size(); // 「index = a.size()-1」が条件を満たさないこともあるので、初期値は a.size()
      |                      ^
a.cc: In function 'bool pairCompare(const P&, const P&)':
a.cc:203:22: error: request for member 'second' in 'firstElof', which is of non-class type 'const P' {aka 'const int'}
  203 |     return firstElof.second > secondElof.second;
      |                      ^~~~~~
a.cc:203:42: error: request for member 'second' in 'secondElof', which is of non-class type 'const P' {aka 'const int'}
  203 |     return firstElof.second > secondElof.second;
      |                                          ^~~~~~
a.cc: At global scope:
a.cc:206:8: error: 'll' was not declared in this scope; did you mean 'all'?
  206 | vector<ll> set_product(vector<ll> v1, vector<ll> v2)
      |        ^~
      |        all
a.cc:206:10: error: template argument 1 is invalid
  206 | vector<ll> set_product(vector<ll> v1, vector<ll> v2)
      |          ^
a.cc:206:10: error: template argument 2 is invalid
a.cc:206:31: error: 'll' was not declared in this scope; did you mean 'all'?
  206 | vector<ll> set_product(vector<ll> v1, vector<ll> v2)
      |                               ^~
      |                               all
a.cc:206:33: error: template argument 1 is invalid
  206 | vector<ll> set_product(vector<ll> v1, vector<ll> v2)
      |                                 ^
a.cc:206:33: error: template argument 2 is invalid
a.cc:206:46: error: 'll' was not declared in this scope; did you mean 'all'?
  206 | vector<ll> set_product(vector<ll> v1, vector<ll> v2)
      |                                              ^~
      |                                              all
a.cc:206:48: error: template argument 1 is invalid
  206 | vector<ll> set_product(vector<ll> v1, vector<ll> v2)
      |                                                ^
a.cc:206:48: error: template argument 2 is invalid
a.cc: In function 'int set_product(int, int)':
a.cc:208:12: error: 'll' was not declared in this scope; did you mean 'all'?
  208 |     vector<ll> ret(0);
      |            ^~
      |            all
a.cc:208:14: error: template argument 1 is invalid
  208 |     vector<ll> ret(0);
      |              ^
a.cc:208:14: error: template argument 2 is invalid
a.cc:209:12: error: expected ';' before 'i'
  209 |     for (ll i : v1)
      |            ^~
      |            ;
a.cc:216:5: error: expected primary-expression before 'return'
  216 |     return ret;
      |     ^~~~~~
a.cc:215:6: error: expected ';' before 'return'
  215 |     }
      |      ^
      |      ;
  216 |     return ret;
      |     ~~~~~~
a.cc:216:5: error: expected primary-expression before 'return'
  216 |     return ret;
      |     ^~~~~~
a.cc:215:6: error: expected ')' before 'return'
  215 |     }
      |      ^
      |      )
  216 |     return ret;
      |     ~~~~~~
a.cc:209:9: note: to match this '('
  209 |     for (ll i : v1)
      |         ^
a.cc: At global scope:
a.cc:225:13: error: 'll' was not declared in this scope; did you mean 'all'?
  225 | string itob(ll j)
      |             ^~
      |             all
a.cc:226:1: error: expected ',' or ';' before '{' token
  226 | {
      | ^
a.cc:230:1: error: 'll' does not name a type; did you mean 'all'?
  230 | ll vmax(vector<ll> v)
      | ^~
      | all
a.cc:235:1: error: 'll' does not name a type; did you mean 'all'?
  235 | ll vmin(vector<ll> v)
      | ^~
      | all
a.cc:240:1: error: 'll' does not name a type; did you mean 'all'?
  240 | ll vsum(vector<ll> v)
      | ^~
      | all
a.cc: In function 'bool isOK(int, int)':
a.cc:178:1: warning: control reaches end of non-void function [-Wreturn-type]
  178 | }
      | ^
a.cc: In function 'int set_product(int, int)':
a.cc:217:1: warning: control reaches end of non-void function [-Wreturn-type]
  217 | }
      | ^