summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoobie99 <noob999noob999@gmail.com>2023-02-24 16:36:47 +0100
committerNoobie99 <noob999noob999@gmail.com>2023-02-24 16:36:47 +0100
commit36e0edb28725940fb624acab32c251306d35401f (patch)
tree76ff0b1f6521b97d5eab3172e698642896f5ed91
parent7c5258421f636dfd59721ea943902336d8b5387f (diff)
fix
-rw-r--r--datastructures/lazyPropagation.cpp2
-rw-r--r--math/rho.cpp2
-rw-r--r--template/template.cpp5
3 files changed, 4 insertions, 5 deletions
diff --git a/datastructures/lazyPropagation.cpp b/datastructures/lazyPropagation.cpp
index ed5438f..eea8818 100644
--- a/datastructures/lazyPropagation.cpp
+++ b/datastructures/lazyPropagation.cpp
@@ -69,7 +69,7 @@ struct SegTree {
if (l&1) a.emplace_back(l++, k);
if (r&1) st.emplace_back(--r, k);
}
- a.insert(a.begin(), st.rbegin(), st.rend());
+ a.insert(a.end(), st.rbegin(), st.rend());
for (auto [i, k] : a) {
if (tree[i] >= x) return find(i, x, k); // Modify this
}
diff --git a/math/rho.cpp b/math/rho.cpp
index df70251..635c630 100644
--- a/math/rho.cpp
+++ b/math/rho.cpp
@@ -13,7 +13,7 @@ ll rho(ll n) { // Findet Faktor < n, nicht unbedingt prim.
void factor(ll n, map<ll, int>& facts) {
if (n == 1) return;
- if (isPrime(n)) {facts[n]++, return;}
+ if (isPrime(n)) {facts[n]++; return;}
ll f = rho(n);
factor(n / f, facts); factor(f, facts);
}
diff --git a/template/template.cpp b/template/template.cpp
index c40bcd5..9dac341 100644
--- a/template/template.cpp
+++ b/template/template.cpp
@@ -4,7 +4,7 @@ using namespace std;
#define fora(i, n) for (int i = 0; i < n; ++i)
#define forb(i, n) for (int i = 1; i <= n; ++i)
#define all(x) begin(x), end(x)
-#define sz(x) (ll)size(x)
+#define sz(x) (ll)(x).size()
#define _ << " " <<
#define debug(x) #x << " = " << (x)
@@ -12,6 +12,5 @@ using ll = long long;
using ld = long double;
int main() {
- ios::sync_with_stdio(false);
- cin.tie(nullptr);
+ cin.tie(0)->sync_with_stdio(false);
}