1
0
Fork 0

Update include.hh

This commit is contained in:
Ariel 2024-01-15 15:15:17 +08:00 committed by GitHub
parent 80d2701c6d
commit f4555da6e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -8,9 +8,6 @@ using pil = pair<int, ll>;
using pli = pair<ll, int>; using pli = pair<ll, int>;
using pll = pair<ll, ll>; using pll = pair<ll, ll>;
#define read(x, type) type x; cin >> x;
#define readvec(a, n, type) vector<type> a(n); for (int i = 0; i < (n); ++i) cin >> a[i];
#define lowbit(x) ((x) & -(x)) #define lowbit(x) ((x) & -(x))
#define popcount(x) (__builtin_popcountll(ll(x))) #define popcount(x) (__builtin_popcountll(ll(x)))
#define parity(x) (__builtin_parityll(ll(x))) #define parity(x) (__builtin_parityll(ll(x)))
@ -41,3 +38,10 @@ struct igt {
} }
}; };
#define read(x, type) type x; cin >> x;
#define readvec(a, n, type) vector<type> a(n); for (int i = 0; i < (n); ++i) cin >> a[i];
#define putvec(a) for (auto&& x : a) cout << x << ' '; cout << endl;
#define debug(x) cerr << #x" = " << x << endl;
#define pa(a) __typeof(a) pa; pa.push_back({}); for (auto&&x : a) pa.push_back(pa.back() + x);
#define sa(a) __typeof(a) sa(a.size() + 1); {int n = a.size(); for (int i = n - 1; i >= 0; --i) sa[i] = sa[i + 1] + a[i];};