Language: C++

#include<bits/stdc++.h>
using namespace std;


#define f(i,a,b) for(int i=(int)(a);i<=(int)(b);i++)
#define char_f(i,a) for(int i=(int)(a);(char)s[i]!='\0';i++)
#define rf(i,a,b) for(int i=(int)(a);i>=(int)(b);i--)
#define llf(i,a,b) for(long long int i=(long long int)(a);i<=(long long int)(b);i++)
#define llrf(i,a,b) for(long long int i=(long long int)(a);i>=(long long int)(b);i--)



#define ll long long
#define fi first
#define se second
#define pb push_back
#define pop pop_back
#define mem(ara) memset((ara),0,sizeof(ara))
#define memn(ara) memset((ara),-1,sizeof(ara))
#define bb begin()
#define ee end()
#define em emplace
#define eb emplace_back





#define si set<int>
#define sd set<double>
#define sll set<long long int>
#define ss set<string>
#define sc set<char>

#define pii pair<int,int>
#define pli pair<long long int,int>
#define pil pair<int,long long int>
#define pll pair<long long int,long long int>
#define pci pair<char,int>
#define pic pair<int,char>
#define pcl pair<char,long long int>
#define plc pair<long long int,char>

#define pss pair<string,string>
#define pcc pair<char,char>

#define pis pair<int,string>
#define psi pair<string,int>
#define pls pair<long long int,string>
#define psl pair<string,long long int>
#define pdd pair<double,double>
#define pcs pair<char,string>
#define psc pair<string,char>



#define vi  vector<int>
#define vll vector<long long int>
#define vd vector<double>
#define vs vector<string>
#define vc vector<char>
#define vii vector<pii>



#define mod 1000000007
#define mx (1<<30)-1
#define llmx (1ll<<62)
#define n_size 100005
#define g_size 10000005
double PI=acos(-1);



///unsigned int uMAX=4294967295;
///unsigned ll int ullMAX=18446744073709551615;





int arr[g_size];



int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);

	int n,m,T,res;

	int maxi=-mx,mini=mx,count=0,x=0;

	int i,j,k;

	bool flag;

	string s1,s2;

	char s[100000];

	int ara[n_size],ara2[n_size];

	cin>>n;

	f(i,0,n-1)
    {
        cin>>m;

        if(m>=1 && m<=399) arr[0]++;
        else if(m>=400 && m<=799) arr[1]++;
        else if(m>=800 && m<=1199) arr[2]++;;
        else if(m>=1200 && m<=1599) arr[3]++;;
        else if(m>=1600 && m<=1999) arr[4]++;;
        else if(m>=2000 && m<=2399) arr[5]++;;
        else if(m>=2400 && m<=2799) arr[6]++;;
        else if(m>=2800 && m<=3199) arr[7]++;;
        else if(m>=3200) x++;
    }


	f(i,0,7)
	{
	    count+=(arr[i]!=0);
	}
    cout<<count<<" "<<count+x<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:115:9: error: 'else' without a previous 'if'
  115 |         else if(m>=1200 && m<=1599) arr[3]++;;
      |         ^~~~
a.cc:116:9: error: 'else' without a previous 'if'
  116 |         else if(m>=1600 && m<=1999) arr[4]++;;
      |         ^~~~
a.cc:117:9: error: 'else' without a previous 'if'
  117 |         else if(m>=2000 && m<=2399) arr[5]++;;
      |         ^~~~
a.cc:118:9: error: 'else' without a previous 'if'
  118 |         else if(m>=2400 && m<=2799) arr[6]++;;
      |         ^~~~
a.cc:119:9: error: 'else' without a previous 'if'
  119 |         else if(m>=2800 && m<=3199) arr[7]++;;
      |         ^~~~
a.cc:120:9: error: 'else' without a previous 'if'
  120 |         else if(m>=3200) x++;
      |         ^~~~