diff options
author | Anthony Wang | 2020-09-08 22:06:09 -0500 |
---|---|---|
committer | Anthony Wang | 2020-09-08 22:06:09 -0500 |
commit | 3ee05dc851cae4e0ea941c940c27597e83bcb620 (patch) | |
tree | 3c177598235e16e14e12ed6470cb76cd34269332 /Template | |
parent | 2c24b07ac65bfee2a1c41ead0bbc13c0730517ac (diff) |
Added builtins to templates
Diffstat (limited to 'Template')
-rw-r--r-- | Template/template.cpp | 3 | ||||
-rw-r--r-- | Template/usaco.cpp | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/Template/template.cpp b/Template/template.cpp index 48856fd..6553f13 100644 --- a/Template/template.cpp +++ b/Template/template.cpp @@ -14,6 +14,9 @@ #define all(x) begin(x), end(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>; diff --git a/Template/usaco.cpp b/Template/usaco.cpp index 6f46a75..edab30f 100644 --- a/Template/usaco.cpp +++ b/Template/usaco.cpp @@ -14,6 +14,9 @@ #define all(x) begin(x), end(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>; |