Friday, July 22, 2016

467A - George and Accommodation

#include<bits/stdc++.h>

using namespace std;

void solve()
{
 int t,p,q;
 int mv=0;
 
 cin>>t;
 
 while(t--)
 {
  cin>>p>>q;
  if(q-p>=2) mv++;
 }
 cout<<mv<<endl;
 
}

int main()
{
 solve();
 
 return 0;
}

No comments:

Post a Comment

Thank you for commenting. Please wait for response :)