Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int n;
- cin >> n;
- vector<ll> v(n);
- for (auto& x : v) cin >> x;
- if (n == 1) {
- cout << 1;
- return 0;
- }
- bool up = v[1] >= v[0];
- ll cur = 1;
- ll res = 1;
- int k = 0;
- for (int i = 1; i < n; ++i) {
- if (v[i] == v[i - 1]) {
- ++cur;
- continue;
- }
- bool cur_up = v[i] > v[i - 1];
- }
Advertisement
Add Comment
Please, Sign In to add comment