Submission #386416

#TimeUsernameProblemLanguageResultExecution timeMemory
386416phathnvPo (COCI21_po)C++11
10 / 70
13 ms1772 KiB
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

const int N = 1e5 + 7;

int n, a[N];

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    cin >> n;
    for(int i = 1; i <= n; i++)
        cin >> a[i];
    a[0] = 0;
    int res = 0;
    for(int i = 1; i <= n; i++)
        res += (a[i] > a[i - 1]);
    cout << res;

    return 0;
}
#Verdict Execution timeMemoryGrader output
Fetching results...