Source Code
#include <iostream>

using namespace std;

int main()
{
    int t,n;
    int count=0;
    cin>>t;
    int a[1000];
    int b[1000];
    for(int i=0;i<t;i++){
        cin>>n;
        for(int j=0;j<n;j++){
            
            cin>>a[j]>>b[j];
            if(b[j]>a[j]) 
            count++;
            
            
            
        }
        cout<<count;
        
        
        
        
    }

    return 0;
}
Copy
Garden Walls AhmadEdais
GNU G++17
2 ms
244 KB
Wrong Answer