aboutsummaryrefslogtreecommitdiff
path: root/Template/usaco.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Template/usaco.cpp')
-rw-r--r--Template/usaco.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/Template/usaco.cpp b/Template/usaco.cpp
index f730b4c..9584afc 100644
--- a/Template/usaco.cpp
+++ b/Template/usaco.cpp
@@ -12,8 +12,11 @@
#define rsz resize
#define sz(x) (int)x.size()
#define all(x) begin(x), end(x)
-#define tr(a, x) for (auto& a : x)
+#define tr(a, x) for (auto & a : x)
#define mem(a, b) memset(a, (b), sizeof(a))
+#define pc __builtin_popcount
+#define clz __builtin_clz
+#define ctz __builtin_ctz
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>;
@@ -21,14 +24,12 @@ using vi = vector<int>; using vl = vector<ll>; using vd = vector<ld>;
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; 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 ld PI = 4*atan((ld)1);
+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);