Language: C++

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

#define sz(a) int(a.size())
#define reset(a,b) memset(a,b,sizeof(a))
#define pb					push_back
#define eb					emplace_back
#define mp					make_pair
#define endl 				'\n'
#define gc					getchar_unlocked
#define pc					putchar_unlocked
#define FASTIO std::ios::sync_with_stdio(false); std::cin.tie(NULL); std::cout.tie(NULL);
#define MAX_DIGITS 7 // 7 digits in 1 000 000
static const long long buf_len = (1 << 14);
static const long long buf_max = (1 << 04);
static char buf_out[buf_len];
static char buf_num[buf_max];
static long long buf_pos = 0;
#ifdef _WIN32
#define GETCHAR() _getchar_nolock()
#define PUTCHAR(c) _putchar_nolock(c)
#elif __unix__
#define GETCHAR() getchar_unlocked()
#define PUTCHAR(c) putchar_unlocked(c)
#else
#define GETCHAR() getchar()
#define PUTCHAR(c) putchar(c)
#endif
#define MOD 1000000007  
#define ll long long
#define lld long long 
static const lld nax=1e6+5;
short ch = 0;

 inline string ipst()
{
    string i="";
    long long temp=getchar_unlocked();
    while(temp<'a'||temp>'z')
        temp=getchar_unlocked();
    while(temp>='a'&&temp<='z')
    {
        i+=(char)temp;
        temp=getchar_unlocked();
    }
    return i;
}

 inline int getLine(string &str) {
        str = "";
        if (ch == -1) return -1;
        while (ch < 33 || ch == 127) {ch = getchar_unlocked(); if (ch == -1) return -1;}
        while (ch > 31 && ch < 127) {
            str.push_back(ch);
            ch = getchar_unlocked();
        }
        return str.size();
 }

inline void opst(string &str) {
        long long len = str.length();
        for (int i=0; i<len; i++) putchar_unlocked(str[i]);
}

 inline lld cinll(){
	char r;
	bool start=false,neg=false;
	lld ret=0;
	while(true){
		r=getchar();
		if((r-'0'<0 || r-'0'>9) && r!='-' && !start){
			continue;
		}
		if((r-'0'<0 || r-'0'>9) && r!='-' && start){
			break;
		}
		if(start)ret*=10;
		start=true;
		if(r=='-')neg=true;
		else ret+=r-'0';
	}
	if(!neg)
		return ret;
	else
		return -ret;
}
 
 inline void coutll(long long n)
{
    if(n == 0)
    {
        PUTCHAR('0');
        return;
    }
 
    if(n < 0)
    {
        PUTCHAR('-');
        n = -n;
    }
 
    char buffer[MAX_DIGITS];
    long long i = MAX_DIGITS - 1;
 
    while(n)
    {
        buffer[i--] = n % 10 + '0';
        n /= 10;
    }
 
    while(i != MAX_DIGITS - 1) 
    {
        PUTCHAR(buffer[++i]);
    }
}

const lld -INF=-1e18;
const lld INF=1e9+5;
const lld mod=1e9+7;

void add(int& a,int b)
{
	a+=b;
	if(a>=mod)
	a-=mod;
}
void sub(int& a,int b)
{
	a-=b;
	if(a<0)
	a+=mod;
}

int mul(int a,int b)
{
	return (lld)a*b%mod;
}

void maxx(lld& a,lld b)
{
	a=max(a,b);
}

void minn(lld& a,lld b)
{
	a=min(b,a);
}

int prefixsum[3005][3005];

/*void prefix_sum(int len)
{
	for(int i=1;i<len;i++)
	{
		prefixsum[len-1][i]=(prefixsum[len-1][i-1]+dp[len-1][i])%mod;
	}
}*/


const int MAXN = 16;
const int MAXL = (1 << 16) + 10;

vector<int> grafo[MAXL];
ll valor[MAXL],dp[MAXL],mat[MAXN][MAXN];
int vis[MAXL],N;

void brute(int pos,int bitmask,int submask){

	if(pos == N){
		if(__builtin_popcount(submask) == 0) return;
		grafo[bitmask].push_back(submask);
		return;
	}

	brute(pos+1,bitmask,submask);
	brute(pos+1, bitmask | (1 << pos), submask );
	brute(pos+1, bitmask | (1 << pos), submask | (1 << pos) );

}

void calcula(){

	for(int bitmask = 1;bitmask < (1 << N);bitmask++){
		for(int i = 0;i<N;i++){
			if(!(bitmask & (1 << i))) continue;
			for(int j = i+1;j<N;j++){
				if(!(bitmask & (1 << j))) continue;
				valor[bitmask] += mat[i][j];
			}
		}
	}

}

ll solve(int bitmask){

	if(bitmask == 0) return 0;
	if(vis[bitmask]) return dp[bitmask];

	vis[bitmask] = 1;

	ll best = -INF;

	for(int submask : grafo[bitmask]){
		best = max(best, solve(bitmask ^ submask) + valor[submask] );
	}

	return dp[bitmask] = best;

}

int main() {
    FASTIO
    
    cin >> N;
	for(int i = 0;i<N;i++){
		for(int j = 0;j<N;j++){
			cin >> mat[i][j];
		}
	}

	brute(0,0,0);
	calcula();

	lld res=solve((1 << N) - 1); 
    coutll(res);
    return 0;
}

Compiler output:
a.cc:117:11: error: expected unqualified-id before '-' token
  117 | const lld -INF=-1e18;
      |           ^