Advertisement
tr1gergo

biro-hf

Mar 20th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5.  
  6.  
  7. int main()
  8. {
  9.     int N;
  10.     cin>>N;
  11.  
  12.     int Ku[N];
  13.     int Pi[N];
  14.     int db=0;
  15.  
  16.  
  17.     for(int i=0; i<N; i++) {
  18.         cin>>Pi[i]>>Ku[i];
  19.     }
  20.     for(int j=0; j<N; j++) {
  21.         if(Ku[j]<Pi[j]) {
  22.             db=db+1;
  23.        }
  24.            
  25.        
  26.     }
  27.     cout<<db<<endl;
  28.  
  29.  
  30.  
  31.     return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement