Created
March 7, 2019 05:30
-
-
Save Luzhiled/1250a4e2e829b847dd99b071cc2ffdaa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
// boku no template meisou now | |
// clang-format off | |
// #define fs first | |
// #define sc second | |
// #define pb emplace_back | |
// #define mp make_pair | |
// #define all(v) v.begin(), v.end() | |
// #define rall(v) v.rbegin(), v.rend() | |
// #define rep(i, n) for (int i = 0; i < (int)(n); ++(i)) | |
// #define reps(i, n) for (int i = 1; i <= (int)(n); ++(i)) | |
// #define rrep(i, n) for (int i = (int)(n) - 1; i >= 0; --(i)) | |
// #define rreps(i, n) for (int i = (int)(n); i > 0; --(i)) | |
#define range(i, l, r) for (int i = (int)l; i < (int)(r); ++(i)) | |
#define rrange(i, l, r) for (int i = ((int)(r) - 1); i >= (int)l; --(i)) | |
#define whole(f,x,...) ([&](decltype((x)) whole) { return (f)(begin(whole), end(whole), ## __VA_ARGS__); })(x) | |
#define rwhole(f,x,...) ([&](decltype((x)) whole) { return (f)(rbegin(whole), rend(whole), ## __VA_ARGS__); })(x) | |
#define debug(x) cerr << "(" << __LINE__ << ")" << #x << ": " << (x) << endl | |
inline void br(ostream &os = cerr) { os << endl; } | |
using int32 = int; | |
using int64 = long long; | |
const int mod = 1e9 + 7; | |
const int32 inf = 1001001001; | |
const int64 infll = 1001001001001001001ll; | |
const int dx[] = {0, -1, 1, 0, -1, 1, -1, 1}, dy[] = {-1, 0, 0, 1, -1, -1, 1, 1}; | |
const string YES = "YES", NO = "NO", Yes = "Yes", No = "No", yes = "yes", no = "no"; | |
struct IoSetup { IoSetup(){ cin.tie(0); ios::sync_with_stdio(0); cout << fixed << setprecision(10); cerr << fixed << setprecision(10); } } iosetup; | |
template <typename T = int64> T input() { T x; cin >> x; return x; } | |
template <typename T> ostream &operator<<(ostream &os, vector<T> &v) { range(i, 0, v.size()) { os << v[i] << (i + 1 != v.size() ? " " : ""); } return os; } | |
template <typename T> istream &operator>>(istream &is, vector<T> &v) { for (T &in : v) is >> in; return is; } | |
template <typename T1, typename T2> ostream &operator<<(ostream &os, pair<T1, T2> p) { os << p.fs << " " << p.sc; return os; } | |
template <typename T1, typename T2> istream &operator>>(istream &is, pair<T1, T2> &p) { is >> p.fs >> p.sc; return is; } | |
template <typename T> vector<T> make_v(size_t a, T b) { return vector<T>(a, b); } | |
template <typename... Ts> auto make_v(size_t a, Ts... ts) { return vector<decltype(make_v(ts...))>(a, make_v(ts...)); } | |
template <typename T1, typename T2> inline bool chmax(T1 &a, T2 b) { return a < b && (a = b, true); } | |
template <typename T1, typename T2> inline bool chmin(T1 &a, T2 b) { return a > b && (a = b, true); } | |
// clang-format on | |
void solver() { | |
${1} | |
} | |
signed main(int argc, char *argv[]) { | |
solver(); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment