aboutsummaryrefslogtreecommitdiff
path: root/contests/Starters82
diff options
context:
space:
mode:
Diffstat (limited to 'contests/Starters82')
-rwxr-xr-xcontests/Starters82/A/mainbin0 -> 17584 bytes
-rwxr-xr-xcontests/Starters82/A/main.cpp139
-rw-r--r--contests/Starters82/A/main_input0.txt5
-rw-r--r--contests/Starters82/A/main_output0.txt4
-rwxr-xr-xcontests/Starters82/B/mainbin0 -> 23160 bytes
-rwxr-xr-xcontests/Starters82/B/main.cpp141
-rw-r--r--contests/Starters82/B/main_input0.txt7
-rw-r--r--contests/Starters82/B/main_output0.txt3
-rwxr-xr-xcontests/Starters82/C/mainbin0 -> 28232 bytes
-rwxr-xr-xcontests/Starters82/C/main.cpp154
-rw-r--r--contests/Starters82/C/main_input0.txt10
-rw-r--r--contests/Starters82/C/main_input1.txt4
-rw-r--r--contests/Starters82/C/main_input2.txt4
-rw-r--r--contests/Starters82/C/main_input3.txt4
-rw-r--r--contests/Starters82/C/main_input4.txt4
-rw-r--r--contests/Starters82/C/main_input5.txt4
-rw-r--r--contests/Starters82/C/main_input6.txt4
-rw-r--r--contests/Starters82/C/main_input7.txt4
-rw-r--r--contests/Starters82/C/main_output0.txt3
-rw-r--r--contests/Starters82/C/main_output1.txt1
-rw-r--r--contests/Starters82/C/main_output2.txt1
-rw-r--r--contests/Starters82/C/main_output3.txt1
-rw-r--r--contests/Starters82/C/main_output4.txt1
-rw-r--r--contests/Starters82/C/main_output5.txt1
-rw-r--r--contests/Starters82/C/main_output6.txt1
-rw-r--r--contests/Starters82/C/main_output7.txt1
-rwxr-xr-xcontests/Starters82/D/mainbin0 -> 22160 bytes
-rwxr-xr-xcontests/Starters82/D/main.cpp152
-rw-r--r--contests/Starters82/D/main_input0.txt2
-rw-r--r--contests/Starters82/D/main_output0.txt4
-rwxr-xr-xcontests/Starters82/E/mainbin0 -> 17872 bytes
-rwxr-xr-xcontests/Starters82/E/main.cpp143
-rw-r--r--contests/Starters82/E/main_input0.txt4
-rw-r--r--contests/Starters82/E/main_output0.txt3
-rwxr-xr-xcontests/Starters82/F/main.cpp132
35 files changed, 941 insertions, 0 deletions
diff --git a/contests/Starters82/A/main b/contests/Starters82/A/main
new file mode 100755
index 0000000..d083489
--- /dev/null
+++ b/contests/Starters82/A/main
Binary files differ
diff --git a/contests/Starters82/A/main.cpp b/contests/Starters82/A/main.cpp
new file mode 100755
index 0000000..3cf63d2
--- /dev/null
+++ b/contests/Starters82/A/main.cpp
@@ -0,0 +1,139 @@
+#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 print() {
+ cerr << "\n";
+}
+
+template<typename T, typename... TS>
+void print(T val, TS... vals) {
+ cerr << val << " ";
+ print(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 x, y;
+ cin >> x >> y;
+ if (x * 5 >= y) {
+ cout << "YES\n";
+ } else {
+ cout << "NO\n";
+ }
+
+}
+
+int main () {
+ ios_base::sync_with_stdio(false);
+ cin.tie(NULL);
+ int tt;
+ cin >> tt;
+ while(tt--) {
+ solve();
+ }
+}
+
+
diff --git a/contests/Starters82/A/main_input0.txt b/contests/Starters82/A/main_input0.txt
new file mode 100644
index 0000000..4fe6060
--- /dev/null
+++ b/contests/Starters82/A/main_input0.txt
@@ -0,0 +1,5 @@
+4
+2 10
+3 17
+4 2
+6 45
diff --git a/contests/Starters82/A/main_output0.txt b/contests/Starters82/A/main_output0.txt
new file mode 100644
index 0000000..2bc7799
--- /dev/null
+++ b/contests/Starters82/A/main_output0.txt
@@ -0,0 +1,4 @@
+YES
+NO
+YES
+NO
diff --git a/contests/Starters82/B/main b/contests/Starters82/B/main
new file mode 100755
index 0000000..d9491a3
--- /dev/null
+++ b/contests/Starters82/B/main
Binary files differ
diff --git a/contests/Starters82/B/main.cpp b/contests/Starters82/B/main.cpp
new file mode 100755
index 0000000..7e23050
--- /dev/null
+++ b/contests/Starters82/B/main.cpp
@@ -0,0 +1,141 @@
+#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 print() {
+ cerr << "\n";
+}
+
+template<typename T, typename... TS>
+void print(T val, TS... vals) {
+ cerr << val << " ";
+ print(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);
+ int mn = INT_MAX;
+ for (auto &x : v) {
+ cin >> x;
+ mn = min(mn, x);
+ }
+ cout << n - count(all(v), mn) << '\n';
+
+}
+
+int main () {
+ ios_base::sync_with_stdio(false);
+ cin.tie(NULL);
+ int tt;
+ cin >> tt;
+ while(tt--) {
+ solve();
+ }
+}
+
+
diff --git a/contests/Starters82/B/main_input0.txt b/contests/Starters82/B/main_input0.txt
new file mode 100644
index 0000000..2f90ee6
--- /dev/null
+++ b/contests/Starters82/B/main_input0.txt
@@ -0,0 +1,7 @@
+3
+2
+1 2
+4
+2 2 3 4
+1
+1
diff --git a/contests/Starters82/B/main_output0.txt b/contests/Starters82/B/main_output0.txt
new file mode 100644
index 0000000..a384d6e
--- /dev/null
+++ b/contests/Starters82/B/main_output0.txt
@@ -0,0 +1,3 @@
+1
+2
+0
diff --git a/contests/Starters82/C/main b/contests/Starters82/C/main
new file mode 100755
index 0000000..618a825
--- /dev/null
+++ b/contests/Starters82/C/main
Binary files differ
diff --git a/contests/Starters82/C/main.cpp b/contests/Starters82/C/main.cpp
new file mode 100755
index 0000000..a956cf6
--- /dev/null
+++ b/contests/Starters82/C/main.cpp
@@ -0,0 +1,154 @@
+#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 print() {
+ cerr << "\n";
+}
+
+template<typename T, typename... TS>
+void print(T val, TS... vals) {
+ cerr << val << " ";
+ print(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 a(n);
+ vi b(n);
+ for (auto &x : a) cin >> x;
+ for (auto &x : b) cin >> x;
+ int ons = count(all(a), 1);
+ if (a == b) {
+ cout << "YES\n";
+ return;
+ }
+ for (int i = 0; i < n; i++) {
+ if (a[i] == 1 && b[i] == 0) {
+ cout << "NO\n";
+ return;
+ } else if (a[i] == 0 && b[i] == 1) {
+ if (ons == 0 || i == 0) {
+ cout << "NO\n";
+ return;
+ }
+ }
+ }
+ cout << "YES\n";
+}
+
+int main () {
+ ios_base::sync_with_stdio(false);
+ cin.tie(NULL);
+ int tt;
+ cin >> tt;
+ while(tt--) {
+ solve();
+ }
+}
+
+
diff --git a/contests/Starters82/C/main_input0.txt b/contests/Starters82/C/main_input0.txt
new file mode 100644
index 0000000..f303c19
--- /dev/null
+++ b/contests/Starters82/C/main_input0.txt
@@ -0,0 +1,10 @@
+3
+5
+0 1 0 0 1
+0 1 1 1 1
+3
+1 0 0
+0 0 1
+3
+0 0 0
+0 1 0
diff --git a/contests/Starters82/C/main_input1.txt b/contests/Starters82/C/main_input1.txt
new file mode 100644
index 0000000..c89d8f6
--- /dev/null
+++ b/contests/Starters82/C/main_input1.txt
@@ -0,0 +1,4 @@
+1
+5
+1 0 1 0 1
+0 0 1 0 1 \ No newline at end of file
diff --git a/contests/Starters82/C/main_input2.txt b/contests/Starters82/C/main_input2.txt
new file mode 100644
index 0000000..2fc17c5
--- /dev/null
+++ b/contests/Starters82/C/main_input2.txt
@@ -0,0 +1,4 @@
+1
+5
+1 0 0 0 0
+0 1 1 1 0 \ No newline at end of file
diff --git a/contests/Starters82/C/main_input3.txt b/contests/Starters82/C/main_input3.txt
new file mode 100644
index 0000000..8f22c40
--- /dev/null
+++ b/contests/Starters82/C/main_input3.txt
@@ -0,0 +1,4 @@
+1
+5
+1 0 0 0 0
+1 1 1 1 1 \ No newline at end of file
diff --git a/contests/Starters82/C/main_input4.txt b/contests/Starters82/C/main_input4.txt
new file mode 100644
index 0000000..2e551cc
--- /dev/null
+++ b/contests/Starters82/C/main_input4.txt
@@ -0,0 +1,4 @@
+1
+3
+1 0 0
+1 1 1 \ No newline at end of file
diff --git a/contests/Starters82/C/main_input5.txt b/contests/Starters82/C/main_input5.txt
new file mode 100644
index 0000000..73b69ca
--- /dev/null
+++ b/contests/Starters82/C/main_input5.txt
@@ -0,0 +1,4 @@
+1
+3
+0 0 1
+0 1 1 \ No newline at end of file
diff --git a/contests/Starters82/C/main_input6.txt b/contests/Starters82/C/main_input6.txt
new file mode 100644
index 0000000..b129f6d
--- /dev/null
+++ b/contests/Starters82/C/main_input6.txt
@@ -0,0 +1,4 @@
+1
+3
+0 1 1
+1 1 1 \ No newline at end of file
diff --git a/contests/Starters82/C/main_input7.txt b/contests/Starters82/C/main_input7.txt
new file mode 100644
index 0000000..853949c
--- /dev/null
+++ b/contests/Starters82/C/main_input7.txt
@@ -0,0 +1,4 @@
+1
+6
+0 1 1 0 0 0
+0 1 1 1 1 0 \ No newline at end of file
diff --git a/contests/Starters82/C/main_output0.txt b/contests/Starters82/C/main_output0.txt
new file mode 100644
index 0000000..c6e03a3
--- /dev/null
+++ b/contests/Starters82/C/main_output0.txt
@@ -0,0 +1,3 @@
+YES
+NO
+NO
diff --git a/contests/Starters82/C/main_output1.txt b/contests/Starters82/C/main_output1.txt
new file mode 100644
index 0000000..ba28208
--- /dev/null
+++ b/contests/Starters82/C/main_output1.txt
@@ -0,0 +1 @@
+NO \ No newline at end of file
diff --git a/contests/Starters82/C/main_output2.txt b/contests/Starters82/C/main_output2.txt
new file mode 100644
index 0000000..d2bb323
--- /dev/null
+++ b/contests/Starters82/C/main_output2.txt
@@ -0,0 +1 @@
+YES \ No newline at end of file
diff --git a/contests/Starters82/C/main_output3.txt b/contests/Starters82/C/main_output3.txt
new file mode 100644
index 0000000..d2bb323
--- /dev/null
+++ b/contests/Starters82/C/main_output3.txt
@@ -0,0 +1 @@
+YES \ No newline at end of file
diff --git a/contests/Starters82/C/main_output4.txt b/contests/Starters82/C/main_output4.txt
new file mode 100644
index 0000000..d2bb323
--- /dev/null
+++ b/contests/Starters82/C/main_output4.txt
@@ -0,0 +1 @@
+YES \ No newline at end of file
diff --git a/contests/Starters82/C/main_output5.txt b/contests/Starters82/C/main_output5.txt
new file mode 100644
index 0000000..d2bb323
--- /dev/null
+++ b/contests/Starters82/C/main_output5.txt
@@ -0,0 +1 @@
+YES \ No newline at end of file
diff --git a/contests/Starters82/C/main_output6.txt b/contests/Starters82/C/main_output6.txt
new file mode 100644
index 0000000..ba28208
--- /dev/null
+++ b/contests/Starters82/C/main_output6.txt
@@ -0,0 +1 @@
+NO \ No newline at end of file
diff --git a/contests/Starters82/C/main_output7.txt b/contests/Starters82/C/main_output7.txt
new file mode 100644
index 0000000..d2bb323
--- /dev/null
+++ b/contests/Starters82/C/main_output7.txt
@@ -0,0 +1 @@
+YES \ No newline at end of file
diff --git a/contests/Starters82/D/main b/contests/Starters82/D/main
new file mode 100755
index 0000000..2c14bb4
--- /dev/null
+++ b/contests/Starters82/D/main
Binary files differ
diff --git a/contests/Starters82/D/main.cpp b/contests/Starters82/D/main.cpp
new file mode 100755
index 0000000..50a7587
--- /dev/null
+++ b/contests/Starters82/D/main.cpp
@@ -0,0 +1,152 @@
+#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 print() {
+ cerr << "\n";
+}
+
+template<typename T, typename... TS>
+void print(T val, TS... vals) {
+ cerr << val << " ";
+ print(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;
+ for (int i = 1; i <= n * n; i++) {
+ if (i % 2 == 0) {
+ v.pb(i);
+ }
+ }
+ for (int i = 1; i <= n * n; i++) {
+ if (i % 2 != 0) {
+ v.pb(i);
+ }
+ }
+ int k = 0;
+ for (int i = 0; i < n; i++) {
+ for (int j = 0; j < n; j++) {
+ cout << v[k++] << ' ';
+ }
+ cout << '\n';
+ }
+
+}
+
+int main () {
+ ios_base::sync_with_stdio(false);
+ cin.tie(NULL);
+ int tt;
+ cin >> tt;
+ while(tt--) {
+ solve();
+ }
+}
+
+
diff --git a/contests/Starters82/D/main_input0.txt b/contests/Starters82/D/main_input0.txt
new file mode 100644
index 0000000..2f1b638
--- /dev/null
+++ b/contests/Starters82/D/main_input0.txt
@@ -0,0 +1,2 @@
+1
+4
diff --git a/contests/Starters82/D/main_output0.txt b/contests/Starters82/D/main_output0.txt
new file mode 100644
index 0000000..4cbdad4
--- /dev/null
+++ b/contests/Starters82/D/main_output0.txt
@@ -0,0 +1,4 @@
+12 10 6 14
+3 8 4 1
+5 15 11 9
+2 7 13 16
diff --git a/contests/Starters82/E/main b/contests/Starters82/E/main
new file mode 100755
index 0000000..16f9d5d
--- /dev/null
+++ b/contests/Starters82/E/main
Binary files differ
diff --git a/contests/Starters82/E/main.cpp b/contests/Starters82/E/main.cpp
new file mode 100755
index 0000000..d502e3b
--- /dev/null
+++ b/contests/Starters82/E/main.cpp
@@ -0,0 +1,143 @@
+#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 vl