use macro in competitive programing c 2b 2b

Solutions on MaxInterview for use macro in competitive programing c 2b 2b by the best coders in the world

showing results for - "use macro in competitive programing c 2b 2b"
Timothe
10 Apr 2018
1#include <bits/stdc++.h> // Include every standard library
2using namespace std;
3#define FASTIO ios::sync_with_stdio(false); cin.tie(0); cout.tie(0) 
4#define MULTIPLE_TEST int t; cin>>t; while(t--) //for multilple cases problems
5#define bit(x,i) (x&(1<<i))  //select the bit of position i of x
6#define lowbit(x) ((x)&((x)^((x)-1))) //get the lowest bit of x
7#define hBit(msb,n) asm("bsrl %1,%0" : "=r"(msb) : "r"(n)) //get the highest bit of x, maybe the fastest
8#define FOR(i,L,R) for (int i = L; i < R; i++) //next four are for "for loops"
9#define FER(i,L,R) for (int i = L; i <= R; i++)
10#define FOD(i,L,R) for (int i = L; i > R; i--)
11#define FED(i,L,R) for (int i = L; i >= R; i--)
12#define clr(a,x) memset(a,x,sizeof(a)) //set elements of array to some value
13#define all(c) (c).begin(),(c).end() //handy for function like "sort()"
14#define PRESENT(c,x) ((c).find(x) != (c).end()) 
15#define CPRESENT(c,x) (find(ALL(c),x) != (c).end()) 
16#define MAX(a, b) a = max(a, b)
17#define MIN(a, b) a = min(a, b)
18#define INF 0x7fffffff 
19#define ll long long //data types used often, but you don't want to type them time by time
20#define mp make_pair
21#define fi first
22#define se second
23#define pb push_back
24#define eb emplace_back 
25#define gcd 
26#define MAXN 10005
27#define MOD 1000000007 
28typedef pair<int, int> pii;
29typedef pair<ll, ll> pll;
30typedef pair<string, string> pss;
31typedef vector<int> vi;
32typedef vector<vi> vvi;
33typedef vector<pii> vii;
34typedef vector<ll> vl;
35typedef vector<vl> vvl;
36