From 6f849c97711b88160e4c4c959b32f9d7becf396b Mon Sep 17 00:00:00 2001 From: Anthony Wang Date: Wed, 9 Sep 2020 17:13:35 -0500 Subject: [PATCH] Update templates --- Template/template.cpp | 2 +- Template/usaco.cpp | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Template/template.cpp b/Template/template.cpp index 5d94c8f..df2e7ee 100644 --- a/Template/template.cpp +++ b/Template/template.cpp @@ -24,8 +24,8 @@ using vi = vector; using vl = vector; using vd = vector; 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 ll MX = 1e5+5, ll INF = 1e9, LINF = 1e18, ll MOD = 1e9+7; constexpr ld PI = 4*atan((ld)1); +constexpr ll MX = 1e5+5, ll INF = 1e9, LINF = 1e18, ll MOD = 1e9+7; 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 5f82d7e..9584afc 100644 --- a/Template/usaco.cpp +++ b/Template/usaco.cpp @@ -24,15 +24,12 @@ using vi = vector; using vl = vector; using vd = vector; 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 ll MX = 1e5+5, ll INF = 1e9, LINF = 1e18, 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); -} +constexpr ll MX = 1e5+5, ll INF = 1e9, LINF = 1e18, ll MOD = 1e9+7; int main() { - io("name"); + ifstream cin("in"); ofstream cout("in"); + ios_base::sync_with_stdio(0), cin.tie(0);