Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdio>
- int v[122];
- int main () {
- int n, last = 0, ans = 0;
- scanf("%d", &n);
- for(int i = 0, x; i<n; ++i) {
- scanf("%d", &x);
- if(x > last) ++ans;
- last = x;
- }
- printf("%d\n", ans);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement