Skip to content

Instantly share code, notes, and snippets.

@abinashmeher999
abinashmeher999 / comp_macros.h
Created July 27, 2015 13:19
Some of the most used macros in competitive programming
#include <cmath>
#include <climits>
#include <queue>
#include <vector>
#include <map>
#include <cstdlib>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <sstream> // istringstream buffer(myString);
@knuu
knuu / mex_query.cpp
Created February 24, 2018 10:52
range mex query problem
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define FOR(i,s,x) for(int i=s;i<(int)(x);i++)
#define REP(i,x) FOR(i,0,x)
#define ALL(c) c.begin(), c.end()
#define UNIQUE(c) sort(ALL(c)), c.erase(unique(ALL(c)), c.end())
const int INF = INT_MAX;
@mmoralesf
mmoralesf / latex_multiplechoice_exam.tex
Last active September 6, 2023 18:44
LaTeX Multiple Choice Exam Template (Precalculus)
\documentclass[legalpaper, 12pt, addpoints]{exam}
\usepackage[margin=1in]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{graphics}
\usepackage{color}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{enumitem}
\usepackage{xcolor}
\usepackage{cancel}