Update usaco.cpp

This commit is contained in:
Anthony Wang 2020-06-21 12:14:42 -05:00 committed by GitHub
parent 9c5ee5e0b2
commit 6e2e62a032
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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");
}
}