Hi! I'd like to share with the community the template I use for competing in Codeforces rounds. It's very simple, so is easier to learn to use it.↵
↵
I hope it helps someone :-)↵
↵
~~~~~↵
#include <bits/stdc++.h>↵
#define mp make_pair↵
#define lb lower_bound↵
#define ub upper_bound↵
#define pb push_back↵
#define fi first↵
#define se second↵
#define rep(i, a, b) for(int i=a;i<b;++i)↵
#define all(x) x.begin(), x.end()↵
#define sz(v) (int)(v.size())↵
#define feq(a, b) (fabs(a - b) < eps)↵
using namespace std;↵
typedef long long ll;↵
typedef long double ld;↵
typedef vector<ll> vll;↵
typedef vector<vll> vvll;↵
typedef pair<ll,ll> pll;↵
typedef vector<pll> vpll;↵
typedef long double ld;↵
↵
const ll INF = 1e18, MOD = 1e9+7;↵
const int int_max = 1e9;↵
const ld eps = 1e-9;↵
↵
void solve() {↵
↵
}↵
int main() {↵
ios::cin.tie(0) -> sync_with_stdio(0);↵
cin.tie(0);↵
int T = 1;↵
cin>>T;//You can comment this if you don't need it↵
while(T--) {↵
solve();↵
}↵
}↵
~~~~~↵
↵
↵
I hope it helps someone :-)↵
↵
~~~~~↵
#include <bits/stdc++.h>↵
#define mp make_pair↵
#define lb lower_bound↵
#define ub upper_bound↵
#define pb push_back↵
#define fi first↵
#define se second↵
#define rep(i, a, b) for(int i=a;i<b;++i)↵
#define all(x) x.begin(), x.end()↵
#define sz(v) (int)(v.size())↵
#define feq(a, b) (fabs(a - b) < eps)↵
using namespace std;↵
typedef long long ll;↵
typedef long double ld;↵
typedef vector<ll> vll;↵
typedef vector<vll> vvll;↵
typedef pair<ll,ll> pll;↵
typedef vector<pll> vpll;↵
const ll INF = 1e18, MOD = 1e9+7;↵
const int int_max = 1e9;↵
const ld eps = 1e-9;↵
↵
void solve() {↵
↵
}↵
int main() {↵
cin>>T;//You can comment this if you don't need it↵
while(T--) {↵
solve();↵
}↵
}↵
~~~~~↵
↵