Library/Template/usaco.cpp

39 lines
1.6 KiB
C++
Raw Normal View History

2020-01-20 20:17:44 +00:00
#include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/rope>
2020-12-15 20:48:14 +00:00
#define io(name) if (fopen((str(name)+".in").c_str(), "r")) freopen((str(name)+".in").c_str(), "r", stdin), freopen((str(name)+".out").c_str(), "w", stdout)
2020-08-15 21:49:54 +00:00
#define f first
#define s second
2019-08-17 00:48:21 +00:00
#define mp make_pair
#define pb push_back
2020-02-05 23:04:23 +00:00
#define eb emplace_back
2019-08-17 00:48:21 +00:00
#define lb lower_bound
#define ub upper_bound
2020-08-15 21:49:54 +00:00
#define rsz resize
2019-08-17 00:48:21 +00:00
#define sz(x) (int)x.size()
#define all(x) begin(x), end(x)
2020-09-09 03:27:18 +00:00
#define tr(a, x) for (auto & a : x)
2019-08-17 01:02:15 +00:00
#define mem(a, b) memset(a, (b), sizeof(a))
2020-09-09 03:06:09 +00:00
#define pc __builtin_popcount
#define clz __builtin_clz
#define ctz __builtin_ctz
2020-08-13 17:57:14 +00:00
using namespace std; using namespace __gnu_pbds; using namespace __gnu_cxx;
using str = string; using ll = long long; using ld = long double; using cd = complex<ld>;
using ii = pair<int, int>; using pl = pair<ll, ll>; using pd = pair<ld, ld>;
using vi = vector<int>; using vl = vector<ll>; using vd = vector<ld>;
using vii = vector<ii>; using vpl = vector<pl>; using vpd = vector<pd>;
2020-06-21 17:14:42 +00:00
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
2020-09-08 20:32:49 +00:00
constexpr ld PI = 4*atan((ld)1);
2020-09-24 00:46:30 +00:00
constexpr ll INF = 1e9, LINF = 1e18, MOD = 1e9+7;
constexpr ll MX = 1e5+5;
2019-08-14 01:20:12 +00:00
2020-12-14 01:48:29 +00:00
2019-08-14 01:20:12 +00:00
int main() {
2020-12-14 01:50:09 +00:00
io("name"); if (fopen("in", "r")) freopen("in", "r", stdin), freopen("out", "w", stdout);
ios_base::sync_with_stdio(0), cin.tie(0);
2020-09-24 00:46:30 +00:00
2020-08-31 16:28:29 +00:00
2020-06-21 17:14:42 +00:00
}