SHARE
TWEET

Untitled

bmarcu Jan 20th, 2020 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top