aboutsummaryrefslogtreecommitdiff
path: root/codeforces/ILove%username
diff options
context:
space:
mode:
Diffstat (limited to 'codeforces/ILove%username')
-rwxr-xr-xcodeforces/ILove%username/mainbin0 -> 26784 bytes
-rw-r--r--codeforces/ILove%username/main.cpp32
-rw-r--r--codeforces/ILove%username/main_input0.txt2
-rw-r--r--codeforces/ILove%username/main_input1.txt2
-rw-r--r--codeforces/ILove%username/main_output0.txt1
-rw-r--r--codeforces/ILove%username/main_output1.txt1
6 files changed, 38 insertions, 0 deletions
diff --git a/codeforces/ILove%username/main b/codeforces/ILove%username/main
new file mode 100755
index 0000000..e532065
--- /dev/null
+++ b/codeforces/ILove%username/main
Binary files differ
diff --git a/codeforces/ILove%username/main.cpp b/codeforces/ILove%username/main.cpp
new file mode 100644
index 0000000..3ad1fc9
--- /dev/null
+++ b/codeforces/ILove%username/main.cpp
@@ -0,0 +1,32 @@
+#include<bits/stdc++.h>
+
+using namespace std;
+
+typedef long long ll;
+typedef pair<int, int> ii;
+typedef vector<ii> vii;
+typedef vector<int> vi;
+
+#define INF 1000000000
+
+int main () {
+ ios_base::sync_with_stdio(false);
+ cin.tie(NULL);
+ int n;
+ cin >> n;
+ vi v(n);
+ int ans = 0;
+ for (int i = 0; i < n; i++) {
+ cin >> v[i];
+ }
+ int mx = v[0], mn = v[0];
+ for (int i = 0; i < n; i++) {
+ if (v[i] > mx || v[i] < mn) {
+ cerr << v[i] << '\n';
+ ans++;
+ }
+ mx = max(mx, v[i]);
+ mn = min(mn, v[i]);
+ }
+ cout << ans << '\n';
+}
diff --git a/codeforces/ILove%username/main_input0.txt b/codeforces/ILove%username/main_input0.txt
new file mode 100644
index 0000000..2a1d81c
--- /dev/null
+++ b/codeforces/ILove%username/main_input0.txt
@@ -0,0 +1,2 @@
+5
+100 50 200 150 200
diff --git a/codeforces/ILove%username/main_input1.txt b/codeforces/ILove%username/main_input1.txt
new file mode 100644
index 0000000..e5a37cc
--- /dev/null
+++ b/codeforces/ILove%username/main_input1.txt
@@ -0,0 +1,2 @@
+10
+4664 6496 5814 7010 5762 5736 6944 4850 3698 7242
diff --git a/codeforces/ILove%username/main_output0.txt b/codeforces/ILove%username/main_output0.txt
new file mode 100644
index 0000000..0cfbf08
--- /dev/null
+++ b/codeforces/ILove%username/main_output0.txt
@@ -0,0 +1 @@
+2
diff --git a/codeforces/ILove%username/main_output1.txt b/codeforces/ILove%username/main_output1.txt
new file mode 100644
index 0000000..b8626c4
--- /dev/null
+++ b/codeforces/ILove%username/main_output1.txt
@@ -0,0 +1 @@
+4