Language: C++

#include<cstdio>
#include<iostream>
#include<algorithm>
#include<cstring>
using namespace std;
int main(void){
	int n,min,max,i,j,a[100],flg[9],temp;
	cin>>n;
	for(i=0;i<n;i++) cin>>a[i];
	for(i=0;i<n-1;i++){
		for(j=i+1;j<n;j++){
			if(a[i]>a[j]){
				temp=a[i];
				a[i]=a[j];
				a[j]=temp;
			}
		}
	}
	flg=0; min=0; max=0;
	for(i=0;i<n;i++){
		if(a[i]>=1&&a[i]<=399&&flg!=0){
			flg=1;
			min++; max++;
		}
		if(a[i]>=400&&a[i]<=799&&flg!=2){
			flg=2;
			min++; max++;
		}
		if(a[i]>=800&&a[i]<=1199&&flg!=3){
			flg=3;
			min++; max++;
		}
		if(a[i]>=1200&&a[i]<=1599&&flg!=4){
			flg=4;
			min++; max++;
		}
		if(a[i]>=1600&&a[i]<=1999&&flg!=5){
			flg=5;
			min++; max++;
		}
		if(a[i]>=2000&&a[i]<=2399&&flg!=6){
			flg=6;
			min++; max++;
		}
		if(a[i]>=2400&&a[i]<=2799&&flg!=7){
			flg=7;
			min++; max++;
		}
		if(a[i]>=2800&&a[i]<=3199&&flg!=8){
			flg=8;
			min++; max++;
		}
		if(a[i]>=3200){
			if(max<8) max++;
		}
	}
	if(min<0) min=0;
	cout<<min<<' '<<max<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:12: error: incompatible types in assignment of 'int' to 'int [9]'
   19 |         flg=0; min=0; max=0;
      |         ~~~^~
a.cc:22:28: error: incompatible types in assignment of 'int' to 'int [9]'
   22 |                         flg=1;
      |                         ~~~^~
a.cc:25:45: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   25 |                 if(a[i]>=400&&a[i]<=799&&flg!=2){
      |                                          ~~~^~~
a.cc:26:28: error: incompatible types in assignment of 'int' to 'int [9]'
   26 |                         flg=2;
      |                         ~~~^~
a.cc:29:46: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   29 |                 if(a[i]>=800&&a[i]<=1199&&flg!=3){
      |                                           ~~~^~~
a.cc:30:28: error: incompatible types in assignment of 'int' to 'int [9]'
   30 |                         flg=3;
      |                         ~~~^~
a.cc:33:47: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   33 |                 if(a[i]>=1200&&a[i]<=1599&&flg!=4){
      |                                            ~~~^~~
a.cc:34:28: error: incompatible types in assignment of 'int' to 'int [9]'
   34 |                         flg=4;
      |                         ~~~^~
a.cc:37:47: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   37 |                 if(a[i]>=1600&&a[i]<=1999&&flg!=5){
      |                                            ~~~^~~
a.cc:38:28: error: incompatible types in assignment of 'int' to 'int [9]'
   38 |                         flg=5;
      |                         ~~~^~
a.cc:41:47: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   41 |                 if(a[i]>=2000&&a[i]<=2399&&flg!=6){
      |                                            ~~~^~~
a.cc:42:28: error: incompatible types in assignment of 'int' to 'int [9]'
   42 |                         flg=6;
      |                         ~~~^~
a.cc:45:47: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   45 |                 if(a[i]>=2400&&a[i]<=2799&&flg!=7){
      |                                            ~~~^~~
a.cc:46:28: error: incompatible types in assignment of 'int' to 'int [9]'
   46 |                         flg=7;
      |                         ~~~^~
a.cc:49:47: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   49 |                 if(a[i]>=2800&&a[i]<=3199&&flg!=8){
      |                                            ~~~^~~
a.cc:50:28: error: incompatible types in assignment of 'int' to 'int [9]'
   50 |                         flg=8;
      |                         ~~~^~