diff options
author | Anthony Wang | 2020-06-21 12:14:42 -0500 |
---|---|---|
committer | GitHub | 2020-06-21 12:14:42 -0500 |
commit | 6e2e62a032053df653437e991db2b68f4df8913e (patch) | |
tree | 573f16405ccad1c4b223e72cd9326fa4e87cc272 | |
parent | 9c5ee5e0b2666825d181309ecd0a72d83c069020 (diff) |
Update usaco.cpp
-rw-r--r-- | Template/usaco.cpp | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/Template/usaco.cpp b/Template/usaco.cpp index ed36e61..3f5b10c 100644 --- a/Template/usaco.cpp +++ b/Template/usaco.cpp @@ -21,31 +21,27 @@ 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; -typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set; -typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_multiset; // WARNING: May be broken +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>; +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); 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(false); - cin.tie(NULL), cout.tie(NULL); + 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); } int main() { - io("abc"); + io("name"); -}
\ No newline at end of file +} |