Advertisement
alex326

Untitled

Apr 16th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. problema 248
  2.  
  3. #include <fstream>
  4. using namespace std;
  5. ifstream fin("pozitie.in");
  6. ofstream fout("pozitie.out");
  7. int main()
  8. {
  9. int v[10000],n,i,c=1;
  10. fin>>n;
  11. for (i=1;i<=n;i++)
  12. fin>>v[i];
  13. for (i=1;i<=n;i++){
  14. if (v[1]>v[i])
  15. c++;
  16. }
  17. fout<<c;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement