Skip to content

Instantly share code, notes, and snippets.

@kmkurn
Last active December 13, 2015 21:38
Show Gist options
  • Save kmkurn/4978437 to your computer and use it in GitHub Desktop.
Save kmkurn/4978437 to your computer and use it in GitHub Desktop.
My personal template for competitive programming purpose.
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <bitset>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define pb push_back
#define fi first
#define se second
#define mp make_pair
#define PI acos(-1.0)
#define EPS 1e-7
#define LL long long
#define INF 1000000000
#define PQ priority_queue
#define REP(i, n) for (int i = 0; i < (int) n; i++)
#define PER(i, n) for (int i = (int) n - 1; i >= 0; i--)
#define FORI(i, a, b) for (int i = (int) a; i <= (int) b; i++)
#define FORD(i, a, b) for (int i = (int) a; i >= (int) b; i--)
#define STRTOK(p, s) for (char *p = strtok(s, " "); p != NULL; p = strtok(NULL, " "))
#define RESET(a, b) memset(a, b, sizeof a)
#define ALL(a) a.begin(), a.end()
#define SET(s, i) s |= (1 << i)
#define IS_SET(s, i) (s & (1 << i)) != 0
#define CLR(s, i) s &= (~(1 << i))
#define TGL(s, i) s ^= (1 << i)
#define LS1(s) (s & (-s))
#define NUM_SET(s) __builtin_popcount(s)
typedef pair<int, int> i2;
typedef pair<int, i2> i3;
typedef vector<int> vi;
typedef vector<i2> vi2;
int main() {
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment