Submission

Status:
[-SSS][-][-][-][-]

Score: 0

User: Cmoss9

Problemset: นก

Language: cpp

Time: 0.002 second

Submitted On: 2025-03-27 14:16:56

#include <bits/stdc++.h>
using namespace std;
int main () {
    cin.tie(0) -> sync_with_stdio(0);
    int count = 0;
    int n;
    cin >> n;
    vector<int> height(n);
    for (int i = 0;i<n;i++) {
        cin >> height[i];
    }
    for (int i = 0;i<n-1;i++) {
        if (height[i] < height[i+1]) {
            count++;
        }
    }
    cout << count;
}