criyle/codenet-compile-errors huggingface dataset:
Language: C++

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

dp[405][405];
int main(){
  int n; cin >> n;
  int x[n];  for(int i=0;i<n;i++) cin >> x[i];
  for(int i=0;i<n;i++) for(int j=0;j<n;j++) dp[i][j] = 0; 
  for(int i=0;i<n-1;i++) dp[i][i+1] = x[i] + x[i+1];
  int as[n]; as[0] = x[0]; for(int i=0;i<n-1;i++) as[i+1] = x[i+1] + as[i];
  for(int i=2;i<n;i++) for(int j=0;j<n-i; j++){
    int m = 400000000001;
    for(int k=0;k<i;k++) m = min(m, dp[j][j+k]+dp[j+k+1][j+i] + as[j+i] - (j==0 ? 0 : as[j-1]));
    dp[j][j+i] = m;
  }
  cout << dp[0][n-1] << endl;
  return 0;
}
    

Compiler output:
a.cc:4:1: error: 'dp' does not name a type
    4 | dp[405][405];
      | ^~
a.cc: In function 'int main()':
a.cc:8:45: error: 'dp' was not declared in this scope; did you mean 'dup'?
    8 |   for(int i=0;i<n;i++) for(int j=0;j<n;j++) dp[i][j] = 0;
      |                                             ^~
      |                                             dup
a.cc:9:26: error: 'dp' was not declared in this scope; did you mean 'dup'?
    9 |   for(int i=0;i<n-1;i++) dp[i][i+1] = x[i] + x[i+1];
      |                          ^~
      |                          dup
a.cc:12:13: warning: overflow in conversion from 'long int' to 'int' changes value from '400000000001' to '568041473' [-Woverflow]
   12 |     int m = 400000000001;
      |             ^~~~~~~~~~~~
a.cc:13:37: error: 'dp' was not declared in this scope; did you mean 'dup'?
   13 |     for(int k=0;k<i;k++) m = min(m, dp[j][j+k]+dp[j+k+1][j+i] + as[j+i] - (j==0 ? 0 : as[j-1]));
      |                                     ^~
      |                                     dup
a.cc:14:5: error: 'dp' was not declared in this scope; did you mean 'dup'?
   14 |     dp[j][j+i] = m;
      |     ^~
      |     dup
a.cc:16:11: error: 'dp' was not declared in this scope; did you mean 'dup'?
   16 |   cout << dp[0][n-1] << endl;
      |           ^~
      |           dup
Language: C++

back(v[j]);
        vv.push_back(v[ind]+v[ind+1]);
        for(int j=ind+2 ; j<v.size() ; j++)
            vv.push_back(v[j]);
        ans+=v[ind]+v[ind+1];
        v = vv ;

    }
    cout<<ans  <<endl ;
    return 0;
}



Compiler output:
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
    1 | back(v[j]);
      |     ^
a.cc:2:9: error: 'vv' does not name a type
    2 |         vv.push_back(v[ind]+v[ind+1]);
      |         ^~
a.cc:3:9: error: expected unqualified-id before 'for'
    3 |         for(int j=ind+2 ; j<v.size() ; j++)
      |         ^~~
a.cc:3:27: error: 'j' does not name a type
    3 |         for(int j=ind+2 ; j<v.size() ; j++)
      |                           ^
a.cc:3:40: error: 'j' does not name a type
    3 |         for(int j=ind+2 ; j<v.size() ; j++)
      |                                        ^
a.cc:5:9: error: 'ans' does not name a type
    5 |         ans+=v[ind]+v[ind+1];
      |         ^~~
a.cc:6:9: error: 'v' does not name a type
    6 |         v = vv ;
      |         ^
a.cc:8:5: error: expected declaration before '}' token
    8 |     }
      |     ^
a.cc:9:5: error: 'cout' does not name a type
    9 |     cout<<ans  <<endl ;
      |     ^~~~
a.cc:10:5: error: expected unqualified-id before 'return'
   10 |     return 0;
      |     ^~~~~~
a.cc:11:1: error: expected declaration before '}' token
   11 | }
      | ^
Language: C++

#include<functional>
#include <algorithm>
#include <iostream>
#include <memory.h>
#include <string.h>
#include <string>
#include <math.h>
#include <time.h>
#include <vector>
#include <queue>
#include<stack>
#include <map>
#include <set>
#include <list>
#include <deque>
#include <bitset>
#include <unordered_map>
#include <unordered_set>
using namespace std;
typedef long long ll;
const int M = 1000000007;
const double pi = acos(-1);
int n;
ll dp[400][400];
ll cs[401];
vector<int> v;
ll calc(int l, int r) {
	if (l == r)
		return 0;
	ll &ret = dp[l][r];
	if (ret != -1)
		return ret;
	ret = LLONG_MAX;
	for (int i = l; i < r; ++i) {
		ll cost = cs[i];
		if (l != 0)
			cost -= cs[l - 1];
		cost += cs[r] - cs[i];
		ret = min(ret, cost + calc(l, i) + calc(i + 1, r));
	}
	return ret;
}
int main() {
	//freopen("src.txt", "r", stdin);
	memset(dp, -1, sizeof dp);
	cin >> n;
	v.resize(n);
	for (int i = 0; i < n; ++i)
		cin >> v[i];
	cs[0] = v[0];
	for (int i = 1; i < n; ++i)
		cs[i] = cs[i - 1] + v[i];
	cout << calc(0, n - 1);
	return 0;
}

Compiler output:
a.cc: In function 'll calc(int, int)':
a.cc:33:15: error: 'LLONG_MAX' was not declared in this scope
   33 |         ret = LLONG_MAX;
      |               ^~~~~~~~~
a.cc:19:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   18 | #include <unordered_set>
  +++ |+#include <climits>
   19 | using namespace std;
Language: C++

#include <bits/stdc++.h>
#define fore(x,a,b) for(int x=a, qwerty=b; x<qwerty; x++)
#define ALL(a) (a).begin(),(a).end()
#define SZ(a) ((int)(a).size())
#define pb push_back
#define FIN ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define fst first
#define snd second
#define mset(a,v) memset((a),(v),sizeof(a))
//#pragma GCC optimize ("O3")
//#pragma GCC target ("sse4")
using namespace std;
typedef long long ll;
ll dp[512][512],sp[512][512],a[512],n;
int main(){FIN;
	cin>>n;
	fore(i,0,n)cin>>a[i];
	fore(i,0,n)fore(j,i,n){
		ll s=0;fore(k,i,j+1)s+=a[k];
		sp[i][j]=s;
	}
	fore(l,1,n){
		fore(i,0,n){
			int j=min(i+l,n-1);
			ll &r=dp[i][j];
			r=dp[i][i]+dp[i+1][j]+a[i]+sp[i+1][j];
			fore(k,i+1,j)r=min(r,dp[i][k]+dp[k+1][j]+sp[i][k]+sp[k+1][j]);
		}
	}
	cout<<dp[0][n-1]<<"\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:34: error: no matching function for call to 'min(int, ll)'
   24 |                         int j=min(i+l,n-1);
      |                               ~~~^~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:24:34: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
   24 |                         int j=min(i+l,n-1);
      |                               ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:24:34: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   24 |                         int j=min(i+l,n-1);
      |                               ~~~^~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
long long a,b,c,d,e,f[409],dp[401][401];
int main(){
	ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
	cin>>a;
	for(b=1; b<=a; b++) cin>>f[b];
	for(b=1; b<=a; b++){
		for(c=b; c<=a; c++){
			dp[b][c]=999999999999999999LL;
		}
	}
	for(b=1; b<=a; b++) dp[b][b]=f[b];
	for(b=2; b<=a; b++){
		for(c=1; c<=a; c++){
			if(c+b-1>a) break;
			for(d=c; d<c+b-1; d++){
				if(dp[c][c+b-1]>dp[c][d]+dp[d+1][c+b-1]){
					dp[c][c+b-1]=dp[c][d]+dp[d+1][c+b-1];
				}
			}
		}
	}#include<bits/stdc++.h>
using namespace std;
long long a,b,c,d,e,f[409],dp[401][401],jm[401];
int main(){
	ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
	cin>>a;
	for(b=1; b<=a; b++) cin>>f[b];
	for(b=1; b<=a; b++){
		for(c=b; c<=a; c++){
			dp[b][c]=999999999999999999LL;
		}
	}
	for(b=1; b<=a; b++) jm[b]=jm[b-1]+f[b];
	for(b=1; b<=a; b++) dp[b][b]=0;
	for(b=2; b<=a; b++){
		for(c=1; c<=a; c++){
			if(c+b-1>a) break;
			for(d=c; d<c+b-1; d++){
				if(dp[c][c+b-1]>dp[c][d]+dp[d+1][c+b-1]+jm[c+b-1]-jm[c-1]){
					dp[c][c+b-1]=dp[c][d]+dp[d+1][c+b-1]+jm[c+b-1]-jm[c-1];
				}
			}
		}
	}
	cout<<dp[1][a];
	return 0;
}
	cout<<dp[1][a];
	return 0;
}

Compiler output:
a.cc:23:10: error: stray '#' in program
   23 |         }#include<bits/stdc++.h>
      |          ^
a.cc: In function 'int main()':
a.cc:23:11: error: 'include' was not declared in this scope
   23 |         }#include<bits/stdc++.h>
      |           ^~~~~~~
a.cc:23:19: error: 'bits' was not declared in this scope
   23 |         }#include<bits/stdc++.h>
      |                   ^~~~
a.cc:23:24: error: 'stdc' was not declared in this scope; did you mean 'std'?
   23 |         }#include<bits/stdc++.h>
      |                        ^~~~
      |                        std
a.cc:24:1: error: expected primary-expression before 'using'
   24 | using namespace std;
      | ^~~~~
a.cc:26:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   26 | int main(){
      |         ^~
a.cc:26:9: note: remove parentheses to default-initialize a variable
   26 | int main(){
      |         ^~
      |         --
a.cc:26:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:26:11: error: a function-definition is not allowed here before '{' token
   26 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <cmath>
#include <map>
#include <string>

#define reps(i,s,n) for(int (i) = (s); (i) < (n); (i)++)
#define rep(i,n) reps(i,0,n)
using namespace std;
using ll = long long;
const int MOD = 1e9+7;

int main(){
    int N;
    cin >> N;
    vector<int> a(N);
    vector<ll> S(N+1);
    ll dp[401][401];
    rep(i,401){
        rep(j,401){
            dp[i][j] = 1e9;
        }
    }

    rep(i,N){ 
        cin >> a[i];
        S[i+1] = a[i] + S[i];
        dp[i][i] = 0;
    }

    reps(area,1,N){
        rep(i,N-area){
                if(area == 1) dp[i][i+area] = a[i] + a[i+area];
                else{
                    reps(j,i,i+area){
                        dp[i][i+area] = min(dp[i][i+area],
                                            dp[i][j] + dp[j+1][i+area] + 
                                            (S[j+1]-S[i]) + (S[i+area+1]-S[j+1])); 
                    }
                }
        }
    }

    cout << dp[0][N-1] << endl;
    return 0;
}
#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <cmath>
#include <map>
#include <string>

#define reps(i,s,n) for(int (i) = (s); (i) < (n); (i)++)
#define rep(i,n) reps(i,0,n)
using namespace std;
using ll = long long;
const int MOD = 1e9+7;

int main(){
    int N;
    cin >> N;
    vector<int> a(N);
    vector<ll> S(N+1);
    ll dp[401][401];
    rep(i,401){
        rep(j,401){
            dp[i][j] = 1e9;
        }
    }

    rep(i,N){ 
        cin >> a[i];
        S[i+1] = a[i] + S[i];
        dp[i][i] = 0;
    }

    reps(area,1,N){
        rep(i,N-area){
                if(area == 1) dp[i][i+area] = a[i] + a[i+area];
                else{
                    reps(j,i,i+area){
                        dp[i][i+area] = min(dp[i][i+area],
                                            dp[i][j] + dp[j+1][i+area] + 
                                            (S[j+1]-S[i]) + (S[i+area+1]-S[j+1])); 
                    }
                }
        }
    }

    cout << dp[0][N-1] << endl;
    return 0;
}


Compiler output:
a.cc:61:11: error: redefinition of 'const int MOD'
   61 | const int MOD = 1e9+7;
      |           ^~~
a.cc:13:11: note: 'const int MOD' previously defined here
   13 | const int MOD = 1e9+7;
      |           ^~~
a.cc:63:5: error: redefinition of 'int main()'
   63 | int main(){
      |     ^~~~
a.cc:15:5: note: 'int main()' previously defined here
   15 | int main(){
      |     ^~~~
Language: Java

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll dp[401][401];
ll mx=10000000000000000ll;
int main()
{
    ll n;
    cin>>n;
    ll a[n+1];
    ll s[n+1];
    for(int i=1;i<=n;i++)
        cin>>a[i];
    s[0]=0;

    for(int i=1;i<=n;i++)
        s[i]=s[i-1]+a[i];

    for(int i=n;i>=1;i--)
    {
        dp[i][i]=0;
        for(int j=i+1;j<=n;j++)
        {
            dp[i][j]=mx;
            for(int k=i;k<j;k++)
                dp[i][j]=min(dp[i][j],s[j]-s[i-1]+dp[i][k]+dp[k+1][j]);
        }
    }
    cout<<dp[1][n]<<endl;
    return 0;
}


Compiler output:
Main.java:1: error: illegal character: '#'
#include<bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include<bits/stdc++.h>
        ^
Main.java:3: error: class, interface, enum, or record expected
typedef long long ll;
^
Main.java:4: error: class, interface, enum, or record expected
ll dp[401][401];
^
Main.java:5: error: unnamed classes are a preview feature and are disabled by default.
ll mx=10000000000000000ll;
^
  (use --enable-preview to enable unnamed classes)
Main.java:5: error: ';' expected
ll mx=10000000000000000ll;
                        ^
Main.java:9: error: not a statement
    cin>>n;
       ^
Main.java:10: error: not a statement
    ll a[n+1];
          ^
Main.java:11: error: not a statement
    ll s[n+1];
          ^
Main.java:13: error: not a statement
        cin>>a[i];
           ^
Main.java:29: error: not a statement
    cout<<dp[1][n]<<endl;
                  ^
Main.java:10: error: ']' expected
    ll a[n+1];
         ^
Main.java:10: error: ';' expected
    ll a[n+1];
            ^
Main.java:11: error: ']' expected
    ll s[n+1];
         ^
Main.java:11: error: ';' expected
    ll s[n+1];
            ^
15 errors
Language: C++

//******* It's LEVI_17 ***************

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

#define ff first
#define ss second
#define MP make_pair
#define mset(x,a) memset(x,a,sizeof(x))
#define max3(x,y,z) max(x,max(y,z))
#define min3(x,y,z) min(x,min(y,z))
#define sqr(a) (a)*(a)
#define all(x) (x).begin(), (x).end()
#define f(i, n) for (int i = 0; i < n; i++)
#define f1(i, n) for (int i = 1; i <= n; i++)
#define loop(i,a,b) for (int i = a; i < b; i++)
#define bloop(i,a,b) for (int i = a ; i>=b;i--)
#define vvll vector<vector<ll>>  
#define vll vector<ll> 
#define pll pair<ll,ll>
#define vpll vector<pll>
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define cases ll t;cin >> t;while(t--)
#define rr return 0
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;

#define deb(a)			std::cerr<<#a<<"="<<(a)<<"\n"
#define deb2(a,b)		std::cerr<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<"\n"
#define deb3(a,b,c)		std::cerr<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<"\n"
const int MOD = 1000 * 1000 * 1000 + 7;
const ll INF = 1e18L + 5;
//syntax for priority queue
// max queue -> priority_queue<ll>
// min queue -> priority_queue<ll,vector<ll>,greater<ll>>

//##############################################################################################

ll countbits(int mask)
{
    ll count = 0;
    while (mask)
    {
        count += 1 & (mask);
        mask = mask >> 1;
    }

    return count;
}

void solve()
{
    ll n;
    cin >> n;
    ll arr[21][21];
    f(i, n)
        f(j, n)
        cin >> arr[i][j];



    vector<ll> dp((1 << n));

    dp[0] = 1;

    for (ll mask = 0; mask < (1 << n) - 1; ++mask)
    {
        ll a = countbits(mask);
        for (ll b = 0; b < n; b++)
        {
            if (arr[a][b] && !(mask & (1 << b)))
            {
                ll m2 = mask ^ (1 << b);
                (dp[m2] += dp[mask]%MOD)%=MOD;
            }
        }
    }

    cout << dp[(1 << n) - 1] << "\n";
}

//###############################################################################################

int main()
{
    fast;
    ll t = 1;
   // cin >> t;
    while (t--)
    {
        solve();
    }
    rr;
}


//Watashi wa tsuyoku modotte kimasu

Compiler output:
a.cc:4:10: fatal error: intrin.h: No such file or directory
    4 | #include <intrin.h>
      |          ^~~~~~~~~~
compilation terminated.
Language: Java

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

const int mxn = 21;
int dp[mxn + 1][1 << mxn], a[mxn][mxn];

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);

    int n;
    cin >> n;
    for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j) cin >> a[i][j];
    dp[0][0] = 1;
    for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j) if (a[i][j]) for (int mask = 0; mask < 1 << n; ++mask) if (!(mask & (1 << j))) {
        dp[i + 1][mask | (1 << j)] += dp[i][mask];
        dp[i + 1][mask | (1 << j)] %= 1000000007;
    }
    cout << dp[n][(1 << n) - 1] << endl;
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include <bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <bits/stdc++.h>
         ^
Main.java:4: error: class, interface, enum, or record expected
const int mxn = 21;
^
Main.java:5: error: class, interface, enum, or record expected
int dp[mxn + 1][1 << mxn], a[mxn][mxn];
^
Main.java:8: error: not a statement
    ios::sync_with_stdio(0);
    ^
Main.java:12: error: not a statement
    cin >> n;
        ^
Main.java:13: error: not a statement
    for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j) cin >> a[i][j];
                                                                ^
Main.java:19: error: not a statement
    cout << dp[n][(1 << n) - 1] << endl;
                                ^
Main.java:7: error: unnamed classes are a preview feature and are disabled by default.
int main() {
^
  (use --enable-preview to enable unnamed classes)
Main.java:8: error: ';' expected
    ios::sync_with_stdio(0);
                        ^
10 errors
Language: C++

#pragma GCC optimize("O2")
#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using ULL = unsigned long long;
using PII = pair<int, int>;
using PLL = pair<LL, LL>;
using VI = vector<int>;
using VVI = vector<vector<int>>;
const int INF = 1e9;
const int MXN = 25;
const int MXV = 0;
const double EPS = 1e-9;
const int MOD = 1e9 + 7;
#define MP make_pair
#define PB push_back
#define F first
#define S second
#define FOR(i, L, R) for (int i = L; i < (int)R; ++i)
#define FORD(i, L, R) for (int i = L; i > (int)R; --i)
#define IOS                                                                    \
    cin.tie(nullptr);                                                          \
    cout.tie(nullptr);                                                         \
    ios_base::sync_with_stdio(false);
int dp[MXN][(1 << MXN)];
bool G[MXN][MXN];

int main()
{
    IOS;
    dp[0][0] = 1;
    int n;
    cin >> n;
    FOR(i, 1, n + 1) FOR(j, 1, n + 1) { cin >> G[i][j]; }
    FOR(i, 1, n + 1) FOR(j, 0, (1 << (n)) - 1) if (__builtin_popcount(j) == i)
    {
        FOR(k, 1, n + 1) if (G[i][k] && (j & (1 << (k - 1))))
        {
            int i2 = i - 1;
            int j2 = j ^ (1 << (k - 1));
            dp[i][j] = (dp[i][j] + dp[i2][j2]) % MOD;
        }
    }
    int ans = 0;
    FOR(j, 0, (1 << (n)) - 1) { ans = max(ans, dp[n][j]); }
    cout << ans << '\n';
}


Compiler output:
/tmp/cc8F5HAd.o: in function `main':
a.cc:(.text.startup+0x5e): relocation truncated to fit: R_X86_64_PC32 against symbol `G' defined in .bss section in /tmp/cc8F5HAd.o
a.cc:(.text.startup+0xd6): relocation truncated to fit: R_X86_64_PC32 against symbol `G' defined in .bss section in /tmp/cc8F5HAd.o
collect2: error: ld returned 1 exit status
Language: C++

#include<bits/stdc++.h>
//#define int long long
#define ll long long
#define fi first
#define se second
#define pb push_back
#define pii pair<int,int>
#define vi vector<int>
using namespace std;
int n,k;
const int mod = 1e9+7;
ll dp[23][1<<24];
int a[23][23];
ll pr[405];
main() {
    ios::sync_with_stdio(0);
    cin >> n;
    dp[0][(1<<n)-1] = 1;
    for (int i = 0; i < n; i++)
        for (int j = 0; j < n; j++)
            cin >> a[i][j];
    for (int i = 0; i < n; i++)
    for (int mask = 0; mask < (1<<n); mask++) {
        int cnt = __builtin_popcount(mask);
        if (cnt + i != n) continue;
        for (int j = 0; j < n; j++)
                    if ((1<<j)&mask && a[i][j]) {
            (dp[i+1][mask^(1<<j)] += dp[i][mask])%=mod;
        }
    }
    cout << dp[n][0];
}


Compiler output:
a.cc:15:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   15 | main() {
      | ^~~~
/tmp/ccJRSEOn.o: in function `main':
a.cc:(.text+0x94): relocation truncated to fit: R_X86_64_PC32 against symbol `a' defined in .bss section in /tmp/ccJRSEOn.o
a.cc:(.text+0x156): relocation truncated to fit: R_X86_64_PC32 against symbol `a' defined in .bss section in /tmp/ccJRSEOn.o
collect2: error: ld returned 1 exit status
Language: C++

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

int main()
{
    long long modulo = 1e9+7;
    int N; cin >> N;
    vector < vector <int> > pairings(N, vector<int>(N));
    for (int i=0; i<N; ++i)
    {
        for (int j=0; j<N; ++j)
        {
            cin >> pairings[i][j];
        }
    }
    vector < long long> numberOfPairings(1<<N);
    numberOfPairings[0]=1;
    for (int i=0; i<(1<<N); ++i)
    {
        int assigned=0;
        for (int j=0; j<N; ++j)
        {
            if ((1<<j) & i) assigned++;
        }
        for (int j=0; j<N; ++j)
        {
            if ((1<< j) &i) continue;
            if (pairings[assigned][j]) 
                numberOfPairings[i | (1<<j)] = (numberOfPairings[i | (1 << j)] + numberOfPairings[i])%mod;
		}
	}
	cout << numberOfPairings[(1<<N)-1] << “\n”;
}


Compiler output:
a.cc:32:47: error: extended character “ is not valid in an identifier
   32 |         cout << numberOfPairings[(1<<N)-1] << “\n”;
      |                                               ^
a.cc:32:48: error: stray '\' in program
   32 |         cout << numberOfPairings[(1<<N)-1] << “\n”;
      |                                                ^
a.cc:32:49: error: extended character ” is not valid in an identifier
   32 |         cout << numberOfPairings[(1<<N)-1] << “\n”;
      |                                                 ^
a.cc: In function 'int main()':
a.cc:29:103: error: 'mod' was not declared in this scope; did you mean 'modf'?
   29 |                 numberOfPairings[i | (1<<j)] = (numberOfPairings[i | (1 << j)] + numberOfPairings[i])%mod;
      |                                                                                                       ^~~
      |                                                                                                       modf
a.cc:32:47: error: '\U0000201c' was not declared in this scope
   32 |         cout << numberOfPairings[(1<<N)-1] << “\n”;
      |                                               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
const int MOD=1e9+7;
int main()
{
    int n;
    cin>>n;
    int a[n][n];
    for(int i=0;i<n;i++) for(int j=0;j<n;j++) cin>>a[i][j];
    vector<ulli> dp(1<<n,0);
    dp[0]=1;
    for(int mask=0;mask<(1<<n);mask++)
    {
        int j=__builtin_popcount(mask);
        for(int i=0;i<n;i++)
        {
            if(a[j][i]==1 && !(mask&(1<<i)))
            {
                dp[mask|(1<<i)]=(dp[mask|(1<<i)]+dp[mask])%MOD;
            }
        }
    }
    cout<<dp[(1<<n)-1];
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: 'ulli' was not declared in this scope
   10 |     vector<ulli> dp(1<<n,0);
      |            ^~~~
a.cc:10:16: error: template argument 1 is invalid
   10 |     vector<ulli> dp(1<<n,0);
      |                ^
a.cc:10:16: error: template argument 2 is invalid
a.cc:10:27: error: expression list treated as compound expression in initializer [-fpermissive]
   10 |     vector<ulli> dp(1<<n,0);
      |                           ^
a.cc:11:7: error: invalid types 'int[int]' for array subscript
   11 |     dp[0]=1;
      |       ^
a.cc:19:19: error: invalid types 'int[int]' for array subscript
   19 |                 dp[mask|(1<<i)]=(dp[mask|(1<<i)]+dp[mask])%MOD;
      |                   ^
a.cc:19:36: error: invalid types 'int[int]' for array subscript
   19 |                 dp[mask|(1<<i)]=(dp[mask|(1<<i)]+dp[mask])%MOD;
      |                                    ^
a.cc:19:52: error: invalid types 'int[int]' for array subscript
   19 |                 dp[mask|(1<<i)]=(dp[mask|(1<<i)]+dp[mask])%MOD;
      |                                                    ^
a.cc:23:13: error: invalid types 'int[int]' for array subscript
   23 |     cout<<dp[(1<<n)-1];
      |             ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int dp[22][10000001];
int a[22][22];
int n;
int cal(int pos,int mask)
{
  
  if(mask+1==(1<<n))
    return 1;
  if(pos==n)
    return 0;
  if(dp[pos][mask]!=0)
    return dp[pos][mask];
  int ways=0;
  for(int i=0;i<n;i++)
  {
    if(a[pos][i]==1&&(mask&pow(2,i))==0)
    {
      ways+=(cal(pos+1,mask|pow(2,i))%1000000007);
      ways%=1000000007;
    }  
  }
  dp[pos][mask]=ways;
  return dp[pos][mask];
}
int main()
{
	cin>>n;
	for(int i=0;i<n;i++)
    {
      for(int j=0;j<n;j++)
      {
        cin>>a[i][j];
      }
    }
  	int res=cal(0,0);
  	cout<<res<<"\n";
}
  

Compiler output:
a.cc: In function 'int cal(int, int)':
a.cc:18:27: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator&'
   18 |     if(a[pos][i]==1&&(mask&pow(2,i))==0)
      |                       ~~~~^~~~~~~~~
      |                       |       |
      |                       int     __gnu_cxx::__promote<double>::__type {aka double}
a.cc:20:28: error: invalid operands of types 'int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator|'
   20 |       ways+=(cal(pos+1,mask|pow(2,i))%1000000007);
      |                        ~~~~^~~~~~~~~
      |                        |       |
      |                        int     __gnu_cxx::__promote<double>::__type {aka double}
Language: Java

vimport org.w3c.dom.ls.LSOutput;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.nio.Buffer;
import java.util.*;

public class Main {
    public static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }

    public static FastReader r=new FastReader();
    public static void main(String[] args){
        final int mod=1000000007;
        int n=r.nextInt();
        int [][]in=new int[n][n];
        for(int i=0;i<n;++i){
            for(int j=0;j<n;++j){
                in[i][j]=r.nextInt();
            }
        }
        int []dp=new int[1<<n];
        dp[0]=1;
        for(int mask=0;mask<(1<<n)-1;++mask){
            int man_th=Integer.bitCount(mask);
            for(int woman=0;woman<n;++woman){
                if(in[man_th][woman]==1&&(mask&(1<<woman))==0){
                    dp[mask|(1<<woman)]=(dp[mask|(1<<woman)]+dp[mask])%mod;
                }
            }
        }
        System.out.println(dp[(1<<n)-1]);
    }
}


Compiler output:
Main.java:1: error: class, interface, enum, or record expected
vimport org.w3c.dom.ls.LSOutput;
^
Main.java:3: error: class, interface, enum, or record expected
import java.io.BufferedReader;
^
Main.java:4: error: class, interface, enum, or record expected
import java.io.IOException;
^
Main.java:5: error: class, interface, enum, or record expected
import java.io.InputStreamReader;
^
Main.java:6: error: class, interface, enum, or record expected
import java.lang.reflect.Array;
^
Main.java:7: error: class, interface, enum, or record expected
import java.math.BigInteger;
^
Main.java:8: error: class, interface, enum, or record expected
import java.nio.Buffer;
^
Main.java:9: error: class, interface, enum, or record expected
import java.util.*;
^
8 errors
Language: C++

#include <iostream>

using namespace std;

typedef long long int ll;

const ll TWO = 3 * 1e7, N = 22, MOD = 1e9 + 7;

ll dp[N][TWO];
int n, compatible[N][N];

ll countWays(int currMan, ll usedWomen, int menCount, int womenCount) {
  if (menCount == n && womenCount == n)
    return 1;
  if (menCount == n || womenCount == n)
    return 0;

  if (dp[currMan][usedWomen])
    return dp[currMan][usedWomen];

  for (int i = 0; i < n; i++)
    if (compatible[currMan][i] && !(usedWomen & (1 << i)))
      dp[currMan][usedWomen] += countWays(currMan+1, usedWomen | (1 << i), menCount+1, womenCount+1) % MOD, dp[currMan][usedWomen] %= MOD;

  dp[currMan][usedWomen] %= MOD;
  return dp[currMan][usedWomen];
}

int main() {
  cin >> n;
  
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++)
      cin >> compatible[i][j];

  cout << countWays(0, 0, 0, 0) % MOD << endl;
}


Compiler output:
/tmp/cc10d31d.o: in function `countWays(int, long long, int, int)':
a.cc:(.text+0x17): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc10d31d.o
a.cc:(.text+0x22): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc10d31d.o
a.cc:(.text+0x37): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc10d31d.o
a.cc:(.text+0x42): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc10d31d.o
a.cc:(.text+0xe4): relocation truncated to fit: R_X86_64_PC32 against symbol `compatible' defined in .bss section in /tmp/cc10d31d.o
a.cc:(.text+0x245): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc10d31d.o
/tmp/cc10d31d.o: in function `main':
a.cc:(.text+0x301): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc10d31d.o
a.cc:(.text+0x356): relocation truncated to fit: R_X86_64_PC32 against symbol `compatible' defined in .bss section in /tmp/cc10d31d.o
a.cc:(.text+0x375): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc10d31d.o
a.cc:(.text+0x384): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc10d31d.o
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>

using namespace std;

typedef long long int ll;

const unsigned int TWO = 3 * 1e7, N = 22, MOD = 1e9 + 7;

unsigned int dp[N][TWO];
int n, compatible[N][N];

unsigned int countWays(int currMan, ll usedWomen, int menCount, int womenCount) {
  if (menCount == n && womenCount == n)
    return 1;
  if (menCount == n || womenCount == n)
    return 0;

  if (dp[currMan][usedWomen])
    return dp[currMan][usedWomen];

  for (int i = 0; i < n; i++)
    if (compatible[currMan][i] && !(usedWomen & (1 << i)))
      dp[currMan][usedWomen] += countWays(currMan+1, usedWomen | (1 << i), menCount+1, womenCount+1) % MOD, dp[currMan][usedWomen] %= MOD;

  dp[currMan][usedWomen] %= MOD;
  return dp[currMan][usedWomen];
}

int main() {
  cin >> n;
  
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++)
      cin >> compatible[i][j];

  cout << countWays(0, 0, 0, 0) % MOD << endl;
}


Compiler output:
/tmp/ccpn3jc6.o: in function `countWays(int, long long, int, int)':
a.cc:(.text+0x17): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccpn3jc6.o
a.cc:(.text+0x22): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccpn3jc6.o
a.cc:(.text+0x37): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccpn3jc6.o
a.cc:(.text+0x42): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccpn3jc6.o
a.cc:(.text+0xe1): relocation truncated to fit: R_X86_64_PC32 against symbol `compatible' defined in .bss section in /tmp/ccpn3jc6.o
a.cc:(.text+0x222): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccpn3jc6.o
/tmp/ccpn3jc6.o: in function `main':
a.cc:(.text+0x2ce): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccpn3jc6.o
a.cc:(.text+0x323): relocation truncated to fit: R_X86_64_PC32 against symbol `compatible' defined in .bss section in /tmp/ccpn3jc6.o
a.cc:(.text+0x342): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccpn3jc6.o
a.cc:(.text+0x351): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccpn3jc6.o
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>

using namespace std;

typedef long long int ll;

const unsigned int TWO = 3 * 1e7, N = 22, MOD = 1e9 + 7;

unsigned int dp[N][TWO];
int n, compatible[N][N];

unsigned int countWays(int currMan, ll usedWomen, int menCount, int womenCount) {
  if (menCount == n && womenCount == n)
    return 1;
  if (menCount == n || womenCount == n)
    return 0;

  if (dp[currMan][usedWomen])
    return dp[currMan][usedWomen];

  for (int i = 0; i < n; i++)
    if (compatible[currMan][i] && !(usedWomen & (1 << i)))
      dp[currMan][usedWomen] += countWays(currMan+1, usedWomen | (1 << i), menCount+1, womenCount+1) % MOD, dp[currMan][usedWomen] %= MOD;

  dp[currMan][usedWomen] %= MOD;
  return dp[currMan][usedWomen];
}

int main() {
  cin >> n;
  
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++)
      cin >> compatible[i][j];

  cout << countWays(0, 0, 0, 0) % MOD << endl;
}


Compiler output:
/tmp/ccv1aHIK.o: in function `countWays(int, long long, int, int)':
a.cc:(.text+0x17): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccv1aHIK.o
a.cc:(.text+0x22): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccv1aHIK.o
a.cc:(.text+0x37): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccv1aHIK.o
a.cc:(.text+0x42): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccv1aHIK.o
a.cc:(.text+0xe1): relocation truncated to fit: R_X86_64_PC32 against symbol `compatible' defined in .bss section in /tmp/ccv1aHIK.o
a.cc:(.text+0x222): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccv1aHIK.o
/tmp/ccv1aHIK.o: in function `main':
a.cc:(.text+0x2ce): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccv1aHIK.o
a.cc:(.text+0x323): relocation truncated to fit: R_X86_64_PC32 against symbol `compatible' defined in .bss section in /tmp/ccv1aHIK.o
a.cc:(.text+0x342): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccv1aHIK.o
a.cc:(.text+0x351): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccv1aHIK.o
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>

using namespace std;

typedef long long int ll;

const int TWO = 3 * 1e7, N = 25, MOD = 1e9 + 7;

ll dp[N][TWO];
int n, compatible[N][N];

ll countWays(int currMan, ll usedWomen, int menCount, int womenCount) {
  if (menCount == n && womenCount == n)
    return 1;
  if (menCount == n || womenCount == n)
    return 0;

  if (dp[currMan][usedWomen])
    return dp[currMan][usedWomen];

  for (int i = 0; i < n; i++)
    if (compatible[currMan][i] && !(usedWomen & (1 << i)))
      dp[currMan][usedWomen] += countWays(currMan+1, usedWomen | (1 << i), menCount+1, womenCount+1) % MOD, dp[currMan][usedWomen] %= MOD;

  dp[currMan][usedWomen] %= MOD;
  return dp[currMan][usedWomen];
}

int main() {
  cin >> n;
  
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++)
      cin >> compatible[i][j];

  cout << countWays(0, 0, 0, 0) % MOD << endl;
}


Compiler output:
/tmp/cczpkN9e.o: in function `countWays(int, long long, int, int)':
a.cc:(.text+0x17): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cczpkN9e.o
a.cc:(.text+0x22): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cczpkN9e.o
a.cc:(.text+0x37): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cczpkN9e.o
a.cc:(.text+0x42): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cczpkN9e.o
a.cc:(.text+0xe6): relocation truncated to fit: R_X86_64_PC32 against symbol `compatible' defined in .bss section in /tmp/cczpkN9e.o
a.cc:(.text+0x247): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cczpkN9e.o
/tmp/cczpkN9e.o: in function `main':
a.cc:(.text+0x303): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cczpkN9e.o
a.cc:(.text+0x35a): relocation truncated to fit: R_X86_64_PC32 against symbol `compatible' defined in .bss section in /tmp/cczpkN9e.o
a.cc:(.text+0x379): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cczpkN9e.o
a.cc:(.text+0x388): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cczpkN9e.o
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>

using namespace std;

typedef long long int ll;

const ll TWO = 3 * 1e7, N = 25, MOD = 1e9 + 7;

ll dp[N][TWO];
int n, compatible[N][N];

ll countWays(int currMan, ll usedWomen, int menCount, int womenCount) {
  if (menCount == n && womenCount == n)
    return 1;
  if (menCount == n || womenCount == n)
    return 0;

  if (dp[currMan][usedWomen])
    return dp[currMan][usedWomen];

  for (int i = 0; i < n; i++)
    if (compatible[currMan][i] && !(usedWomen & (1 << i)))
      dp[currMan][usedWomen] += countWays(currMan+1, usedWomen | (1 << i), menCount+1, womenCount+1) % MOD, dp[currMan][usedWomen] %= MOD;

  dp[currMan][usedWomen] %= MOD;
  return dp[currMan][usedWomen];
}

int main() {
  cin >> n;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++)
      cin >> compatible[i][j];

  cout << countWays(0, 0, 0, 0) % MOD << endl;
}


Compiler output:
/tmp/ccWXPS0f.o: in function `countWays(int, long long, int, int)':
a.cc:(.text+0x17): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccWXPS0f.o
a.cc:(.text+0x22): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccWXPS0f.o
a.cc:(.text+0x37): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccWXPS0f.o
a.cc:(.text+0x42): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccWXPS0f.o
a.cc:(.text+0xe6): relocation truncated to fit: R_X86_64_PC32 against symbol `compatible' defined in .bss section in /tmp/ccWXPS0f.o
a.cc:(.text+0x247): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccWXPS0f.o
/tmp/ccWXPS0f.o: in function `main':
a.cc:(.text+0x303): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccWXPS0f.o
a.cc:(.text+0x35a): relocation truncated to fit: R_X86_64_PC32 against symbol `compatible' defined in .bss section in /tmp/ccWXPS0f.o
a.cc:(.text+0x379): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccWXPS0f.o
a.cc:(.text+0x388): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccWXPS0f.o
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include <map>

using namespace std;

typedef long long int ll;
typedef unsigned int ui;

const ll TWO = 3 * 1e7, N = 25, MOD = 1e9 + 7;

ui dp[N][TWO];
int n, compatible[N][N];

ui countWays(int currMan, ui usedWomen, int menCount, int womenCount) {
  if (menCount == n && womenCount == n)
    return 1;
  if (menCount == n || womenCount == n)
    return 0;

  if (dp[currMan][usedWomen])
    return dp[currMan][usedWomen];

  for (int i = 0; i < n; i++)
    if (compatible[currMan][i] && !(usedWomen & (1 << i)))
      dp[currMan][usedWomen] += countWays(currMan+1, usedWomen | (1 << i), menCount+1, womenCount+1) % MOD, dp[currMan][usedWomen] %= MOD;

  dp[currMan][usedWomen] %= MOD;
  return dp[currMan][usedWomen];
}

int main() {
  cin >> n;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++)
      cin >> compatible[i][j];

  cout << countWays(0, 0, 0, 0) % MOD << endl;
}


Compiler output:
/tmp/ccflbDCU.o: in function `countWays(int, unsigned int, int, int)':
a.cc:(.text+0x16): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccflbDCU.o
a.cc:(.text+0x21): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccflbDCU.o
a.cc:(.text+0x36): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccflbDCU.o
a.cc:(.text+0x41): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccflbDCU.o
a.cc:(.text+0xe2): relocation truncated to fit: R_X86_64_PC32 against symbol `compatible' defined in .bss section in /tmp/ccflbDCU.o
a.cc:(.text+0x237): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccflbDCU.o
/tmp/ccflbDCU.o: in function `main':
a.cc:(.text+0x2f3): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccflbDCU.o
a.cc:(.text+0x34a): relocation truncated to fit: R_X86_64_PC32 against symbol `compatible' defined in .bss section in /tmp/ccflbDCU.o
a.cc:(.text+0x369): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccflbDCU.o
a.cc:(.text+0x378): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccflbDCU.o
collect2: error: ld returned 1 exit status
Language: C++

#include<bits/stdc++.h> 
using namespace std;
#define mod 1e9+7;
int dp[22][(1<<22)];
int n;
int solve(int relation[][n+1],int wset,int men){
	if(men==n+1){
      if(wset==0)
        return 1;
      return 0;}
  	if(dp[men][wset]!=-1)
      	return dp[men][wset];
  	int ans=0;
  	for(int w=0;w<n;w++){
    	bool present=(1<<w)&wset;
      	if(present && relation[men][w+1]==1){
          ans+=solve(relation,wset^(1<<w),men+1,n);
          ans%=mod;
    }
     return dp[men][wset]=ans;
}
int main(){
  	cin>>n;
  	int relation[n+1][n+1];
  	memset(dp,-1,sizeof dp);
  	for(int i=1;i<=n;i++){
      	for(int j=1;j<=n;j++){
          	cin>>relation[i][j];}}
  	cout<<solve(relation,(1<<n)-1,0);


Compiler output:
a.cc:6:27: error: size of array 'relation' is not an integral constant-expression
    6 | int solve(int relation[][n+1],int wset,int men){
      |                          ~^~
a.cc: In function 'int solve(int (*)[1], int, int)':
a.cc:17:21: error: too many arguments to function 'int solve(int (*)[1], int, int)'
   17 |           ans+=solve(relation,wset^(1<<w),men+1,n);
      |                ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:6:5: note: declared here
    6 | int solve(int relation[][n+1],int wset,int men){
      |     ^~~~~
a.cc:18:14: error: invalid operands of types 'int' and 'double' to binary 'operator%'
   18 |           ans%=mod;
      |              ^
a.cc:18:14: note:   in evaluation of 'operator%=(int, double)'
a.cc:22:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   22 | int main(){
      |         ^~
a.cc:22:9: note: remove parentheses to default-initialize a variable
   22 | int main(){
      |         ^~
      |         --
a.cc:22:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:22:11: error: a function-definition is not allowed here before '{' token
   22 | int main(){
      |           ^
a.cc:29:42: error: expected '}' at end of input
   29 |         cout<<solve(relation,(1<<n)-1,0);
      |                                          ^
a.cc:6:48: note: to match this '{'
    6 | int solve(int relation[][n+1],int wset,int men){
      |                                                ^
a.cc:29:42: warning: control reaches end of non-void function [-Wreturn-type]
   29 |         cout<<solve(relation,(1<<n)-1,0);
      |                                          ^
Language: C++

#include<bits/stdc++.h> 
using namespace std;
#define mod 1e9+7;
int dp[22][(1<<22)];
int n;
int solve(int relation[n][n],int wset,int men){
	if(men==n+1){
      if(wset==0)
        return 1;
      return 0;}
  	if(dp[men][wset]!=-1)
      	return dp[men][wset];
  	int ans=0;
  	for(int w=0;w<n;w++){
    	bool present=(1<<w)&wset;
      	if(present){
          ans+=solve(relation,wset^(1<<w),men+1,n);
          ans%=mod;
    }
     return dp[men][wset]=ans;
}
int main(){
  	cin>>n;
  	int relation[n+1][n+1];
  	memset(dp,-1,sizeof dp);
  	for(int i=1;i<=n;i++){
      	for(int j=1;j<=n;j++){
          	cin>>relation[i][j];}}
  	cout<<solve(relation,1,0);


Compiler output:
a.cc:6:27: error: size of array 'relation' is not an integral constant-expression
    6 | int solve(int relation[n][n],int wset,int men){
      |                           ^
a.cc:6:24: error: size of array 'relation' is not an integral constant-expression
    6 | int solve(int relation[n][n],int wset,int men){
      |                        ^
a.cc: In function 'int solve(int (*)[1], int, int)':
a.cc:17:21: error: too many arguments to function 'int solve(int (*)[1], int, int)'
   17 |           ans+=solve(relation,wset^(1<<w),men+1,n);
      |                ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:6:5: note: declared here
    6 | int solve(int relation[n][n],int wset,int men){
      |     ^~~~~
a.cc:18:14: error: invalid operands of types 'int' and 'double' to binary 'operator%'
   18 |           ans%=mod;
      |              ^
a.cc:18:14: note:   in evaluation of 'operator%=(int, double)'
a.cc:22:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   22 | int main(){
      |         ^~
a.cc:22:9: note: remove parentheses to default-initialize a variable
   22 | int main(){
      |         ^~
      |         --
a.cc:22:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:22:11: error: a function-definition is not allowed here before '{' token
   22 | int main(){
      |           ^
a.cc:29:35: error: expected '}' at end of input
   29 |         cout<<solve(relation,1,0);
      |                                   ^
a.cc:6:47: note: to match this '{'
    6 | int solve(int relation[n][n],int wset,int men){
      |                                               ^
a.cc:29:35: warning: control reaches end of non-void function [-Wreturn-type]
   29 |         cout<<solve(relation,1,0);
      |                                   ^