Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- int main()
- {
- ifstream cin("input.txt");
- short n;
- cin>>n;
- long pre = 0;
- short i;
- for(i = 0; i < n; i++)
- {
- long cur;
- cin>>cur;
- if (cur <= pre)
- break;
- pre=cur;
- }
- cout<<i;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement