1
0
Fork 0

Update include.hh

This commit is contained in:
Ariel 2024-01-15 16:44:40 +08:00 committed by GitHub
parent 65cc4225c4
commit 921ca5d1e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -51,3 +51,7 @@ template<typename T, typename... U> void __read(T& x, U&... args) { cin >> x; __
#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];};
#define adj(n) vector<vector<int>> ch(n);
#define edge(ch, u, v) ch[u].push_back(v), ch[v].push_back(u);
#define Edge(ch, u, v) ch[u].push_back(v);