Georgiy031

Untitled

Oct 25th, 2020
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. int n;
  2.     cin >> n;
  3.     vector<ll> v(n);
  4.     for (auto& x : v) cin >> x;
  5.     if (n == 1) {
  6.         cout << 1;
  7.         return 0;
  8.     }
  9.     bool up = v[1] >= v[0];
  10.     ll cur = 1;
  11.     ll res = 1;
  12.     int k = 0;
  13.     for (int i = 1; i < n; ++i) {
  14.         if (v[i] == v[i - 1]) {
  15.             ++cur;
  16.             continue;
  17.         }
  18.         bool cur_up = v[i] > v[i - 1];
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment