aboutsummaryrefslogtreecommitdiff
path: root/codeforces/StairPeakOrNeither
diff options
context:
space:
mode:
authoromagdy7 <omar.professional8777@gmail.com>2024-04-13 16:15:35 +0200
committeromagdy7 <omar.professional8777@gmail.com>2024-04-13 16:15:35 +0200
commitff7585043c5f48cf94bc7ace4ad1b8fe9b4df9ef (patch)
treea68943fe77475c70f39170b5e6ee199405b7f5b1 /codeforces/StairPeakOrNeither
parentc1bbcb6c2a6d02a4ac06d3c41afcfc51993ec1d3 (diff)
downloadcompetitive-programming-ff7585043c5f48cf94bc7ace4ad1b8fe9b4df9ef.tar.xz
competitive-programming-ff7585043c5f48cf94bc7ace4ad1b8fe9b4df9ef.zip
Solved 4 problems in last Div.3
Diffstat (limited to 'codeforces/StairPeakOrNeither')
-rwxr-xr-xcodeforces/StairPeakOrNeither/main.cpp64
-rw-r--r--codeforces/StairPeakOrNeither/main_input0.txt8
-rw-r--r--codeforces/StairPeakOrNeither/main_output0.txt7
3 files changed, 79 insertions, 0 deletions
diff --git a/codeforces/StairPeakOrNeither/main.cpp b/codeforces/StairPeakOrNeither/main.cpp
new file mode 100755
index 0000000..231e38b
--- /dev/null
+++ b/codeforces/StairPeakOrNeither/main.cpp
@@ -0,0 +1,64 @@
+#include <bits/stdc++.h>
+
+using namespace std;
+
+using ll = long long;
+using pii = pair<int, int>;
+using vpii = 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};
+
+#ifdef LOCAL
+#include "debug.h"
+#else
+#define dbg(...) 42
+#endif
+
+/* 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;
+ if (a < b && b < c) {
+ cout << "STAIR\n";
+ } else if (a < b && b > c) {
+ cout << "PEAK\n";
+ } else {
+ cout << "NONE\n";
+ }
+}
+
+int main() {
+ ios_base::sync_with_stdio(false);
+ cin.tie(NULL);
+ int tt;
+ cin >> tt;
+ while (tt--) {
+ solve();
+ }
+}
diff --git a/codeforces/StairPeakOrNeither/main_input0.txt b/codeforces/StairPeakOrNeither/main_input0.txt
new file mode 100644
index 0000000..2a59631
--- /dev/null
+++ b/codeforces/StairPeakOrNeither/main_input0.txt
@@ -0,0 +1,8 @@
+7
+1 2 3
+3 2 1
+1 5 3
+3 4 1
+0 0 0
+4 1 7
+4 5 7
diff --git a/codeforces/StairPeakOrNeither/main_output0.txt b/codeforces/StairPeakOrNeither/main_output0.txt
new file mode 100644
index 0000000..3f723a8
--- /dev/null
+++ b/codeforces/StairPeakOrNeither/main_output0.txt
@@ -0,0 +1,7 @@
+STAIR
+NONE
+PEAK
+PEAK
+NONE
+NONE
+STAIR