diff options
author | Anthony Wang | 2020-08-11 14:39:24 -0500 |
---|---|---|
committer | GitHub | 2020-08-11 14:39:24 -0500 |
commit | e03adb2f8cfaa7b04883123de9ea6fb170dbad65 (patch) | |
tree | 4d3358648c6085ccb33a09a954ed94649ef65d80 | |
parent | 1ce1172d4c378d83e2a18f0ba354fa59fdc17cb9 (diff) |
Update template.cpp
-rw-r--r-- | Template/template.cpp | 34 |
1 files changed, 13 insertions, 21 deletions
diff --git a/Template/template.cpp b/Template/template.cpp index d9f9187..82dab59 100644 --- a/Template/template.cpp +++ b/Template/template.cpp @@ -2,11 +2,11 @@ #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/assoc_container.hpp> #include <ext/rope> -#define FOR(i, a, b, in) for (int i = (a); i < (b); i += in) -#define REP(i, a, b) for (int i = (a); i < (b); i++) -#define RFOR(i, a, b, in) for (int i = (a) - 1; i >= (b); i -= in) -#define RREP(i, a, b) for (int i = (a) - 1; i >= (b); i--) -#define trav(a, x) for (auto& a : x) +#define F(i, a, b, in) for (int i = (a); i < (b); i += in) +#define R(i, a, b) for (int i = (a); i < (b); i++) +#define RF(i, a, b, in) for (int i = (a) - 1; i >= (b); i -= in) +#define RR(i, a, b) for (int i = (a) - 1; i >= (b); i--) +#define tr(a, x) for (auto& a : x) #define mp make_pair #define pb push_back #define eb emplace_back @@ -18,26 +18,18 @@ #define all(x) begin(x), end(x) #define rsz resize #define mem(a, b) memset(a, (b), sizeof(a)) -using namespace std; -using namespace __gnu_pbds; -using namespace __gnu_cxx; -typedef string str; -typedef long long ll; -typedef long double ld; -typedef complex<ld> cd; -typedef pair<int, int> ii; typedef pair<ll, ll> pl; typedef pair<ld, ld> pd; -typedef vector<int> vi; typedef vector<ll> vl; typedef vector<ld> vd; -typedef vector<ii> vii; typedef vector<pl> vpl; typedef vector<pd> vpd; +using namespace std; using namespace __gnu_pbds; using namespace __gnu_cxx; +using str = string; using ll = long long; using ld = long double; using cd = complex<ld>; +using ii = pair<int, int>; using pl = pair<ll, ll>; using pd = pair<ld, ld>; +using vi = vector<int>; using vl = vector<ll>; using vd = vector<ld>; +using vii = vector<ii>; using vpl = vector<pl>; using vpd = vector<pd>; template<typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; template<typename T> using ordered_multiset = tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>; // Use with caution -constexpr int INF = 1e9; -constexpr ll LINF = 1e18; -constexpr ll MOD = 1e9+7; -const ld PI = 4*atan((ld)1); +constexpr int INF = 1e9; constexpr ll LINF = 1e18; constexpr ll MOD = 1e9+7; constexpr ld PI = 4*atan((ld)1); int main() { if (fopen("in", "r")) freopen("in", "r", stdin), freopen("out", "w", stdout); ios_base::sync_with_stdio(0), cin.tie(0); - - + + } |