1
0
Fork 0

Update include.hh

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

View File

@ -42,6 +42,7 @@ struct igt {
#define readvec(a, n, type) vector<type> a(n); for (int i = 0; i < (n); ++i) cin >> a[i]; #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 putvec(a) for (auto&& x : a) cout << x << ' '; cout << endl;
#define debug(x) cerr << #x" = " << x << endl; #define debug(x) cerr << #x" = " << x << endl;
#define debugvec(a) cerr << #a" = "; for (auto&& x : a) cerr << x << ' '; cerr << endl;
#define pa(a) __typeof(a) pa; pa.push_back({}); for (auto&&x : a) pa.push_back(pa.back() + x); #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];}; #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];};