From e1710c32fbfc3f59d33c524899ed0144dda60874 Mon Sep 17 00:00:00 2001 From: Anthony Wang Date: Wed, 23 Sep 2020 19:46:30 -0500 Subject: Fixed templates --- Template/basic.cpp | 1 + Template/template.cpp | 3 ++- Template/usaco.cpp | 11 ++++++----- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Template/basic.cpp b/Template/basic.cpp index a0e3d5e..71201ad 100644 --- a/Template/basic.cpp +++ b/Template/basic.cpp @@ -4,6 +4,7 @@ using namespace std; using ll = long long; using ii = pair; +constexpr int MX = 1e5+5; int main() { if (fopen("in", "r")) freopen("in", "r", stdin), freopen("out", "w", stdout); diff --git a/Template/template.cpp b/Template/template.cpp index df2e7ee..7bb7acf 100644 --- a/Template/template.cpp +++ b/Template/template.cpp @@ -25,7 +25,8 @@ using vii = vector; using vpl = vector; using vpd = vector; template using ordered_set = tree, rb_tree_tag, tree_order_statistics_node_update>; template using ordered_multiset = tree, rb_tree_tag, tree_order_statistics_node_update>; // Use with caution constexpr ld PI = 4*atan((ld)1); -constexpr ll MX = 1e5+5, ll INF = 1e9, LINF = 1e18, ll MOD = 1e9+7; +constexpr ll INF = 1e9, LINF = 1e18, MOD = 1e9+7; +constexpr int MX = 1e5+5; int main() { if (fopen("in", "r")) freopen("in", "r", stdin), freopen("out", "w", stdout); diff --git a/Template/usaco.cpp b/Template/usaco.cpp index 9584afc..6344553 100644 --- a/Template/usaco.cpp +++ b/Template/usaco.cpp @@ -2,6 +2,7 @@ #include #include #include +#define io(name) freopen((str(name)+".in").c_str(), "r", stdin), freopen((str(name)+".out").c_str(), "w", stdout), ios_base::sync_with_stdio(0), cin.tie(0) #define f first #define s second #define mp make_pair @@ -25,12 +26,12 @@ using vii = vector; using vpl = vector; using vpd = vector; template using ordered_set = tree, rb_tree_tag, tree_order_statistics_node_update>; template using ordered_multiset = tree, rb_tree_tag, tree_order_statistics_node_update>; // Use with caution constexpr ld PI = 4*atan((ld)1); -constexpr ll MX = 1e5+5, ll INF = 1e9, LINF = 1e18, ll MOD = 1e9+7; +constexpr ll INF = 1e9, LINF = 1e18, MOD = 1e9+7; +constexpr ll MX = 1e5+5; int main() { - ifstream cin("in"); ofstream cout("in"); - ios_base::sync_with_stdio(0), cin.tie(0); - - + io("name"); + + } -- cgit v1.2.3-70-g09d2