Skip to content

Instantly share code, notes, and snippets.

@redcpp
Last active March 11, 2018 22:52
Show Gist options
  • Save redcpp/1857240df85800a7b798d28ba9d5bdcd to your computer and use it in GitHub Desktop.
Save redcpp/1857240df85800a7b798d28ba9d5bdcd to your computer and use it in GitHub Desktop.
Competitive programming template for C++11
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
const int INF = (int)1e9 + 7;
#define deb(x) cerr << #x << " = " << x << endl
#define sz(a) (int)(a).size()
#define all(a) (a).begin(), (a).end()
#define sq(x) (x) * (x)
#define pb push_back
#define fi first
#define se second
#define endl '\n'
#define UNIQUE(a) sort(all(a)), (a).erase(unique(all(a)), (a).end())
#define FOR(i, a, b) for (int i(a); i < b; ++i)
#define REP(i, n) FOR (i, 0, n)
#define FORD(i, a, b) for (int i(a); i >= b; --i)
const int N = 1e5 + 7;
int n;
int main (void) {
cin >> n;
vector<int> a(n);
REP(i, n) cin >> a[i];
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment