aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Wang2020-09-23 19:46:30 -0500
committerAnthony Wang2020-09-23 19:46:30 -0500
commite1710c32fbfc3f59d33c524899ed0144dda60874 (patch)
tree9aea3de57ef86a53cbf50c3bb98ee18e1411e470
parentd79f8f412ce62129f724df17fe7c13827499e01b (diff)
Fixed templates
-rw-r--r--Template/basic.cpp1
-rw-r--r--Template/template.cpp3
-rw-r--r--Template/usaco.cpp11
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<int, int>;
+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<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 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 <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/rope>
+#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<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 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");
+
+
}