#include using namespace std; using ll = long long; void solve() { int n; cin>>n; int ct=0; for(int i=0; i>x>>y; if(x>y) ct++; } cout<> TC; cin.ignore(); while (TC--) solve(); }