Submission #501043

# Submission time Handle Problem Language Result Execution time Memory
501043 2022-01-02T09:40:40 Z erray Crossing (JOI21_crossing) C++17
Compilation error
0 ms 0 KB
"C:\Users\Cengiz Eray Aslan\Desktop\codes\joi\oc21\a\sol.cpp" #undef DEBUG
// author: erray
#include <bits/stdc++.h>
#ifdef DEBUG
  #include "debug.h"
#else
  #define debug(...) void(37)
  #define here void(37)
#endif

using namespace std;

constexpr int B = 4;
constexpr int md0 = int(1e9) + 7;
constexpr int md1 = 999999937;
vector<int> pw0({1});
vector<int> pw1({1});
int pw(int b, int t) {
  assert(b == md0 || b == md1);
  auto& a = (b == md0 ? pw0 : pw1);
  while (int(a.size()) <= t) {
    a.push_back(int(a.back() * 1LL * B % b));
  }
  return a[t];
}

template<int md> struct Hash {
  int val = 0;
  int size = 0;
  Hash() { size = 0,  val = 0; }
  Hash operator+(const Hash& ot) {
    Hash res;
    res.val = int(((1LL * pw(md, size) * ot.val) + val) % md); 
    res.size = size + ot.size;
    return res; 
  }
  Hash operator *(int x) {
    Hash res;
    res.val = int(1LL * val * x % md);
    return res;
  }
};

template<int T> bool operator<(Hash<T> x, Hash<T> y) {
  return x.val < y.val;
}

struct Rhash {
  Hash<md0> h0;
  Hash<md1> h1;
  Rhash() : h0(), h1() { h0.size = h1.size = 0; } 
  Rhash(int x) { 
    h0.val = x;
    h1.val = x;
    h0.size = h1.size = 1;
  }
  Rhash operator+(const Rhash& ot) {
    Rhash res;
    res.h0 = h0 + ot.h0;
    res.h1 = h1 + ot.h1;
    return res;
  }
  Rhash operator*(const int& x) {
    Rhash res;
    res.h0 = h0 * x;
    res.h1 = h1 * x;
    return res;
  }
  Rhash& operator=(const Rhash& ot) {
    h0 = ot.h0;                             
    h1 = ot.h1;
    return *this;
  }
};

bool operator<(Rhash x, Rhash y) {
  return tuple{x.h0, x.h1, x.h0.size} < tuple{y.h0, y.h1, y.h0.size};  
}

/*
string to_string(Rhash x) {
  return to_string(tuple{x.h0.val, x.h1.val, x.h0.size});
}
*/

vector<Rhash> def;

struct SegTree {
  struct node {
    Rhash val;
    int tag = -1;
    void modify(int l, int r, int x) {
      int size = (r - l + 1);
      tag = x;
      val = (def[size] * x);
      val.h0.size = val.h1.size = size;
    }

    node operator+(const node& ot) {
      node res;
      res.val = val + ot.val;
      return res; 
    }
  };
  
  int n;
  vector<node> tree;
  #define init int mid = (l + r) >> 1, rv = v + ((mid - l + 1) << 1)
  void pull(int v, int rv) {
    tree[v] = tree[v + 1] + tree[rv];
  }

  void push(int v, int l, int r) {
    init;
    if (tree[v].tag != -1) {
      tree[v + 1].modify(l, mid, tree[v].tag);
      tree[rv].modify(mid + 1, r, tree[v].tag);
      tree[v].tag = -1;
    }
  }

  void build(int v, int l, int r) {
    if (l == r) {
      tree[v].val = Rhash(1);
      return;
    }
    init;
    build(v + 1, l, mid);
    build(rv, mid + 1, r);
    pull(v, rv);
  }
   
  SegTree(int _n) : n(_n) {
    tree.resize((n << 1) - 1);
    //build(0, 0, n - 1); 
  }

  void modify(int v, int l, int r, int ll, int rr, int x) {
    if (l >= ll && rr >= r) {
      tree[v].modify(l, r, x);
      debug(tree[v].val);
      return;
    }
    init;
    push(v, l, r);
    if (mid >= ll) {
      modify(v + 1, l, mid, ll, rr, x);
    }
    if (mid < rr) {
      modify(rv, mid + 1, r, ll, rr, x);
    }              
    debug(l, r, tree[v].val);
    pull(v, rv);
  }

  node get() {
    return tree[0];
  }
  void modify(int ll, int rr, int x) {
    assert(ll >= 0 && rr < n && ll <= rr && x > 0 && x < 4);   
    modify(0, 0, n - 1, ll, rr, x);
  } 
};

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int N;
  cin >> N;
  def.resize(N + 1);
  for (int i = 0; i < N; ++i) {
    def[i + 1] = def[i] + Rhash(1);
  }
  debug(def);
  array<string, 3> S;
  for (int i = 0; i < 3; ++i) {
    cin >> S[i];
  }

  int Q;
  string T;
  cin >> Q >> T;
  array<int, 256> cid = {};
  cid['J'] = 0;
  cid['O'] = 1;
  cid['I'] = 2;
  array<vector<int>, 3> vals;
  for (int i = 0; i < 3; ++i) {
    vals[i].resize(N);
    for (int j = 0; j < N; ++j) {
      vals[i][j] = cid[S[i][j]];
    }
  }
  debug(vals);

  vector<bool> vis(27);  
  queue<int> que;
  vector<Rhash> can;
  auto P = [&](int x) {
    if (vis[x]) {
      return;
    }
    vis[x] = true;
    que.push(x);
    vector<int> res(N, 0);
    for (int j = 0; j < 3; ++j) {
      int c = x % 3;
      for (int i = 0; i < N; ++i) {
        res[i] += c * vals[j][i];   
      }
      x /= 3;
    }

    for (auto& e : res) {
      e %= 3;
    }
    debug(res);
    Rhash add;
    for (int i = 0; i < N; ++i) {
      add = add + Rhash(1 + res[i]);
      debug(add);
    }
    can.push_back(add);
  };
  P(1);
  P(3);
  P(9);

  while (!que.empty()) {
    int v = que.front();
    que.pop();
    array<int, 3> me;
    int stv = v;
    for (int i = 0; i < 3; ++i) {
      me[i] = stv % 3;
      stv /= 3;
    }

    for (int add = 0; add < 3; ++add) {
      auto nw = me;
      (nw[add] += 1) %= 3;
      int res = 0;
      for (int j = 2; j >= 0; --j) {
        res *= 3;
        nw[j] = (3 - nw[j]) % 3;
        res += nw[j];
      }
      P(res);
    }
  }

  SegTree st(N);
  for (int i = 0; i < N; ++i) {
    debug(cid[T[i]] + 1);
    st.modify(i, i, cid[T[i]] + 1);  
  }
  
  debug(can);
  auto Can = [&](Rhash x) {
    for (auto e : can) {
      if (e.h0.val == x.h0.val && e.h1.val == x.h1.val) {
        return true;
      }  
    }
    return false;
  };
  
  debug(st.get().val);
  cout << (Can(st.get().val) ? "Yes" : "No") << '\n';
  while (Q--) {
    int L, R;
    char C;
    cin >> L >> R >> C;
    --L, --R;
    debug(L, R, cid[C]);
    st.modify(L, R, cid[C] + 1);
    debug(st.get().val);
    cout << (Can(st.get().val) ? "Yes" : "No") << '\n';
  }
}           	

Compilation message

Main.cpp:1:1: error: incomplete universal character name \U
    1 | "C:\Users\Cengiz Eray Aslan\Desktop\codes\joi\oc21\a\sol.cpp" #undef DEBUG
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Main.cpp:1:1: warning: unknown escape sequence: '\C'
Main.cpp:1:1: warning: unknown escape sequence: '\D'
Main.cpp:1:1: warning: unknown escape sequence: '\c'
Main.cpp:1:1: warning: unknown escape sequence: '\j'
Main.cpp:1:1: warning: unknown escape sequence: '\o'
Main.cpp:1:1: warning: unknown escape sequence: '\s'
Main.cpp:1:63: error: stray '#' in program
    1 | "C:\Users\Cengiz Eray Aslan\Desktop\codes\joi\oc21\a\sol.cpp" #undef DEBUG
      |                                                               ^
Main.cpp:1:1: error: expected unqualified-id before string constant
    1 | "C:\Users\Cengiz Eray Aslan\Desktop\codes\joi\oc21\a\sol.cpp" #undef DEBUG
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/10/cmath:43,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
                 from Main.cpp:3:
/usr/include/c++/10/ext/type_traits.h:162:35: error: 'bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity
  162 |   __is_null_pointer(std::nullptr_t)
      |                                   ^
/usr/include/c++/10/ext/type_traits.h:157:5: note: previous declaration 'template<class _Type> bool __gnu_cxx::__is_null_pointer(_Type)'
  157 |     __is_null_pointer(_Type)
      |     ^~~~~~~~~~~~~~~~~
/usr/include/c++/10/ext/type_traits.h:162:26: error: 'nullptr_t' is not a member of 'std'
  162 |   __is_null_pointer(std::nullptr_t)
      |                          ^~~~~~~~~
In file included from /usr/include/c++/10/bits/move.h:57,
                 from /usr/include/c++/10/bits/stl_pair.h:59,
                 from /usr/include/c++/10/bits/stl_algobase.h:64,
                 from /usr/include/c++/10/bits/specfun.h:45,
                 from /usr/include/c++/10/cmath:1927,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
                 from Main.cpp:3:
/usr/include/c++/10/type_traits:402:26: error: 'std::size_t' has not been declared
  402 |   template<typename _Tp, std::size_t _Size>
      |                          ^~~
/usr/include/c++/10/type_traits:403:25: error: '_Size' was not declared in this scope
  403 |     struct is_array<_Tp[_Size]>
      |                         ^~~~~
/usr/include/c++/10/type_traits:403:31: error: template argument 1 is invalid
  403 |     struct is_array<_Tp[_Size]>
      |                               ^
/usr/include/c++/10/type_traits:508:42: error: 'nullptr_t' is not a member of 'std'
  508 |     struct __is_null_pointer_helper<std::nullptr_t>
      |                                          ^~~~~~~~~
/usr/include/c++/10/type_traits:508:51: error: template argument 1 is invalid
  508 |     struct __is_null_pointer_helper<std::nullptr_t>
      |                                                   ^
/usr/include/c++/10/type_traits:1351:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
 1351 |     : public integral_constant<std::size_t, alignof(_Tp)>
      |                                     ^~~~~~
In file included from /usr/include/stdlib.h:31,
                 from /usr/include/c++/10/bits/std_abs.h:38,
                 from /usr/include/c++/10/cmath:47,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
                 from Main.cpp:3:
/usr/lib/gcc/x86_64-linux-gnu/10/include/stddef.h:209:23: note: 'size_t' declared here
  209 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
In file included from /usr/include/c++/10/bits/move.h:57,
                 from /usr/include/c++/10/bits/stl_pair.h:59,
                 from /usr/include/c++/10/bits/stl_algobase.h:64,
                 from /usr/include/c++/10/bits/specfun.h:45,
                 from /usr/include/c++/10/cmath:1927,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
                 from Main.cpp:3:
/usr/include/c++/10/type_traits:1351:57: error: template argument 1 is invalid
 1351 |     : public integral_constant<std::size_t, alignof(_Tp)>
      |                                                         ^
/usr/include/c++/10/type_traits:1351:57: note: invalid template non-type parameter
/usr/include/c++/10/type_traits:1360:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
 1360 |     : public integral_constant<std::size_t, 0> { };
      |                                     ^~~~~~
In file included from /usr/include/stdlib.h:31,
                 from /usr/include/c++/10/bits/std_abs.h:38,
                 from /usr/include/c++/10/cmath:47,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
                 from Main.cpp:3:
/usr/lib/gcc/x86_64-linux-gnu/10/include/stddef.h:209:23: note: 'size_t' declared here
  209 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
In file included from /usr/include/c++/10/bits/move.h:57,
                 from /usr/include/c++/10/bits/stl_pair.h:59,
                 from /usr/include/c++/10/bits/stl_algobase.h:64,
                 from /usr/include/c++/10/bits/specfun.h:45,
                 from /usr/include/c++/10/cmath:1927,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
                 from Main.cpp:3:
/usr/include/c++/10/type_traits:1360:46: error: template argument 1 is invalid
 1360 |     : public integral_constant<std::size_t, 0> { };
      |                                              ^
/usr/include/c++/10/type_traits:1360:46: note: invalid template non-type parameter
/usr/include/c++/10/type_traits:1362:26: error: 'std::size_t' has not been declared
 1362 |   template<typename _Tp, std::size_t _Size>
      |                          ^~~
/usr/include/c++/10/type_traits:1363:21: error: '_Size' was not declared in this scope
 1363 |     struct rank<_Tp[_Size]>
      |                     ^~~~~
/usr/include/c++/10/type_traits:1363:27: error: template argument 1 is invalid
 1363 |     struct rank<_Tp[_Size]>
      |                           ^
/usr/include/c++/10/type_traits:1364:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
 1364 |     : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
      |                                     ^~~~~~
In file included from /usr/include/stdlib.h:31,
                 from /usr/include/c++/10/bits/std_abs.h:38,
                 from /usr/include/c++/10/cmath:47,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
                 from Main.cpp:3:
/usr/lib/gcc/x86_64-linux-gnu/10/include/stddef.h:209:23: note: 'size_t' declared here
  209 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
In file included from /usr/include/c++/10/bits/move.h:57,
                 from /usr/include/c++/10/bits/stl_pair.h:59,
                 from /usr/include/c++/10/bits/stl_algobase.h:64,
                 from /usr/include/c++/10/bits/specfun.h:45,
                 from /usr/include/c++/10/cmath:1927,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
                 from Main.cpp:3:
/usr/include/c++/10/type_traits:1364:65: error: template argument 1 is invalid
 1364 |     : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
      |                                                                 ^
/usr/include/c++/10/type_traits:1364:65: note: invalid template non-type parameter
/usr/include/c++/10/type_traits:1368:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
 1368 |     : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
      |                                     ^~~~~~
In file included from /usr/include/stdlib.h:31,
                 from /usr/include/c++/10/bits/std_abs.h:38,
                 from /usr/include/c++/10/cmath:47,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
                 from Main.cpp:3:
/usr/lib/gcc/x86_64-linux-gnu/10/include/stddef.h:209:23: note: 'size_t' declared here
  209 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
In file included from /usr/include/c++/10/bits/move.h:57,
                 from /usr/include/c++/10/bits/stl_pair.h:59,
                 from /usr/include/c++/10/bits/stl_algobase.h:64,
                 from /usr/include/c++/10/bits/specfun.h:45,
                 from /usr/include/c++/10/cmath:1927,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
                 from Main.cpp:3:
/usr/include/c++/10/type_traits:1368:65: error: template argument 1 is invalid
 1368 |     : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
      |                                                                 ^
/usr/include/c++/10/type_traits:1368:65: note: invalid template non-type parameter
/usr/include/c++/10/type_traits:1373:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
 1373 |     : public integral_constant<std::size_t, 0> { };
      |                                     ^~~~~~
In file included from /usr/include/stdlib.h:31,
                 from /usr/include/c++/10/bits/std_abs.h:38,
                 from /usr/include/c++/10/cmath:47,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
                 from Main.cpp:3:
/usr/lib/gcc/x86_64-linux-gnu/10/include/stddef.h:209:23: note: 'size_t' declared here
  209 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
In file included from /usr/include/c++/10/bits/move.h:57,
                 from /usr/include/c++/10/bits/stl_pair.h:59,
                 from /usr/include/c++/10/bits/stl_algobase.h:64,
                 from /usr/include/c++/10/bits/specfun.h:45,
                 from /usr/include/c++/10/cmath:1927,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
                 from Main.cpp:3:
/usr/include/c++/10/type_traits:1373:46: error: template argument 1 is invalid
 1373 |     : public integral_constant<std::size_t, 0> { };
      |                                              ^
/usr/include/c++/10/type_traits:1373:46: note: invalid template non-type parameter
/usr/include/c++/10/type_traits:1375:42: error: 'std::size_t' has not been declared
 1375 |   template<typename _Tp, unsigned _Uint, std::size_t _Size>
      |                                          ^~~
/usr/include/c++/10/type_traits:1376:23: error: '_Size' was not declared in this scope
 1376 |     struct extent<_Tp[_Size], _Uint>
      |                       ^~~~~
/usr/include/c++/10/type_traits:1376:36: error: template argument 1 is invalid
 1376 |     struct extent<_Tp[_Size], _Uint>
      |                                    ^
/usr/include/c++/10/type_traits:1377:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
 1377 |     : public integral_constant<std::size_t,
      |                                     ^~~~~~
In file included from /usr/include/stdlib.h:31,
                 from /usr/include/c++/10/bits/std_abs.h:38,
                 from /usr/include/c++/10/cmath:47,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
                 from Main.cpp:3:
/usr/lib/gcc/x86_64-linux-gnu/10/include/stddef.h:209:23: note: 'size_t' declared here
  209 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
In file included from /usr/include/c++/10/bits/move.h:57,
                 from /usr/include/c++/10/bits/stl_pair.h:59,
                 from /usr/include/c++/10/bits/stl_algobase.h:64,
                 from /usr/include/c++/10/bits/specfun.h:45,
                 from /usr/include/c++/10/cmath:1927,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
                 from Main.cpp:3:
/usr/include/c++/10/type_traits:1378:24: error: '_Size' was not declared in this scope
 1378 |           _Uint == 0 ? _Size : extent<_Tp,
      |                        ^~~~~
/usr/include/c++/10/type_traits:1379:28: error: template argument 1 is invalid
 1379 |           _Uint - 1>::value>
      |                            ^
/usr/include/c++/10/type_traits:1379:28: note: invalid template non-type parameter
/usr/include/c++/10/type_traits:1384:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
 1384 |     : public integral_constant<std::size_t,
      |                                     ^~~~~~
In file included from /usr/include/stdlib.h:31,
                 from /usr/include/c++/10/bits/std_abs.h:38,
                 from /usr/include/c++/10/cmath:47,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
                 from Main.cpp:3:
/usr/lib/gcc/x86_64-linux-gnu/10/include/stddef.h:209:23: note: 'size_t' declared here
  209 | typedef __SIZE_TYPE__ size_t;
      |                       ^~~~~~
In file included from /usr/include/c++/10/bits/move.h:57,
                 from /usr/include/c++/10/bits/stl_pair.h:59,
                 from /usr/include/c++/10/bits/stl_algobase.h:64,
                 from /usr/include/c++/10/bits/specfun.h:45,
                 from /usr/include/c++/10/cmath:1927,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
                 from Main.cpp:3:
/usr/include/c++/10/type_traits:1386:31: error: template argument 1 is invalid
 1386 |              _Uint - 1>::value>
      |                               ^
/usr/include/c++/10/type_traits:1386:31: note: invalid template non-type parameter
/usr/include/c++/10/type_traits:1975:26: error: 'std::size_t' has not been declared
 1975 |   template<typename _Tp, std::size_t _Size>
      |                          ^~~
/usr/include/c++/10/type_traits:1976:30: error: '_Size' was not declared in this scope
 1976 |     struct remove_extent<_Tp[_Size]>
      |                              ^~~~~
/usr/include/c++/10/type_traits:1976:36: error: template argument 1 is invalid
 1976 |     struct remove_extent<_Tp[_Size]>
      |                                    ^
/usr/include/c++/10/type_traits:1988:26: error: 'std::size_t' has not been declared
 1988 |   template<typename _Tp, std::size_t _Size>
      |                          ^~~
/usr/include/c++/10/type_traits:1989:35: error: '_Size' was not declared in this scope
 1989 |     struct remove_all_extents<_Tp[_Size]>
      |                                   ^~~~~
/usr/include/c++/10/type_traits:1989:41: error: template argument 1 is invalid
 1989 |     struct remove_all_extents<_Tp[_Size]>
      |                                         ^
/usr/include/c++/10/type_traits:2047:12: error: 'std::size_t' has not been declared
 2047 |   template<std::size_t _Len>
      |            ^~~
/usr/include/c++/10/type_traits:2052:23: error: '_Len' was not declared in this scope
 2052 |  unsigned char __data[_Len];
      |                       ^~~~
/usr/include/c++/10/type_traits:2067:12: error: 'std::size_t' has not been declared
 2067 |   template<std::size_t _Len, std::size_t _Align =
      |            ^~~
/usr/include/c++/10/type_traits:2067:30: error: 'std::size_t' has not been declared
 2067 |   template<std::size_t _Len, std::size_t _Align =
      |                              ^~~
/usr/include/c++/10/type_traits:2068:48: error: '_Len' was not declared in this scope
 2068 |     __alignof__(typename __aligned_storage_msa<_Len>::__type)>
      |                                                ^~~~
/usr/include/c++/10/type_traits:2068:52: error: template argument 1 is invalid
 2068 |     __alignof__(typename __aligned_storage_msa<_Len>::__type)>
      |                                                    ^
/usr/include/c++/10/type_traits:2073:23: error: '_Len' was not declared in this scope
 2073 |  unsigned char __data[_Len];
      |                       ^~~~
/usr/include/c++/10/type_traits:2074:37: error: '_Align' was not declared in this scope
 2074 |  struct __attribute__((__aligned__((_Align)))) { } __align;
      |                                     ^~~~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
                 from /usr/include/c++/10/bits/specfun.h:45,
                 from /usr/include/c++/10/cmath:1927,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
                 from Main.cpp:3:
/usr/include/c++/10/bits/stl_pair.h:92:12: error: 'std::size_t' has not been declared
   92 |   template<std::size_t...>
      |            ^~~
/usr/include/c++/10/bits/stl_pair.h:449:36: error: 'std::size_t' has not been declared
  449 |       template<typename... _Args1, std::size_t... _Indexes1,
      |                                    ^~~
/usr/include/c++/10/bits/stl_pair.h:450:36: error: 'std::size_t' has not been declared
  450 |                typename... _Args2, std::size_t... _Indexes2>
      |                                    ^~~
/usr/include/c++/10/bits/stl_pair.h:453:27: error: '_Indexes1' was not declared in this scope
  453 |              _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>);
      |                           ^~~~~~~~~
/usr/include/c++/10/bits/stl_pair.h:453:36: error: expected parameter pack before '...'
  453 |              _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>);
      |                                    ^~~
/usr/include/c++/10/bits/stl_pair.h:453:39: error: template argument 1 is invalid
  453 |              _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>);
      |                                       ^
/usr/include/c++/10/bits/stl_pair.h:453:55: error: '_Indexes2' was not declared in this scope
  453 |              _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>);
      |                                                       ^~~~~~~~~
/usr/include/c++/10/bits/stl_pair.h:453:64: error: expected parameter pack before '...'
  453 |              _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>);
      |                                                                ^~~
/usr/include/c++/10/bits/stl_pair.h:453:67: error: template argument 1 is invalid
  453 |              _Index_tuple<_Indexes1...>, _Index_tuple<_Indexes2...>);
      |                                                                   ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:65,
                 from /usr/include/c++/10/bits/specfun.h:45,
                 from /usr/include/c++/10/cmath:1927,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
                 from Main.cpp:3:
/usr/include/c++/10/bits/stl_iterator_base_types.h:125:67: error: 'ptrdiff_t' does not name a type
  125 |   template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t,
      |                                                                   ^~~~~~~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:65,
                 from /usr/include/c++/10/bits/specfun.h:45,
                 from /usr/include/c++/10/cmath:1927,
                 from /usr/include/x86_64-linux-gnu/c++/10