aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoromagdy7 <omar.professional8777@gmail.com>2023-09-07 20:53:25 +0300
committeromagdy7 <omar.professional8777@gmail.com>2023-09-07 20:53:25 +0300
commit7b8991da134381da729125392bc3f085e9fea53e (patch)
tree3cd164f6c1639ecc7b7e78ca01f9e47918c91c15
parenta9db4aab4257c8651dec7a3b8b0716dc472afddf (diff)
downloadcompetitive-programming-7b8991da134381da729125392bc3f085e9fea53e.tar.xz
competitive-programming-7b8991da134381da729125392bc3f085e9fea53e.zip
Removed some additional binaries
-rwxr-xr-xcodeforces/Buttons/mainbin16656 -> 0 bytes
-rwxr-xr-xcodeforces/SerejaAndSuffixes/mainbin35400 -> 0 bytes
-rwxr-xr-xcodeforces/TalesOfASort/mainbin20632 -> 0 bytes
-rwxr-xr-xcodeforces/UnitedWeStand/mainbin52896 -> 0 bytes
-rwxr-xr-xcontests/Round895/A/mainbin0 -> 16912 bytes
-rwxr-xr-xcontests/Round895/A/main.cpp133
-rw-r--r--contests/Round895/A/main_input0.txt7
-rw-r--r--contests/Round895/A/main_output0.txt6
-rwxr-xr-xcontests/Round895/B/mainbin0 -> 21512 bytes
-rwxr-xr-xcontests/Round895/B/main.cpp145
-rw-r--r--contests/Round895/B/main_input0.txt24
-rw-r--r--contests/Round895/B/main_output0.txt7
-rwxr-xr-xcontests/Round895/C/mainbin0 -> 17264 bytes
-rwxr-xr-xcontests/Round895/C/main.cpp169
-rw-r--r--contests/Round895/C/main_input0.txt12
-rw-r--r--contests/Round895/C/main_output0.txt11
-rwxr-xr-xcontests/Round895/D/mainbin0 -> 17184 bytes
-rwxr-xr-xcontests/Round895/D/main.cpp138
-rw-r--r--contests/Round895/D/main_input0.txt9
-rw-r--r--contests/Round895/D/main_output0.txt8
-rwxr-xr-xcontests/Round895/E/mainbin0 -> 21048 bytes
-rwxr-xr-xcontests/Round895/E/main.cpp162
-rw-r--r--contests/Round895/E/main_input0.txt40
-rw-r--r--contests/Round895/E/main_output0.txt5
-rwxr-xr-xcontests/Round895/F/main.cpp129
25 files changed, 1005 insertions, 0 deletions
diff --git a/codeforces/Buttons/main b/codeforces/Buttons/main
deleted file mode 100755
index 78bf885..0000000
--- a/codeforces/Buttons/main
+++ /dev/null
Binary files differ
diff --git a/codeforces/SerejaAndSuffixes/main b/codeforces/SerejaAndSuffixes/main
deleted file mode 100755
index e2b9b8a..0000000
--- a/codeforces/SerejaAndSuffixes/main
+++ /dev/null
Binary files differ
diff --git a/codeforces/TalesOfASort/main b/codeforces/TalesOfASort/main
deleted file mode 100755
index 813b15b..0000000
--- a/codeforces/TalesOfASort/main
+++ /dev/null
Binary files differ
diff --git a/codeforces/UnitedWeStand/main b/codeforces/UnitedWeStand/main
deleted file mode 100755
index 745e96c..0000000
--- a/codeforces/UnitedWeStand/main
+++ /dev/null
Binary files differ
diff --git a/contests/Round895/A/main b/contests/Round895/A/main
new file mode 100755
index 0000000..e05f658
--- /dev/null
+++ b/contests/Round895/A/main
Binary files differ
diff --git a/contests/Round895/A/main.cpp b/contests/Round895/A/main.cpp
new file mode 100755
index 0000000..1b01b77
--- /dev/null
+++ b/contests/Round895/A/main.cpp
@@ -0,0 +1,133 @@
+#include <bits/stdc++.h>
+using namespace std;
+
+using ll = long long;
+using pii = pair<int, int>;
+using vpi = vector<pii>;
+using vi = vector<int>;
+using vll = vector<long long>;
+using mpii = map<int, int>;
+using mpll = map<ll, ll>;
+using db = long double;
+
+#define pb push_back
+#define all(x) (x).begin(), (x).end()
+#define rall(x) (x).rbegin(), (x).rend()
+#define lb lower_bound
+#define ub upper_bound
+#define make_unique(x) \
+ sort(all((x))); \
+ (x).resize(unique(all((x))) - (x).begin())
+#define ceil(a, b) ((a) + (b)-1) / (b)
+
+const int MOD = (int)1e9 + 7;
+const db PI = acos((db)-1);
+const int dx[4]{1, 0, -1, 0};
+const int dy[4]{0, 1, 0, -1};
+
+template <typename K, typename V>
+ostream &operator<<(ostream &os, const pair<K, V> &p);
+template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec);
+template <typename K, typename V>
+ostream &operator<<(ostream &os, const map<K, V> &m);
+template <typename K, typename V>
+ostream &operator<<(ostream &os, const unordered_map<K, V> &m);
+template <typename T> ostream &operator<<(ostream &os, const set<T> &s);
+template <typename T>
+ostream &operator<<(ostream &os, const unordered_set<T> &s);
+
+template <typename K, typename V>
+ostream &operator<<(ostream &os, const pair<K, V> &p) {
+ os << "(" << p.first << ", " << p.second << ")";
+ return os;
+}
+
+template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec) {
+ os << "{";
+ for (size_t i = 0; i < vec.size(); ++i) {
+ if (i > 0)
+ os << ", ";
+ os << vec[i];
+ }
+ os << "}";
+ return os;
+}
+
+template <typename K, typename V>
+ostream &operator<<(ostream &os, const map<K, V> &m) {
+ os << "{";
+ for (const auto &p : m) {
+ os << p.first << ": " << p.second << ", ";
+ }
+ os << "}";
+ return os;
+}
+
+template <typename K, typename V>
+ostream &operator<<(ostream &os, const unordered_map<K, V> &m) {
+ os << "{";
+ for (const auto &p : m) {
+ os << p.first << ": " << p.second << ", ";
+ }
+ os << "}";
+ return os;
+}
+
+template <typename T> ostream &operator<<(ostream &os, const set<T> &s) {
+ int i = 0;
+ os << "{";
+ for (const auto &e : s) {
+ if (i > 0)
+ os << ", ";
+ os << e;
+ i++;
+ }
+ os << "}";
+ return os;
+}
+
+template <typename T>
+ostream &operator<<(ostream &os, const unordered_set<T> &s) {
+ int i = 0;
+ os << "{";
+ for (const auto &e : s) {
+ if (i > 0)
+ os << ", ";
+ os << e;
+ i++;
+ }
+ os << "}";
+ return os;
+}
+
+void dbg() { cerr << "\n"; }
+
+template <typename T, typename... TS> void dbg(T val, TS... vals) {
+ cerr << val << " ";
+ dbg(vals...);
+}
+
+/* stuff you should look for:
+ ---------------------------
+ * special cases (n=1?)
+ * int overflow, array bounds
+ * do smth instead of nothing and stay organized
+ * WRITE STUFF DOWN
+ * DON'T GET STUCK ON ONE APPROACH
+ */
+
+void solve() {
+ int a, b, c;
+ cin >> a >> b >> c;
+ cout << ceil((max(a, b) - (a + b) / 2), c) << endl;
+}
+
+int main() {
+ ios_base::sync_with_stdio(false);
+ cin.tie(NULL);
+ int tt;
+ cin >> tt;
+ while (tt--) {
+ solve();
+ }
+}
diff --git a/contests/Round895/A/main_input0.txt b/contests/Round895/A/main_input0.txt
new file mode 100644
index 0000000..d93db83
--- /dev/null
+++ b/contests/Round895/A/main_input0.txt
@@ -0,0 +1,7 @@
+6
+3 7 2
+17 4 3
+17 17 1
+17 21 100
+1 100 1
+97 4 3
diff --git a/contests/Round895/A/main_output0.txt b/contests/Round895/A/main_output0.txt
new file mode 100644
index 0000000..8a2f4b6
--- /dev/null
+++ b/contests/Round895/A/main_output0.txt
@@ -0,0 +1,6 @@
+1
+3
+0
+1
+50
+16
diff --git a/contests/Round895/B/main b/contests/Round895/B/main
new file mode 100755
index 0000000..a001703
--- /dev/null
+++ b/contests/Round895/B/main
Binary files differ
diff --git a/contests/Round895/B/main.cpp b/contests/Round895/B/main.cpp
new file mode 100755
index 0000000..25927ff
--- /dev/null
+++ b/contests/Round895/B/main.cpp
@@ -0,0 +1,145 @@
+#include <bits/stdc++.h>
+#include <climits>
+using namespace std;
+
+using ll = long long;
+using pii = pair<int, int>;
+using vpi = vector<pii>;
+using vi = vector<int>;
+using vll = vector<long long>;
+using mpii = map<int, int>;
+using mpll = map<ll, ll>;
+using db = long double;
+
+#define pb push_back
+#define all(x) (x).begin(), (x).end()
+#define rall(x) (x).rbegin(), (x).rend()
+#define lb lower_bound
+#define ub upper_bound
+#define make_unique(x) \
+ sort(all((x))); \
+ (x).resize(unique(all((x))) - (x).begin())
+#define ceil(a, b) ((a) + (b)-1) / (b)
+
+const int MOD = (int)1e9 + 7;
+const db PI = acos((db)-1);
+const int dx[4]{1, 0, -1, 0};
+const int dy[4]{0, 1, 0, -1};
+
+template <typename K, typename V>
+ostream &operator<<(ostream &os, const pair<K, V> &p);
+template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec);
+template <typename K, typename V>
+ostream &operator<<(ostream &os, const map<K, V> &m);
+template <typename K, typename V>
+ostream &operator<<(ostream &os, const unordered_map<K, V> &m);
+template <typename T> ostream &operator<<(ostream &os, const set<T> &s);
+template <typename T>
+ostream &operator<<(ostream &os, const unordered_set<T> &s);
+
+template <typename K, typename V>
+ostream &operator<<(ostream &os, const pair<K, V> &p) {
+ os << "(" << p.first << ", " << p.second << ")";
+ return os;
+}
+
+template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec) {
+ os << "{";
+ for (size_t i = 0; i < vec.size(); ++i) {
+ if (i > 0)
+ os << ", ";
+ os << vec[i];
+ }
+ os << "}";
+ return os;
+}
+
+template <typename K, typename V>
+ostream &operator<<(ostream &os, const map<K, V> &m) {
+ os << "{";
+ for (const auto &p : m) {
+ os << p.first << ": " << p.second << ", ";
+ }
+ os << "}";
+ return os;
+}
+
+template <typename K, typename V>
+ostream &operator<<(ostream &os, const unordered_map<K, V> &m) {
+ os << "{";
+ for (const auto &p : m) {
+ os << p.first << ": " << p.second << ", ";
+ }
+ os << "}";
+ return os;
+}
+
+template <typename T> ostream &operator<<(ostream &os, const set<T> &s) {
+ int i = 0;
+ os << "{";
+ for (const auto &e : s) {
+ if (i > 0)
+ os << ", ";
+ os << e;
+ i++;
+ }
+ os << "}";
+ return os;
+}
+
+template <typename T>
+ostream &operator<<(ostream &os, const unordered_set<T> &s) {
+ int i = 0;
+ os << "{";
+ for (const auto &e : s) {
+ if (i > 0)
+ os << ", ";
+ os << e;
+ i++;
+ }
+ os << "}";
+ return os;
+}
+
+void dbg() { cerr << "\n"; }
+
+template <typename T, typename... TS> void dbg(T val, TS... vals) {
+ cerr << val << " ";
+ dbg(vals...);
+}
+
+/* stuff you should look for:
+ ---------------------------
+ * special cases (n=1?)
+ * int overflow, array bounds
+ * do smth instead of nothing and stay organized
+ * WRITE STUFF DOWN
+ * DON'T GET STUCK ON ONE APPROACH
+ */
+
+void solve() {
+ int n;
+ cin >> n;
+ vector<vi> v(201);
+ int mn = INT_MAX;
+ for (int i = 0; i < n; i++) {
+ int s, d;
+ cin >> s >> d;
+ if (d % 2 == 0) {
+ mn = min(mn, s + (d / 2 - 1));
+ } else {
+ mn = min(mn, s + d / 2);
+ }
+ }
+ cout << mn << endl;
+}
+
+int main() {
+ ios_base::sync_with_stdio(false);
+ cin.tie(NULL);
+ int tt;
+ cin >> tt;
+ while (tt--) {
+ solve();
+ }
+}
diff --git a/contests/Round895/B/main_input0.txt b/contests/Round895/B/main_input0.txt
new file mode 100644
index 0000000..4db719c
--- /dev/null
+++ b/contests/Round895/B/main_input0.txt
@@ -0,0 +1,24 @@
+7
+1
+2 2
+3
+2 8
+4 3
+5 2
+1
+200 200
+4
+1 20
+5 9
+3 179
+100 1
+2
+10 1
+1 18
+2
+1 1
+1 2
+3
+1 3
+1 1
+1 3
diff --git a/contests/Round895/B/main_output0.txt b/contests/Round895/B/main_output0.txt
new file mode 100644
index 0000000..b8bb869
--- /dev/null
+++ b/contests/Round895/B/main_output0.txt
@@ -0,0 +1,7 @@
+2
+5
+299
+9
+9
+1
+1
diff --git a/contests/Round895/C/main b/contests/Round895/C/main
new file mode 100755
index 0000000..88d2793
--- /dev/null
+++ b/contests/Round895/C/main
Binary files differ
diff --git a/contests/Round895/C/main.cpp b/contests/Round895/C/main.cpp
new file mode 100755
index 0000000..59b1b75
--- /dev/null
+++ b/contests/Round895/C/main.cpp
@@ -0,0 +1,169 @@
+#include <algorithm>
+#include <bits/stdc++.h>
+#include <numeric>
+using namespace std;
+
+using ll = long long;
+using pii = pair<int, int>;
+using vpi = vector<pii>;
+using vi = vector<int>;
+using vll = vector<long long>;
+using mpii = map<int, int>;
+using mpll = map<ll, ll>;
+using db = long double;
+
+#define pb push_back
+#define all(x) (x).begin(), (x).end()
+#define rall(x) (x).rbegin(), (x).rend()
+#define lb lower_bound
+#define ub upper_bound
+#define make_unique(x) \
+ sort(all((x))); \
+ (x).resize(unique(all((x))) - (x).begin())
+#define ceil(a, b) ((a) + (b)-1) / (b)
+
+const int MOD = (int)1e9 + 7;
+const db PI = acos((db)-1);
+const int dx[4]{1, 0, -1, 0};
+const int dy[4]{0, 1, 0, -1};
+
+template <typename K, typename V>
+ostream &operator<<(ostream &os, const pair<K, V> &p);
+template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec);
+template <typename K, typename V>
+ostream &operator<<(ostream &os, const map<K, V> &m);
+template <typename K, typename V>
+ostream &operator<<(ostream &os, const unordered_map<K, V> &m);
+template <typename T> ostream &operator<<(ostream &os, const set<T> &s);
+template <typename T>
+ostream &operator<<(ostream &os, const unordered_set<T> &s);
+
+template <typename K, typename V>
+ostream &operator<<(ostream &os, const pair<K, V> &p) {
+ os << "(" << p.first << ", " << p.second << ")";
+ return os;
+}
+
+template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec) {
+ os << "{";
+ for (size_t i = 0; i < vec.size(); ++i) {
+ if (i > 0)
+ os << ", ";
+ os << vec[i];
+ }
+ os << "}";
+ return os;
+}
+
+template <typename K, typename V>
+ostream &operator<<(ostream &os, const map<K, V> &m) {
+ os << "{";
+ for (const auto &p : m) {
+ os << p.first << ": " << p.second << ", ";
+ }
+ os << "}";
+ return os;
+}
+
+template <typename K, typename V>
+ostream &operator<<(ostream &os, const unordered_map<K, V> &m) {
+ os << "{";
+ for (const auto &p : m) {
+ os << p.first << ": " << p.second << ", ";
+ }
+ os << "}";
+ return os;
+}
+
+template <typename T> ostream &operator<<(ostream &os, const set<T> &s) {
+ int i = 0;
+ os << "{";
+ for (const auto &e : s) {
+ if (i > 0)
+ os << ", ";
+ os << e;
+ i++;
+ }
+ os << "}";
+ return os;
+}
+
+template <typename T>
+ostream &operator<<(ostream &os, const unordered_set<T> &s) {
+ int i = 0;
+ os << "{";
+ for (const auto &e : s) {
+ if (i > 0)
+ os << ", ";
+ os << e;
+ i++;
+ }
+ os << "}";
+ return os;
+}
+
+void dbg() { cerr << "\n"; }
+
+template <typename T, typename... TS> void dbg(T val, TS... vals) {
+ cerr << val << " ";
+ dbg(vals...);
+}
+
+/* stuff you should look for:
+ ---------------------------
+ * special cases (n=1?)
+ * int overflow, array bounds
+ * do smth instead of nothing and stay organized
+ * WRITE STUFF DOWN
+ * DON'T GET STUCK ON ONE APPROACH
+ */
+
+bool is_prime(int n) {
+ if (n <= 1)
+ return false;
+ if (n <= 3)
+ return true;
+ if (n % 2 == 0 || n % 3 == 0)
+ return false;
+
+ for (int i = 5; i * i <= n; i += 6) {
+ if (n % i == 0 || n % (i + 2) == 0)
+ return false;
+ }
+
+ return true;
+}
+
+void solve() {
+ int l, r;
+ cin >> l >> r;
+ if (r < 4 || is_prime(r) && r - l == 0) {
+ cout << -1 << '\n';
+ } else {
+ if (r - l == 0) {
+ int x = 2;
+ while (r % x != 0) {
+ x++;
+ }
+ dbg(l, r, "=", gcd(r / x, (x - 1) * (r / x)));
+ cout << r / x << ' ' << (x - 1) * (r / x) << '\n';
+ } else {
+ if (r % 2 == 0) {
+ cout << r / 2 << ' ' << r / 2 << '\n';
+ } else {
+ r--;
+ cout << r / 2 << ' ' << r / 2 << '\n';
+ }
+ }
+ }
+}
+
+int main() {
+ ios_base::sync_with_stdio(false);
+ cin.tie(NULL);
+ int tt;
+ cin >> tt;
+ while (tt--) {
+ solve();
+ }
+}
diff --git a/contests/Round895/C/main_input0.txt b/contests/Round895/C/main_input0.txt
new file mode 100644
index 0000000..51c5c3b
--- /dev/null
+++ b/contests/Round895/C/main_input0.txt
@@ -0,0 +1,12 @@
+11
+11 15
+1 3
+18 19
+41 43
+777 777
+8000000 10000000
+2000 2023
+1791791 1791791
+1 4
+2 3
+9840769 9840769
diff --git a/contests/Round895/C/main_output0.txt b/contests/Round895/C/main_output0.txt
new file mode 100644
index 0000000..f743d0c
--- /dev/null
+++ b/contests/Round895/C/main_output0.txt
@@ -0,0 +1,11 @@
+6 9
+-1
+14 4
+36 6
+111 666
+4000000 5000000
+2009 7
+-1
+2 2
+-1
+6274 9834495
diff --git a/contests/Round895/D/main b/contests/Round895/D/main
new file mode 100755
index 0000000..ed0053d
--- /dev/null
+++ b/contests/Round895/D/main
Binary files differ
diff --git a/contests/Round895/D/main.cpp b/contests/Round895/D/main.cpp
new file mode 100755
index 0000000..7b99053
--- /dev/null
+++ b/contests/Round895/D/main.cpp
@@ -0,0 +1,138 @@
+#include <bits/stdc++.h>
+using namespace std;
+
+using ll = long long;
+using pii = pair<int, int>;
+using vpi = vector<pii>;
+using vi = vector<int>;
+using vll = vector<long long>;
+using mpii = map<int, int>;
+using mpll = map<ll, ll>;
+using db = long double;
+
+#define pb push_back
+#define all(x) (x).begin(), (x).end()
+#define rall(x) (x).rbegin(), (x).rend()
+#define lb lower_bound
+#define ub upper_bound
+#define make_unique(x) \
+ sort(all((x))); \
+ (x).resize(unique(all((x))) - (x).begin())
+#define ceil(a, b) ((a) + (b)-1) / (b)
+
+const int MOD = (int)1e9 + 7;
+const db PI = acos((db)-1);
+const int dx[4]{1, 0, -1, 0};
+const int dy[4]{0, 1, 0, -1};
+
+template <typename K, typename V>
+ostream &operator<<(ostream &os, const pair<K, V> &p);
+template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec);
+template <typename K, typename V>
+ostream &operator<<(ostream &os, const map<K, V> &m);
+template <typename K, typename V>
+ostream &operator<<(ostream &os, const unordered_map<K, V> &m);
+template <typename T> ostream &operator<<(ostream &os, const set<T> &s);
+template <typename T>
+ostream &operator<<(ostream &os, const unordered_set<T> &s);
+
+template <typename K, typename V>
+ostream &operator<<(ostream &os, const pair<K, V> &p) {
+ os << "(" << p.first << ", " << p.second << ")";
+ return os;
+}
+
+template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec) {
+ os << "{";
+ for (size_t i = 0; i < vec.size(); ++i) {
+ if (i > 0)
+ os << ", ";
+ os << vec[i];
+ }
+ os << "}";
+ return os;
+}
+
+template <typename K, typename V>
+ostream &operator<<(ostream &os, const map<K, V> &m) {
+ os << "{";
+ for (const auto &p : m) {
+ os << p.first << ": " << p.second << ", ";
+ }
+ os << "}";
+ return os;
+}
+
+template <typename K, typename V>
+ostream &operator<<(ostream &os, const unordered_map<K, V> &m) {
+ os << "{";
+ for (const auto &p : m) {
+ os << p.first << ": " << p.second << ", ";
+ }
+ os << "}";
+ return os;
+}
+
+template <typename T> ostream &operator<<(ostream &os, const set<T> &s) {
+ int i = 0;
+ os << "{";
+ for (const auto &e : s) {
+ if (i > 0)
+ os << ", ";
+ os << e;
+ i++;
+ }
+ os << "}";
+ return os;
+}
+
+template <typename T>
+ostream &operator<<(ostream &os, const unordered_set<T> &s) {
+ int i = 0;
+ os << "{";
+ for (const auto &e : s) {
+ if (i > 0)
+ os << ", ";
+ os << e;
+ i++;
+ }
+ os << "}";
+ return os;
+}
+
+void dbg() { cerr << "\n"; }
+
+template <typename T, typename... TS> void dbg(T val, TS... vals) {
+ cerr << val << " ";
+ dbg(vals...);
+}
+
+/* stuff you should look for:
+ ---------------------------
+ * special cases (n=1?)
+ * int overflow, array bounds
+ * do smth instead of nothing and stay organized
+ * WRITE STUFF DOWN
+ * DON'T GET STUCK ON ONE APPROACH
+ */
+
+ll sum(ll n) { return (n * (n + 1) / 2); }
+
+void solve() {
+ ll n, x, y;
+ cin >> n >> x >> y;
+ ll c = n / lcm(x, y);
+ ll left = sum(n) - sum(n - (n / x) + c);
+ ll right = sum(n / y - c);
+ cout << left - right << '\n';
+}
+
+int main() {
+ ios_base::sync_with_stdio(false);
+ cin.tie(NULL);
+ int tt;
+ cin >> tt;
+ while (tt--) {
+ solve();
+ }
+}
diff --git a/contests/Round895/D/main_input0.txt b/contests/Round895/D/main_input0.txt
new file mode 100644
index 0000000..1c1fc79
--- /dev/null
+++ b/contests/Round895/D/main_input0.txt
@@ -0,0 +1,9 @@
+8
+7 2 3
+12 6 3
+9 1 9
+2 2 2
+100 20 50
+24 4 6
+1000000000 5575 25450
+4 4 1
diff --git a/contests/Round895/D/main_output0.txt b/contests/Round895/D/main_output0.txt
new file mode 100644
index 0000000..44e2d7a
--- /dev/null
+++ b/contests/Round895/D/main_output0.txt
@@ -0,0 +1,8 @@
+12
+-3
+44
+0
+393
+87
+179179179436104
+-6
diff --git a/contests/Round895/E/main b/contests/Round895/E/main
new file mode 100755
index 0000000..e6c3f05
--- /dev/null
+++ b/contests/Round895/E/main
Binary files differ
diff --git a/contests/Round895/E/main.cpp b/contests/Round895/E/main.cpp
new file mode 100755
index 0000000..c318b79
--- /dev/null
+++ b/contests/Round895/E/main.cpp
@@ -0,0 +1,162 @@
+#include <bits/stdc++.h>
+using namespace std;
+
+using ll = long long;
+using pii = pair<int, int>;
+using vpi = vector<pii>;
+using vi = vector<int>;
+using vll = vector<long long>;
+using mpii = map<int, int>;
+using mpll = map<ll, ll>;
+using db = long double;
+
+#define pb push_back
+#define all(x) (x).begin(), (x).end()
+#define rall(x) (x).rbegin(), (x).rend()
+#define lb lower_bound
+#define ub upper_bound
+#define make_unique(x) \
+ sort(all((x))); \
+ (x).resize(unique(all((x))) - (x).begin())
+#define ceil(a, b) ((a) + (b)-1) / (b)
+
+const int MOD = (int)1e9 + 7;
+const db PI = acos((db)-1);
+const int dx[4]{1, 0, -1, 0};
+const int dy[4]{0, 1, 0, -1};
+
+template <typename K, typename V>
+ostream &operator<<(ostream &os, const pair<K, V> &p);
+template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec);
+template <typename K, typename V>
+ostream &operator<<(ostream &os, const map<K, V> &m);
+template <typename K, typename V>
+ostream &operator<<(ostream &os, const unordered_map<K, V> &m);
+template <typename T> ostream &operator<<(ostream &os, const set<T> &s);
+template <typename T>
+ostream &operator<<(ostream &os, const unordered_set<T> &s);
+
+template <typename K, typename V>
+ostream &operator<<(ostream &os, const pair<K, V> &p) {
+ os << "(" << p.first << ", " << p.second << ")";
+ return os;
+}
+
+template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec) {
+ os << "{";
+ for (size_t i = 0; i < vec.size(); ++i) {
+ if (i > 0)
+ os << ", ";
+ os << vec[i];
+ }
+ os << "}";
+ return os;
+}
+
+template <typename K, typename V>
+ostream &operator<<(ostream &os, const map<K, V> &m) {
+ os << "{";
+ for (const auto &p : m) {
+ os << p.first << ": " << p.second << ", ";
+ }
+ os << "}";
+ return os;
+}
+
+template <typename K, typename V>
+ostream &operator<<(ostream &os, const unordered_map<K, V> &m) {
+ os << "{";
+ for (const auto &p : m) {
+ os << p.first << ": " << p.second << ", ";
+ }
+ os << "}";
+ return os;
+}
+
+template <typename T> ostream &operator<<(ostream &os, const set<T> &s) {
+ int i = 0;
+ os << "{";
+ for (const auto &e : s) {
+ if (i > 0)
+ os << ", ";
+ os << e;
+ i++;
+ }
+ os << "}";
+ return os;
+}
+
+template <typename T>
+ostream &operator<<(ostream &os, const unordered_set<T> &s) {
+ int i = 0;
+ os << "{";
+ for (const auto &e : s) {
+ if (i > 0)
+ os << ", ";
+ os << e;
+ i++;
+ }
+ os << "}";
+ return os;
+}
+
+void dbg() { cerr << "\n"; }
+
+template <typename T, typename... TS> void dbg(T val, TS... vals) {
+ cerr << val << " ";
+ dbg(vals...);
+}
+
+/* stuff you should look for:
+ ---------------------------
+ * special cases (n=1?)
+ * int overflow, array bounds
+ * do smth instead of nothing and stay organized
+ * WRITE STUFF DOWN
+ * DON'T GET STUCK ON ONE APPROACH
+ */
+
+void solve() {
+ int n;
+ cin >> n;
+ vi v(n);
+ for (auto &x : v) {
+ cin >> x;
+ }
+ string s;
+ cin >> s;
+ int q;
+ cin >> q;
+ for (int i = 0; i < q; i++) {
+ int op, x;
+ cin >> op >> x;
+ if (op == 1) {
+ x--;
+ int y;
+ cin >> y;
+ y--;
+ for (int j = x; j <= y; j++) {
+ s[j] = (s[j] == '0') ? '1' : '0';
+ }
+ } else {
+ int ans = 0;
+ for (int j = 0; j < n; j++) {
+ if (s[j] == x + '0') {
+ ans ^= v[j];
+ }
+ }
+ cout << ans << ' ';
+ }
+ }
+ cout << '\n';
+}
+
+int main() {
+ ios_base::sync_with_stdio(false);
+ cin.tie(NULL);
+ int tt;
+ cin >> tt;
+ while (tt--) {
+ solve();
+ }
+}
diff --git a/contests/Round895/E/main_input0.txt b/contests/Round895/E/main_input0.txt
new file mode 100644
index 0000000..3210599
--- /dev/null
+++ b/contests/Round895/E/main_input0.txt
@@ -0,0 +1,40 @@
+5
+5
+1 2 3 4 5
+01000
+7
+2 0
+2 1
+1 2 4
+2 0
+2 1
+1 1 3
+2 1
+6
+12 12 14 14 5 5
+001001
+3
+2 1
+1 2 4
+2 1
+4
+7 7 7 777
+1111
+3
+2 0
+1 2 3
+2 0
+2
+1000000000 996179179
+11
+1
+2 1
+5
+1 42 20 47 7
+00011
+5
+1 3 4
+1 1 1
+1 3 4
+1 2 4
+2 0
diff --git a/contests/Round895/E/main_output0.txt b/contests/Round895/E/main_output0.txt
new file mode 100644
index 0000000..ca966df
--- /dev/null
+++ b/contests/Round895/E/main_output0.txt
@@ -0,0 +1,5 @@
+3 2 6 7 7
+11 7
+0 0
+16430827
+47
diff --git a/contests/Round895/F/main.cpp b/contests/Round895/F/main.cpp
new file mode 100755
index 0000000..82c5879
--- /dev/null