#pragma GCC optimize("O0")
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define endl "\n"
#define optimise() ios_base::sync_with_stdio(true); cin.tie(0); cout.tie(0);
#define debug (x) cout << "debugged variable:" << x << endl;
#define map unordered_map
#define set unordered_set
int32_t main() {
return 1;
}
Explanation of template:
#pragma GCC optimize("O0")
means using fast compiler options to optimize#define int long long
— useslong long
by default instead ofint
, prevents overflows#define optimise()
optimises reading input/output#define debug (x)
is a debug function, use it like this:debug(my_variable)
.#define map/set
— uses more efficient unordered hashtable (insert/delete operation in $$$O(1)$$$) instead of regular search tree (which is $$$O(\log n)$$$).