Codeforces-SolutionsA/Codes/1846 A - Rudolph and Cut the Rope/1846A.cpp
ShazidMahsrafi 327e23f260 u
2024-07-12 19:28:21 +06:00

29 lines
391 B
C++

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
void solve()
{
int n;
cin>>n;
int ct=0;
for(int i=0; i<n; ++i)
{
int x,y;
cin>>x>>y;
if(x>y) ct++;
}
cout<<ct<<endl;
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int TC = 1;
cin >> TC;
cin.ignore();
while (TC--) solve();
}