ACM (TJU) : 1049


#include
using namespace std;

int main ()
{
int n;
int a [100000] [4];

while ( cin >> n ) {

for ( int i = 0; i < n; i++ ) scanf ("%d %d %d %d", &a [i] [0], &a [i] [1], &a [i] [2], &a [i] [3]); int count = 0; for ( int i = 0; i < n; i++ ) { for ( int j = 0; j < n; j++ ) { if ( j == i ) continue; if ( a [i] [0] >= a [j] [0] &&
a [i] [2] >= a [j] [2] &&
a [i] [1] <= a [j] [1] && a [i] [3] <= a [j] [3] ) { count++; break; } } } cout << count << endl; } return 0; } [/sourcecode]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s