library

Some useful algorithms for competitive programming

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
  20. 20
  21. 21
  22. 22
  23. 23
  24. 24
  25. 25
  26. 26
  27. 27
  28. 28
  29. 29
  30. 30
  31. 31
  32. 32
  33. 33
  34. 34
  35. 35
#include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/rope>
#define f first
#define s second
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define lb lower_bound
#define ub upper_bound
#define rsz resize
#define sz(x) (int)x.size()
#define all(x) begin(x), end(x)
#define tr(a, x) for (auto & a : x)
#define mem(a, b) memset(a, (b), sizeof(a))
#define pc __builtin_popcount
#define clz __builtin_clz
#define ctz __builtin_ctz
using namespace std; using namespace __gnu_pbds; using namespace __gnu_cxx;
using str = string; using ll = long long; using ld = long double; using cd = complex<ld>;
using ii = pair<int, int>; using pl = pair<ll, ll>; using pd = pair<ld, ld>;
using vi = vector<int>;    using vl = vector<ll>;   using vd = vector<ld>;
using vii = vector<ii>;    using vpl = vector<pl>;  using vpd = vector<pd>;
template<typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
template<typename T> using ordered_multiset = tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>; // Use with caution
constexpr ld PI = 4*atan((ld)1);
constexpr ll INF = 1e9, LINF = 1e18, MOD = 1e9+7;
constexpr int MX = 1e5+5;

int main() {
	cin.tie(0)->sync_with_stdio(0);
	
	
}