aboutsummaryrefslogtreecommitdiff
path: root/Template
diff options
context:
space:
mode:
authorAnthony Wang2020-09-08 22:06:09 -0500
committerAnthony Wang2020-09-08 22:06:09 -0500
commit3ee05dc851cae4e0ea941c940c27597e83bcb620 (patch)
tree3c177598235e16e14e12ed6470cb76cd34269332 /Template
parent2c24b07ac65bfee2a1c41ead0bbc13c0730517ac (diff)
Added builtins to templates
Diffstat (limited to 'Template')
-rw-r--r--Template/template.cpp3
-rw-r--r--Template/usaco.cpp3
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>;