Language: C++

#include<iostream>
using namespace std;
int main()
{
	int N;
	cin>>N;
	int *x_and_y=new int[2][N];
	int *an=new int[N];
	for(int i=0;i<N;i++){
		cin>>x_and_y[0][i];
		cin>>x_and_y[1][i];
	}
	for(int k=0;k<N;k++){
		for(int i=0;i<N;i++){
			if((x_and_y[0][i]<x_and_y[0][k])&&(x_and_y[1][i]<x_and_y[1][k])||(x_and_y[0][i]>x_and_y[0][k])&&(x_and_y[1][i]>x_and_y[1][k])){
				an[k]++;
			}
		}
	}
	for(int i=0;i<N;i++){
		cout<<an[i]<<"\n";
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:34: error: array size in new-expression must be constant
    7 |         int *x_and_y=new int[2][N];
      |                                  ^
a.cc:7:34: error: the value of 'N' is not usable in a constant expression
a.cc:5:13: note: 'int N' is not const
    5 |         int N;
      |             ^
a.cc:10:32: error: invalid types 'int[int]' for array subscript
   10 |                 cin>>x_and_y[0][i];
      |                                ^
a.cc:11:32: error: invalid types 'int[int]' for array subscript
   11 |                 cin>>x_and_y[1][i];
      |                                ^
a.cc:15:39: error: invalid types 'int[int]' for array subscript
   15 |                         if((x_and_y[0][i]<x_and_y[0][k])&&(x_and_y[1][i]<x_and_y[1][k])||(x_and_y[0][i]>x_and_y[0][k])&&(x_and_y[1][i]>x_and_y[1][k])){
      |                                       ^
a.cc:15:53: error: invalid types 'int[int]' for array subscript
   15 |                         if((x_and_y[0][i]<x_and_y[0][k])&&(x_and_y[1][i]<x_and_y[1][k])||(x_and_y[0][i]>x_and_y[0][k])&&(x_and_y[1][i]>x_and_y[1][k])){
      |                                                     ^
a.cc:15:70: error: invalid types 'int[int]' for array subscript
   15 |                         if((x_and_y[0][i]<x_and_y[0][k])&&(x_and_y[1][i]<x_and_y[1][k])||(x_and_y[0][i]>x_and_y[0][k])&&(x_and_y[1][i]>x_and_y[1][k])){
      |                                                                      ^
a.cc:15:84: error: invalid types 'int[int]' for array subscript
   15 |                         if((x_and_y[0][i]<x_and_y[0][k])&&(x_and_y[1][i]<x_and_y[1][k])||(x_and_y[0][i]>x_and_y[0][k])&&(x_and_y[1][i]>x_and_y[1][k])){
      |                                                                                    ^
a.cc:15:101: error: invalid types 'int[int]' for array subscript
   15 |                         if((x_and_y[0][i]<x_and_y[0][k])&&(x_and_y[1][i]<x_and_y[1][k])||(x_and_y[0][i]>x_and_y[0][k])&&(x_and_y[1][i]>x_and_y[1][k])){
      |                                                                                                     ^
a.cc:15:115: error: invalid types 'int[int]' for array subscript
   15 |                         if((x_and_y[0][i]<x_and_y[0][k])&&(x_and_y[1][i]<x_and_y[1][k])||(x_and_y[0][i]>x_and_y[0][k])&&(x_and_y[1][i]>x_and_y[1][k])){
      |                                                                                                                   ^
a.cc:15:132: error: invalid types 'int[int]' for array subscript
   15 |                         if((x_and_y[0][i]<x_and_y[0][k])&&(x_and_y[1][i]<x_and_y[1][k])||(x_and_y[0][i]>x_and_y[0][k])&&(x_and_y[1][i]>x_and_y[1][k])){
      |                                                                                                                                    ^
a.cc:15:146: error: invalid types 'int[int]' for array subscript
   15 |                         if((x_and_y[0][i]<x_and_y[0][k])&&(x_and_y[1][i]<x_and_y[1][k])||(x_and_y[0][i]>x_and_y[0][k])&&(x_and_y[1][i]>x_and_y[1][k])){
      |                                                                                                                                                  ^