SHARE
TWEET

Untitled

a guest Dec 16th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <vector>
  3. using namespace std;
  4. int main()
  5. {
  6.     long long int t,i,z,count=0,summ=0,sumn=0;
  7.     cin>>t;
  8.     vector <long long int> m,n;
  9.     for(i=0;i<t;i++)
  10.     {
  11.         long long int x,y;
  12.         cin>>x>>y;
  13.         m.push_back(x);
  14.  
  15.         summ=summ+x;
  16.         n.push_back(y);
  17.  
  18.         sumn=sumn+y;
  19.     }
  20.  
  21.     z=summ/t;
  22.  
  23.     for(i=0;i<t;i++)
  24.     {
  25.         if((m[i]>=150)&&(m[i]>=z)&&(m[i]*100/n[i]))
  26.         {
  27.             count++;
  28.         }
  29.     }
  30.     cout<<count;
  31.  
  32.  
  33.  
  34.  
  35.     return 0;
  36. }
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