Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int n = 0;
- cin >> n;
- bool ultim = false;
- bool sequencia = false;
- int zero = 0;
- while (!sequencia) {
- int count = 0;
- int x, y;
- cin >> x;
- while (!ultim) {
- cin >> y;
- if (x < y) count++;
- x = y;
- if (x == 0) ultim = true;
- }
- ultim = false;
- zero++;
- if (zero == n) sequencia = true;
- cout << count << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement