#include <iostream>
using namespace std;
#define int long long
#define size() sz
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
const int N=2e5+10;
int a[N];
signed main()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
int n;
cin >> n;
bool f=true;
for(int i = 1;i <= n; i++)
{
cin>>a[i];
}
int cnt=0;
for(int i = 1;i < n; i++) {
if(a[i]>a[i-1]) {
cnt++;
}
}
cout<<cnt;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |