Skip to content

Instantly share code, notes, and snippets.

@zwliew
Created December 28, 2019 00:21
Show Gist options
  • Save zwliew/4d620af1b67a80e6feb283c3be322a91 to your computer and use it in GitHub Desktop.
Save zwliew/4d620af1b67a80e6feb283c3be322a91 to your computer and use it in GitHub Desktop.
C++ competitive programming template
#include <bits/stdc++.h>
using namespace std;
#define s32 int32_t
#define s64 int64_t
#define u32 uint32_t
#define u64 uint64_t
#define f32 float
#define f64 double
#define vi vector<s32>
#define vpii vector<pair<s32, s32>>
#define mean(a, b) min(a, b) + (abs(b - a) / 2)
#define FASTIO() \
cin.tie(nullptr); \
ios::sync_with_stdio(false);
template <typename T, typename U>
inline void amin(T &x, U y) {
if (y < x) x = y;
}
template <typename T, typename U>
inline void amax(T &x, U y) {
if (x < y) x = y;
}
int main() { FASTIO(); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment