aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Wang2020-08-13 12:57:14 -0500
committerAnthony Wang2020-08-13 12:57:14 -0500
commitfc3e0a9da79481669a7d2730f71bd53ed9ca6a7f (patch)
treeaa2027725ce9b081b8abe9b1f64cc60ae5be220b
parentee5f54689c71cffdc9547bba660db58c4e9e3961 (diff)
Update usaco.cpp
-rw-r--r--Template/usaco.cpp30
1 files changed, 11 insertions, 19 deletions
diff --git a/Template/usaco.cpp b/Template/usaco.cpp
index 3f5b10c..eb86cb8 100644
--- a/Template/usaco.cpp
+++ b/Template/usaco.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,22 +18,14 @@
#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;
-using str = string;
-using ll = long long ll;
-using ld = long double;
-using cd = complex<ld>;
-using ii = pair<int, int> ii; using pl = pair<ll, ll>; using pd = pair<ld, ld>;
-using vi = vector<int>; using vl = vector<ll>; using vd = vector<vd>;
-using vii = vector<ii>; using vpl = vector<pl>; using vpd = vector<pd>;
+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);
void io(const str& s) {
if (fopen((s+".in").c_str(), "r")) freopen((s+".in").c_str(), "r", stdin), freopen((s+".out").c_str(), "w", stdout);
ios_base::sync_with_stdio(0), cin.tie(0);