SP702 EXPAND - Barn Expansion

Description

Farmer John has N (1

Input Format

t – the number of test cases, then t test cases follow. Each test case takes the following form: The first line contains the number of rectangular barns - n. Each of the next n lines contains: Four space-separated integers A, B, C, and D, describing one barn. The lower-left corner of the barn is at (A,B) and the upper right corner is at (C,D).

Output Format

For each test case write a single integer that is the number of barns that can be expanded in a separate line