Advertisement
bmarcu

Untitled

Jan 20th, 2020
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. ifstream fin ("pozitie.in");
  6. ofstream fout ("pozitie.out");
  7.  
  8.  
  9. int main ()
  10. {
  11. int u, v[10001], n, cont = 0;
  12. fin >> n;
  13. for (int i = 1; i <= n; i++)
  14. fin >> v[i];
  15. for (int i = 2; i <= n; i++)
  16. if (v[i] < v[1])
  17. cont++;
  18. fout << cont + 1;
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement