Language: C++

#include<iostream>
using namespace std;

typedef long long int ll
const int maxn = 2e5 + 10;
ll cnt[maxn],a[maxn];
void solved(){
	ll n;cin>>n;
	ll M = 0;
	for(ll i = 1; i <= n; i++){
		cin>>a[i],cnt[a[i]]++;M = max(M,a[i]);
	}
	ll ans = 0;
	for(ll i = 1;i <= M;i++){
		if(cnt[i] > 0)
		ans = ans + (cnt[i] * (cnt[i] - 1))/2; 
	}
	for(ll i = 1; i <= n; i++){
		cout<<(ans - cnt[a[i]] + 1)<<endl;
	}
}
int main(){
	solved();
	return 0;
} 

Compiler output:
a.cc:5:1: error: expected initializer before 'const'
    5 | const int maxn = 2e5 + 10;
      | ^~~~~
a.cc:6:1: error: 'll' does not name a type
    6 | ll cnt[maxn],a[maxn];
      | ^~
a.cc: In function 'void solved()':
a.cc:8:9: error: 'll' was not declared in this scope
    8 |         ll n;cin>>n;
      |         ^~
a.cc:8:19: error: 'n' was not declared in this scope
    8 |         ll n;cin>>n;
      |                   ^
a.cc:9:11: error: expected ';' before 'M'
    9 |         ll M = 0;
      |           ^~
      |           ;
a.cc:10:15: error: expected ';' before 'i'
   10 |         for(ll i = 1; i <= n; i++){
      |               ^~
      |               ;
a.cc:10:23: error: 'i' was not declared in this scope
   10 |         for(ll i = 1; i <= n; i++){
      |                       ^
a.cc:11:22: error: 'a' was not declared in this scope
   11 |                 cin>>a[i],cnt[a[i]]++;M = max(M,a[i]);
      |                      ^
a.cc:11:27: error: 'cnt' was not declared in this scope; did you mean 'int'?
   11 |                 cin>>a[i],cnt[a[i]]++;M = max(M,a[i]);
      |                           ^~~
      |                           int
a.cc:11:39: error: 'M' was not declared in this scope
   11 |                 cin>>a[i],cnt[a[i]]++;M = max(M,a[i]);
      |                                       ^
a.cc:13:11: error: expected ';' before 'ans'
   13 |         ll ans = 0;
      |           ^~~~
      |           ;
a.cc:14:15: error: expected ';' before 'i'
   14 |         for(ll i = 1;i <= M;i++){
      |               ^~
      |               ;
a.cc:14:22: error: 'i' was not declared in this scope
   14 |         for(ll i = 1;i <= M;i++){
      |                      ^
a.cc:14:27: error: 'M' was not declared in this scope
   14 |         for(ll i = 1;i <= M;i++){
      |                           ^
a.cc:15:20: error: 'cnt' was not declared in this scope; did you mean 'int'?
   15 |                 if(cnt[i] > 0)
      |                    ^~~
      |                    int
a.cc:16:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   16 |                 ans = ans + (cnt[i] * (cnt[i] - 1))/2;
      |                 ^~~
      |                 abs
a.cc:18:15: error: expected ';' before 'i'
   18 |         for(ll i = 1; i <= n; i++){
      |               ^~
      |               ;
a.cc:18:23: error: 'i' was not declared in this scope
   18 |         for(ll i = 1; i <= n; i++){
      |                       ^
a.cc:19:24: error: 'ans' was not declared in this scope; did you mean 'abs'?
   19 |                 cout<<(ans - cnt[a[i]] + 1)<<endl;
      |                        ^~~
      |                        abs
a.cc:19:30: error: 'cnt' was not declared in this scope; did you mean 'int'?
   19 |                 cout<<(ans - cnt[a[i]] + 1)<<endl;
      |                              ^~~
      |                              int
a.cc:19:34: error: 'a' was not declared in this scope
   19 |                 cout<<(ans - cnt[a[i]] + 1)<<endl;
      |                                  ^