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

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define mi 1000000007;
int state[200005];
int dp[5000][1005];
int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int n,m;
	cin>>n>>m;
	int cost[m+1];
	for(int i=0;i<5000;i++){
		for(int j=0;j<1005;j++){
			dp[i][j]=mi;
		}
	}
	for(int i=1;i<=m;i++){
		int q;
		cin>>cost[i]>>q;
		while(q--){
			int x;
			cin>>x;
			state[i]|=(1<<(x-1));
		}
	}
	dp[0][0]=0;
	for(int i=0;i<(1<<n);i++){
		for(int j=1;j<=m;j++){
			dp[i][j]=min(dp[i][j],dp[i][j-1]);
			dp[i|state[j]][j]=min(dp[i|state[j]][j],dp[i][j-1]+cost[j]);
		}
	}
	int ans=dp[(1<<n)-1][m];
	if(ans==mi) cout<<"-1\n";
	else cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:19: error: expected primary-expression before ')' token
   36 |         if(ans==mi) cout<<"-1\n";
      |                   ^
Language: C++

#include <bits/stdc++.h>
#include <stdio.h>
#include <ios>     
#include <iomanip> 

using namespace std;
#define inputInt(a) int a; cin >> a; 
#define inputInt2(a,b) int a; int b; cin >> a >> b; 
#define inputInt3(a,b,c) int a; int b; int c; cin >> a >> b >> c;
#define inputLong(a) long a;cin >> a; 
#define inputIntArray(a,N) int a[N];for(int i=0;i<N;i++){cin >> a[i];}
#define inputLongArray(a,N) long a[N];for(int i=0;i<N;i++){cin >> a[i];}
#define inputIntArray2(a,b,N) int a[N]; int b[N]; for(int i=0;i<N;i++){cin >> a[i] >> b[i];}
#define output(answer) cout << answer << endl;
#define fN(i,N)    for(int i=0; i<N; i++)
#define fSE(i,s,e) for(int i=s; i<=e; i++)
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define ll long long
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }

//互除法
ll GCD(ll a, ll b){
  return b ? GCD(b,a%b) : a;
}

ll LCM(ll a, ll b){
  return (a / GCD(a,b))*b;
}

//素因数分解
pair<map<ll,ll>,bool> PrimeFactorization(ll N){
  pair<map<ll,ll>,bool> ret;//<素因数分解,素数判定>
  ret.second = true;
  
  //素因数分解
  if(N != 2){
    while(N%2 == 0){//p=2の時。
      N /= 2;
      ret.first[2] ++;
      ret.second = false;
    }
  }
  for(ll i=3; i*i<=N; i+=2){//p>=3の時。
    while(N%i == 0){
      N /= i; 
      ret.first[i] ++;
      ret.second = false;
    }
  }
  if(N != 1){//Nが素数の時
    ret.first[N] ++;
  }
  
  //返り値
  return ret;
}


int main()
{
  //方針
  //bitDP
  
  //input
  int N, M;
  cin >> N >> M;
  vector<int> a(M),b(M),c(M,0); //vector[0~M-1]にbit集合が格納される。
  
  for(int i=0; i<M; i++){
    cin >> a[i] >> b[i];
    for(int j=0; j<b[i]; j++){//inputでビット集合として表現した方が、vectorにpbするよりも実装が楽。
      int c; cin >> c; c --;
      c[i] += (1<<c);
    }
  }
  
  //main
  int INF = 1e9;
  int status = (int)pow(2.0, (double)N);
  vector<vector<int>> dp(M+10,vector<int>(status+10,INF));
  //dp[i][j]→i番目の鍵まで使って宝箱の状態をjにするときの最小コスト
  
  //output
  for(int i=0; i<M; i++){
    for(int j=0; j<(1<<N); j++){
       chmin(dp[i+1][j], dp[i][j]);//i+1番目の鍵を使わない
       int nj = j|c[i];
       chmin(dp[i+1][nj], dp[i][j]);//i+1番目の鍵を使う
    }
  }
  
  int ans = 0;
  
    
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:77:8: error: invalid types 'int[int]' for array subscript
   77 |       c[i] += (1<<c);
      |        ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;++i)
using namespace std;
const int INF=1001001001;
int main(){
  ll n,m;
  cin>>n>>m;
  vector<pair<int,int>>key;
  rep(i,m){
    int a,b;
    cin>>a>>b;
    int s=0;
    rep(j,b){
      int c;
      cin>>c;
      --c;
      s|=1<<c;
    }
    key.emplace_back(s,a);
  }
  
  vector<int> dp(1<<n,INF);
  dp[0]=0;
  rep(s,1<<n){
    rep(i,m){
      int t=s | key[i].first;
      int cost = dp[s]+key[i].second;
      dp[t]=min(dp[t],cost);
    }
  }
  int ans=dp.back();
  if (ans==INF) ans=-1;  
  cout<<ans<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'll' was not declared in this scope
    6 |   ll n,m;
      |   ^~
a.cc:7:8: error: 'n' was not declared in this scope; did you mean 'yn'?
    7 |   cin>>n>>m;
      |        ^
      |        yn
a.cc:7:11: error: 'm' was not declared in this scope; did you mean 'tm'?
    7 |   cin>>n>>m;
      |           ^
      |           tm
Language: C++

//#include "stdafx.h"
#include "pch.h"
#include <iostream>
#include <queue>
#include <vector>
#include <algorithm>
#include <math.h>

using namespace std;

/*-----------------------------------------------------------------------------
	定義
-------------------------------------------------------------------------------*/
#define REP(i, n) for (int (i) = 0 ; (i) < (int)(n) ; ++(i))
#define REPN(i, m, n) for (int (i) = m ; (i) < (int)(n) ; ++(i))
#define REP_REV(i, n) for (int (i) = (int)(n) - 1 ; (i) >= 0 ; --(i))
#define REPN_REV(i, m, n) for (int (i) = (int)(n) - 1 ; (i) >= m ; --(i))
#define INF			2e9
#define MOD			1e9+7
#define MIN(a, b)	((a) < (b) ? a : b)
#define MAX(a, b)	((a) > (b) ? a : b)

typedef long long int QWORD;
typedef long long int ll;

/*-----------------------------------------------------------------------------
	処理
-------------------------------------------------------------------------------*/
int main()
{
	int N;
	int M;

	cin >> N;
	cin >> M;

	vector<int> takaraBase(N);
	vector<int> takaraTmp(N);
	vector<int> okane(M);
	vector<int> keyNum(M);
	vector<vector<int>> keyType(M);

	REP(i, M) {
		cin >> okane[i];
		cin >> keyNum[i];
		REP(j, keyNum[i]) {
			int keyOne;
			cin >> keyOne;
			keyType[i].push_back(keyOne);
		}
	}

	REP(i, takaraBase.size()) {
		takaraBase[i] = i + 1;
	}
	takaraTmp = takaraBase;


	REP(i, N) {

	}

//	cout << cnt;
	return 0;
}



Compiler output:
a.cc:2:10: fatal error: pch.h: No such file or directory
    2 | #include "pch.h"
      |          ^~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<vector>
#include<iomanip>
#include<cstdio>

#define INF 100000001
using namespace std;



int main(){
    int N, M;
    cin >> N >> M;

    int dp[M][1 << N];

    for(int i=0; i< M; i++){
        for(int j = 0; j < (1 << N); j++){
            dp[i][j] = INF;
        }
    }
    dp[0][0] = 0;

    for(int i=0; i < M; i++){
        int a ,b;
        cin >> a >> b;
        int key = 0;
        for(int j = 0; j<b; j++){
            int c;
            cin >> c; c--;
            key += (1 << c);
        }
        if(i == 0){
            dp[i][key] = a;
        }
        else{
            for(int j=0; j<(1 << N); j++){
                dp[i][j] = min(dp[i][j], dp[i-1][j]);
                dp[i][j | key] = min({dp[i-1][j | key], dp[i-1][j] + a, dp[i][j | key]});
            }
        }
    }
    
    cout << (dp[M-1][(1 << N)-1] == INF ? -1 :dp[M-1][(1 << N)-1] ) << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:37: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
   39 |                 dp[i][j | key] = min({dp[i-1][j | key], dp[i-1][j] + a, dp[i][j | key]});
      |                                  ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 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:   candidate expects 2 arguments, 1 provided
/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, 1 provided
Language: C++

#pragma GCC optimize("O3", "unroll-loops")
#pragma GCC target("avx2")
 
#include <bits/stdc++.h>
 
using namespace std;

#define ll long long
#define pussy push_back
#define F first
#define S second
#define mod 1000000007
#define inf 3000000000000000007ll
#define sz(a) signed(a.size())
const int N = 1e6 + 10;
template<class T, class U> inline void checkmin(T &x, U y) { if (y < x) x = y; }
template<class T, class U> inline void checkmax(T &x, U y) { if (y > x) x = y; }
template<class T, class U> inline istream& operator>>(istream& str, pair<T, U> &p) { return str >> p.F >> p.S; }
template<class T> inline istream& operator>>(istream& str, vector<T> &a) { for (auto &i : a) str >> i; return str; }

int n , m ;
vector<int> v[N];
int c[N];
int ans = 1e9;
int dd[1010][(1 << 12) + 5];

int main() {
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	cin >> n >> m;
	for(int i = 1  ; i <= m ;i ++) {
		cin >> c[i];
		int x ; cin >> x;
		for(int j = 0 ;j < x ; j ++) {
			int y ; cin >> y;
			v[i].pussy(y);
		}
	}
	int _mask = 0;
	for(int i = 1 ;i <= n ; i ++) _mask |= (1 << i);
	for(int i = 0 ; i < 1010 ; i ++) 
		for(int j = 0 ; j < int((1 << 12) + 1) ; j ++) 
			dd[i][j] = 1e9;


	for(int i = 0 ; i <= m ; i ++) dd[i][0] = 0;

	for(int i = 1 ; i <= m ; i ++) {
		int can = 0;
		for(auto j : v[i]) can |= (1 << j);
		for(int j = 1 ; j <= _mask ; j ++) {
			int mask = 0;
			for(int k = 1 ; k <= n ; k ++) {
				if((j & (1 << k)) && ((can & (1 << k)) == 0)) {
					mask |= (1 << k);
				}
			}
			if(dd[i - 1][mask] != 1e9) {
				dd[i][j] = min(dd[i - 1][j] , c[i] + dd[i - 1][mask]);
			} else dd[i][j] = dd[i - 1][j];
		}
	}
	if(dd[m][_mask] == 1e9) cout << -1;
	else
	cout << dd[m][_mask];
}


Compiler output:
In file included from /usr/include/c++/14/string:43,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:4:
/usr/include/c++/14/bits/allocator.h: In destructor 'std::_Vector_base<int, std::allocator<int> >::_Vector_impl::~_Vector_impl()':
/usr/include/c++/14/bits/allocator.h:182:7: error: inlining failed in call to 'always_inline' 'std::allocator< <template-parameter-1-1> >::~allocator() noexcept [with _Tp = int]': target specific option mismatch
  182 |       ~allocator() _GLIBCXX_NOTHROW { }
      |       ^
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53:
/usr/include/c++/14/bits/stl_vector.h:132:14: note: called from here
  132 |       struct _Vector_impl
      |              ^~~~~~~~~~~~
Language: C++

#pragma GCC optimize("O3", "unroll-loops")
#pragma GCC target("avx2")
 
#include <bits/stdc++.h>
 
using namespace std;

#define ll long long
#define pussy push_back
#define F first
#define S second
#define mod 1000000007
#define inf 3000000000000000007ll
#define sz(a) signed(a.size())
const int N = 1e6 + 10;
template<class T, class U> inline void checkmin(T &x, U y) { if (y < x) x = y; }
template<class T, class U> inline void checkmax(T &x, U y) { if (y > x) x = y; }
template<class T, class U> inline istream& operator>>(istream& str, pair<T, U> &p) { return str >> p.F >> p.S; }
template<class T> inline istream& operator>>(istream& str, vector<T> &a) { for (auto &i : a) str >> i; return str; }

int n , m ;
vector<int> v[N];
long long c[N];
long long ans = 1e18;
long long dd[1010][1 << 14];

int main() {
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	cin >> n >> m;
	for(int i = 1  ; i <= m ;i ++) {
		cin >> c[i];
		int x ; cin >> x;
		for(int j = 0 ;j < x ; j ++) {
			int y ; cin >> y;
			v[i].pussy(y);
		}
	}
	int _mask = 0;
	for(int i = 1 ;i <= n ; i ++) _mask |= (1 << i);
	for(int i = 0 ; i < 1010 ; i ++) 
		for(int j = 0 ; j < (1 << 13) ; j ++) 
			dd[i][j] = 1e18;


	for(int i = 0 ; i < 1010 ; i ++) dd[i][0] = 0;

	for(int i = 1 ; i <= m ; i ++) {
		int can = 0;
		for(auto j : v[i]) can |= (1 << j);
		for(int j = 1 ; j <= (1 << 13) ; j ++) {
			int mask = 0;
			for(int k = 1 ; k <= n ; k ++) {
				if((j & (1 << k)) && (!(can & (1 << k)))) {
					mask |= (1 << k);
				}
			}
			if(dd[i - 1][mask] != 1e18) {
				dd[i][j] = min(dd[i - 1][j] , c[i] + dd[i - 1][mask]);
			} else dd[i][j] = dd[i - 1][j];
		}
	}
	if(dd[m][_mask] == 1e18) cout << -1;
	else
	cout << dd[m][_mask];
}

Compiler output:
In file included from /usr/include/c++/14/string:43,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:4:
/usr/include/c++/14/bits/allocator.h: In destructor 'std::_Vector_base<int, std::allocator<int> >::_Vector_impl::~_Vector_impl()':
/usr/include/c++/14/bits/allocator.h:182:7: error: inlining failed in call to 'always_inline' 'std::allocator< <template-parameter-1-1> >::~allocator() noexcept [with _Tp = int]': target specific option mismatch
  182 |       ~allocator() _GLIBCXX_NOTHROW { }
      |       ^
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53:
/usr/include/c++/14/bits/stl_vector.h:132:14: note: called from here
  132 |       struct _Vector_impl
      |              ^~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(ll i = 0; i < (ll)n; i++)
#define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF (1ll << 60)
#define sz(x) int(x.size())
using namespace std;
typedef long long ll;
typedef double db;
typedef string str;
typedef pair<ll, ll> p;
constexpr int MOD = 1000000007;
using ll = long long;
template <class T> inline bool chmin(T &a, T b) {
    if(a > b) {
        a = b;
        return true;
    }
    return false;
}
template <class T> inline bool chmax(T &a, T b) {
    if(a < b) {
        a = b;
        return true;
    }
    return false;
}

void print(const std::vector<int> &v) {
    std::for_each(v.begin(), v.end(), [](int x) { std::cout << x << " "; });
    std::cout << std::endl;
}

template <typename T>
using min_priority_queue = priority_queue<T, vector<T>, greater<T>>;
int N;

void dijk(int s, vector<vector<pair<int, int>>> &E, vector<long long> &D) {
    int vis[101010];
    for(int i = 0; i < N; i++) {
        D[i] = INF;
        vis[i] = 0;
    }

    min_priority_queue<pair<long long, int>> que;

    D[s] = 0;
    que.push({0, s});

    while(!que.empty()) {
        auto q = que.top();
        que.pop();

        auto cst = q.first;
        auto cu = q.second;

        if(vis[cu]) {
            continue;
        } else {
            vis[cu] = 1;
        }
        for(auto p : E[cu]) {
            long long cst2 = cst + p.second;
            int to = p.first;

            if(D[to] > cst2) {
                D[to] = cst2;
                que.push({D[to], to});
            }
        }
    }
}

int main() {
    int N, M;
    //箱がN個
    //鍵がM個
    // i個目の鍵はai円で販売されており
    // bi種類の箱Ci1 to Cibiをあけることができる
    cin >> N >> M;
    vector<int> a(M), b(M);
    vector<int> c(M);
    vector<vector<pair<int, int>>> Edge(1 << N);
    vector<long long> D(1 << N, INF);
    REP(i, M) {
        cin >> a[i] >> b[i];
        int encode = 0;
        REP(j, b[i]) {
            int k;
            cin >> k;
            k--;
            encode |= 1LL << k;
        }
        REP(j, 1 << N) { Edge[j].push_back(make_pair(encode | j, a[i])); }
    }
    dijk(0, Edge, D);
    ll last = 1 << N;
    last--;
    if(cases[last] != INF) {
        cout << cases[last] << endl;
    } else {
        cout << "-1" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:99:8: error: 'cases' was not declared in this scope
   99 |     if(cases[last] != INF) {
      |        ^~~~~
Language: C++

#include <bits/stdc++.h>
/*#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>*/
 
#define pll              pair <long long,long long>
#define pb               push_back
#define ll              long long 
#define ff               first
#define ss               second
#define D(x)             cerr<<#x " = "<<(x)<<endl
#define vll              vector <ll>
#define IOS              ios_base::sync_with_stdio(0); cin.tie(NULL);
#define endl             '\n'   
using namespace std;
const ll N=4500+1;
const ll inf=1e17;
ll dp[N];
ll n,m;
ll lmt;
vector<ll>p;
vector<ll>b;
 
ll Set(ll N,ll pos){return N=N | (1<<pos);}
ll reset(ll N,ll pos){return N= N & ~(1<<pos);}
bool check(ll N,ll pos){return (bool)(N & (1<<pos));}
 
int main()
{
    IOS
    cin>>n>>m;
    lmt=(1<<n);     
    for(ll i=0;i<N;i++)
    {
        dp[i]=inf;     
    }
    for(ll i=0;i<m;i++)
    {
        ll t,cst;
        cin>>cst>>t;
        ll val=0;
        while(t--)
        {
            ll x;
            cin>>x;
            val=Set(val,x-1);
        }
        p.pb(val);          
        b.pb(cst);
        dp[val]=min(dp[val],cst);
    }
    for(ll i=0;i<m;i++)
    {
        for(ll j=0;j<lmt;j++)
        {        
            dp[j|p[i]]=min(dp[j|p[i]],b[i]+dp[j]);
        }
    }           
    if(dp[lmt-1]!=inf)
    cout<<dp[lmt-1]<<endl;
    else
    cout<<-1<<endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:61:20: error: expected '}' at end of input
   61 |     cout<<-1<<endl;
      |                    ^
a.cc:28:1: note: to match this '{'
   28 | {
      | ^
Language: C++

//author:emre yazicioglu

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
#define fori(a,b,c) for(ll a = b;a < ll(c); a++)
#define ford(a,b,c) for(ll a = b;a >= ll(c); a--)

const int INF = 1e9 + 7;
const int N = 2e6 + 7;
ll n, m, k, a[N], b[N], d, q, t;
ll sum, cur, cnt;
int p[1 << 12];
map <ll, ll> mp;
vector <ll> v;
string str;

int f(int cur, int mask, int cost) {
  if(mask == d)
    return cost;
  if(cur == m + 1)
    return INF;
  int need = 0, ans = INF;
  for(int i = 0; i < n; i++)
    if((mask >> i) & 1 == 0)
      need += (1 << i);
  for(int i = 0; i <= need; i++)
    if(p[mask | i] != -1)
      ans = min(ans, p[mask | i]);
  int x, y;
  x = f(cur + 1, mask | b[cur], cost + a[cur]);
  y = f(cur + 1, mask, cost);
  return p[mask] = min({ans, x, y});
}

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

  // freopen("in.txt","r",stdin);
  // freopen("out.txt","w",stdout);
  
  memset(p, -1, sizeof p);
  cin >> n >> m;
  d = (1 << n) - 1;
  for(int i = 1; i <= m; i++) {
    cin >> a[i] >> t;
    for(int j = 1; j <= t; j++){
      cin >> k;
      b[i] |= 1 << (k - 1);
    }
  }
  ans = f(1, 0, 0);
  cout << (ans != INF ? ans : -1);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:55:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
   55 |   ans = f(1, 0, 0);
      |   ^~~
      |   abs
Language: C++

// In the name of God

#include <bits/stdc++.h>

using namespace std;

const int N = 15;

int cost[M], mask[M];
long long dis[1<<N];

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	int n, m;
	cin >> n >> m;
	for(int i=0;i<m;i++) {
		int k;
		cin >> cost[i] >> k;
		for(int j=0;j<k;j++) {
			int x;
			cin >> x;
			mask[i] |= 1<<(x-1);
		}
	}
	for(int i=0;i<(1<<N);i++) {
		dis[i] = 1e10;
	}
	queue<int> q;
	q.push(0);
	dis[0] = 0;
	while(!q.empty()) {
		int now = q.front();
		q.pop();
		for(int i=0;i<m;i++) {
			int go = mask[i] | now;
			if(dis[go] > cost[i] + dis[now]) {
				dis[go] = cost[i] + dis[now];
				q.push(go);
			}
		}
	}
	if(dis[(1<<n)-1]==1e10) cout << -1;
	else cout << dis[(1<<n)-1];
	return 0;
}


Compiler output:
a.cc:9:10: error: 'M' was not declared in this scope
    9 | int cost[M], mask[M];
      |          ^
a.cc:9:19: error: 'M' was not declared in this scope
    9 | int cost[M], mask[M];
      |                   ^
a.cc: In function 'int main()':
a.cc:19:24: error: 'cost' was not declared in this scope; did you mean 'cosl'?
   19 |                 cin >> cost[i] >> k;
      |                        ^~~~
      |                        cosl
a.cc:23:25: error: 'mask' was not declared in this scope; did you mean 'std::filesystem::perms::mask'?
   23 |                         mask[i] |= 1<<(x-1);
      |                         ^~~~
      |                         std::filesystem::perms::mask
In file included from /usr/include/c++/14/filesystem:51,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200,
                 from a.cc:3:
/usr/include/c++/14/bits/fs_fwd.h:162:7: note: 'std::filesystem::perms::mask' declared here
  162 |       mask              = 07777,
      |       ^~~~
a.cc:36:34: error: 'mask' was not declared in this scope; did you mean 'std::filesystem::perms::mask'?
   36 |                         int go = mask[i] | now;
      |                                  ^~~~
      |                                  std::filesystem::perms::mask
/usr/include/c++/14/bits/fs_fwd.h:162:7: note: 'std::filesystem::perms::mask' declared here
  162 |       mask              = 07777,
      |       ^~~~
a.cc:37:38: error: 'cost' was not declared in this scope; did you mean 'cosl'?
   37 |                         if(dis[go] > cost[i] + dis[now]) {
      |                                      ^~~~
      |                                      cosl
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0;i < n;i++)
#define VSORT(v) sort(v.begin(), v.end())
#define VRSORT(v) sort(v.rbegin(), v.rend())
#define ll long long
using namespace std;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
typedef pair<int, P> PP;
typedef pair<ll, LP> LPP;
//typedef vector<unsigned int>vec;
typedef vector<ll>vec;
typedef vector<vec> mat;
typedef vector<vector<int>> Graph;

const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
const int INF = 1000000000;
const ll LINF = 1000000000000000000;//1e18
const ll  MOD = 1000000007;
const double PI = acos(-1.0);
const double EPS = 1e-10;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline void add(T &a, T b){a = ((a+b) % MOD + MOD) % MOD;};

ll a[1010], b[1010];
ll C[1010][20];

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int N, M;
    cin >> N >> M;

    REP(i,M){
        cin >> a[i] >> b[i];
        REP(j,b[i]){
            cin >> C[i][j];
            C[i][j]--;
        }
    }
    vector<ll> dp((1<<N), LINF);
    dp[0] = 0;
    REP(i,(1<<N)){
        REP(j,M){
            int tmp = i;
            REP(k, b[j]){
                tmp |= (1 << C[j][k]);
            }
            chmin(dp[tmp], dp[i] + a[j]);4
        }
    }
    ll ans = dp[(1<<N)-1];
    if(ans == LINF) cout << -1 << endl;
    else cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:52:43: error: expected ';' before '}' token
   52 |             chmin(dp[tmp], dp[i] + a[j]);4
      |                                           ^
      |                                           ;
   53 |         }
      |         ~
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<bitset>
#include<set>
#include<map>
#include<stack>
#include<queue>
#include<deque>
#include<list>
#include<iomanip>
#include<cmath>
#include<cstring>
#include<functional>
using namespace std;

#define repr(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define rep(i, n) repr(i, 0, n)
#define INF 2e9
#define MOD 1000000007
//#define MOD 998244353
#define LINF (long long)4e18
#define jck 3.141592

using ll = long long;
using Pi = pair<int,int>;
using Pl = pair<ll,ll>;

int dp[1<<12];
int main(){
	int N,M; cin >> N >> M;
	vector<int> a(M);
	vector<int> bc(M);
	rep(i,M){
		cin >> a[i];
		int b; cin >> b;
		rep(j,b){
			int c; cin >> c;
			c--;
			bc[i] |= 1<<c;
		}
	}
	rep(i,1<<12) dp[i] = INF;
	dp[0] = 0;
	rep(i,M){
		rep(j,1<<N){
			dp[j|bc[i]] = min(dp[j|bc[i]],dp[j]+a[i]);
		}
	}
	if(dp[(1<<N)-1] == INF){
		cout << -1 << endl;
		return 0;
	}
	cout << [(1<<N)-1] << endl;
}
   


Compiler output:
a.cc: In function 'int main()':
a.cc:55:18: error: expected identifier before '(' token
   55 |         cout << [(1<<N)-1] << endl;
      |                  ^
a.cc: In lambda function:
a.cc:55:28: error: expected '{' before '<<' token
   55 |         cout << [(1<<N)-1] << endl;
      |                            ^~
Language: C++

#include <iostream>
#include <vector>
#include <set>
#include <string>
#include <utility>
#include <functional>
#include <queue>
#include <cmath>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <iomanip>      // std::setprecision
#include <bitset>
#include <boost/optional.hpp>
#include <boost/range/irange.hpp>
#include <boost/range/algorithm.hpp>
#include <boost/range/numeric.hpp>
#include <boost/bimap/bimap.hpp>
#include <boost/bimap/multiset_of.hpp>
#include <boost/multi_array.hpp>
#include <boost/math/common_factor_ct.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/pending/disjoint_sets.hpp>
#include <boost/icl/interval_map.hpp>
#include <boost/graph/graph_traits.hpp>
#include <boost/graph/strong_components.hpp>
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/dijkstra_shortest_paths.hpp>
#include <boost/graph/kruskal_min_spanning_tree.hpp>
#include <boost/graph/graph_utility.hpp>
#include <boost/numeric/ublas/vector.hpp>

#define REP(i, N) for(int i=0; i<(N); i++)
#define REC(f, ...) const auto f = [&](const auto f, __VA_ARGS__)
using namespace std;
using namespace boost::math;
using namespace boost::numeric;
namespace bst = boost;
template<class T> void fill(T& v) { for (auto& i : v) cin >> i; }

int main() {
  int N, M;

  cin >> N >> M;
  
  map<bitset<12>, long long> dp;
  
  dp[bitset<12>()] = 0;
  REP(i,M) {
    long long a;
    int b;
    
    cin >> a >> b;
    
    bitset<12> bitm;
    
    REP(j, b) {
      int c;
      
      cin >> c;
      
      bitm[c - 1] = true;
    }
    
    map<bitset<12>, long long> newdp;
    for (auto i : dp) {
      auto newbit = i.first | bitm;
      if (!dp.count(newbit) || i.second + a < dp[newbit])
        if (!newdp.count(newbit) || i.second + a < newdp[newbit])
        	newdp[newbit] = i.second + a;
    }
    for (auto i : newdp) {
      dp[i.first] = i.second;
    }
  }

  const bitset<12> full((1 << N) - 1);
  cout << (dp.count(full) ? dp[full] : -1LL) << endl;

  return 0;
}


Compiler output:
a.cc:14:10: fatal error: boost/optional.hpp: No such file or directory
   14 | #include <boost/optional.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <string>
using namespace std;

struct node{
	int cost, state;
}p[1005];

int n, m, f[1 << 14];
int main() {
	cin >> n >> m;
  	memset(f, 0x3f3f3f3f, sizeof(f));
  	for (int i = 1; i <= m; i++){
    	cin >> p[i].cost;
    	int sum = 0, t, x;
      	cin >> t;
      	while (t--) {
        	cin >> x;
          	sum += (1 << x);
        }
    	p[i].state = sum;
      	f[sum] = p[i].cost;
    }
  	for (int i = 0; i < 1 << n; i++)
      	for (int j = 1; j <= m; j++) {
        	f[i | p[i].state] = min(f[i | p[i].state], f[i] + p[j].cost);
        }
  	cout << f[(1 << n) - 1] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'memset' was not declared in this scope
   12 |         memset(f, 0x3f3f3f3f, sizeof(f));
      |         ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | #include <string>
Language: C++

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

void chmin(int &a,int b){
  if(a<0||a>b)a=b;
}

//main
signed main(){
  int N,M;cin>>N>>M;
  int T=pw(2,N);
  std::vector<int> dp(T,-1);
  dp[0]=0;
  while(M--){
    int a,b;cin>>a>>b;
    while(b--){
      int c;cin>>c;c--;
      for(int i=0;i<T;i++)chmin(dp[i|1<<c],dp[i]+a);
    }
  }
  cout<<dp[T-1]<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'pw' was not declared in this scope; did you mean 'pow'?
   11 |   int T=pw(2,N);
      |         ^~
      |         pow
Language: C++

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

void chmin(int &a,int b){
  a=min(a,b);
}

signed main(){
  int N,M;cin>>N>>M;
  int T=1<<N;

  std::vector<int> a(M),key(M,0);

  for(int i=0;i<M;i++){
    int b;cin>>a[i]>>b;
    while(b--){
      int k;cin>>k;k--;
      key[i]|=(1<<k);
    }
  }

  std::vector<int> dp(10000,INF);
  dp[0]=0;

  for(int i=0;i<M;i++)
    for(int j=0;j<T;j++)
      chmin(dp[j|key[i]],dp[j]+a[i]);

  if(dp[T-1]>=INF)dp[T-1]=-1;
  cout<<dp[T-1]<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:29: error: 'INF' was not declared in this scope
   22 |   std::vector<int> dp(10000,INF);
      |                             ^~~
Language: C++

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

void chmin(int &a,int b){
  a=min(a,b);
}

signed main(){
  int N,M;cin>>N>>M;
  int T=1<<N;

  std::vector<int> a(M),key(M,0);

  for(int i=0;i<M;i++){
    int b;cin>>a[i]>>b;
    while(b--){
      int k;cin>>k;k--;
      key[i]|=(1<<k);
    }
  }

  std::vector<int> dp(10000,INF);
  dp[0]=0;

  for(int i=0;i<M;i++)
    for(int j=0;j<T;j++)
      chmin(dp[j|key[i]],dp[j]+a[i]);

  if(dp[T-1]>=INF)fin(-1);
  fin(dp[T-1]);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:29: error: 'INF' was not declared in this scope
   22 |   std::vector<int> dp(10000,INF);
      |                             ^~~
a.cc:29:19: error: 'fin' was not declared in this scope; did you mean 'sin'?
   29 |   if(dp[T-1]>=INF)fin(-1);
      |                   ^~~
      |                   sin
a.cc:30:3: error: 'fin' was not declared in this scope; did you mean 'sin'?
   30 |   fin(dp[T-1]);
      |   ^~~
      |   sin
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <math.h>
using namespace std;

#define int long long
#define itn __int32
#define REP(i, n) for(itn (i) = 0; (i) < (n); (i)++)
#define REP2(i, x, n) for(itn (i) = x; (i) < (n); (i)++)
#define ALL(x) (x).begin(), (x).end()
#define RALL(x) (x).rbegin(), (x).rend()
#define SORT(x) sort(ALL(x))
#define RSORT(x, T) sort(ALL(x), greater<(T)>())
#define REVERCE(x) reverce(ALL(x))

itn main() {
	ios::sync_with_stdio(false);

	int n, m;

	cin >> n >> m;

	vector<int> box(n, 100000000);

	struct key {
		itn plice;
		itn kindValue;
		itn kind;
	};

	vector<key> keys(m);
	int kind_part;

	for (int i = 0; i < keys.size(); i++) {
		cin >> keys[i].plice >> keys[i].kindValue;
		for (int j = 0; j < keys[i].kindValue; j++) {
			cin >> kind_part;
			keys[i].kind |= 1 << (kind_part - 1);
		}
	}

	vector<vector<itn>> dp(m + 1);

	REP(i, dp.size()) {
		dp[i].resize(pow(2, n), pow(2, 30));
	}

	dp[0][0] = 0;

	REP2(i, 1, dp.size()) {
		REP(j, dp[i].size())dp[i][j] = dp[i - 1][j];
		REP(j, dp[i].size()) {
			dp[i][j | keys[i - 1].kind] = min(dp[i - 1][j] + keys[i - 1].plice, dp[i][j | keys[i - 1].kind]);
		}
	}

	if (dp[m][pow(2, n) - 1] == pow(2, 30)) {
		cout << -1;
	}
	else {
		cout << dp[m][pow(2, n) - 1];
	}

	return 0;
}

Compiler output:
a.cc:8:13: error: '__int32' does not name a type; did you mean '__int32_t'?
    8 | #define itn __int32
      |             ^~~~~~~
a.cc:17:1: note: in expansion of macro 'itn'
   17 | itn main() {
      | ^~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <math.h>
using namespace std;

#define int long long
#define itn __int32
#define REP(i, n) for(itn (i) = 0; (i) < (n); (i)++)
#define REP2(i, x, n) for(itn (i) = x; (i) < (n); (i)++)
#define ALL(x) (x).begin(), (x).end()
#define RALL(x) (x).rbegin(), (x).rend()
#define SORT(x) sort(ALL(x))
#define RSORT(x, T) sort(ALL(x), greater<(T)>())
#define REVERCE(x) reverce(ALL(x))

itn main() {
    ios::sync_with_stdio(false);

    int n, m;

    cin >> n >> m;

    vector<int> box(m, 100000000);

    struct key {
        itn plice;
        itn kindValue;
        itn kind;
    };

    vector<key> keys(m);
    int kind_part;

    for (int i = 0; i < n; i++) {
        cin >> keys[i].plice >> keys[i].kindValue;
        for (int j = 0; j < keys[i].kindValue; j++) {
            cin >> kind_part;
            keys[i].kind = 1 << (kind_part - 1);
        }
    }

    vector<vector<itn>> dp(m + 1);

    REP(i, dp.size()) {
        dp[i].resize(pow(2, n), pow(2, 30));
    }
  
    dp[0][0] = 0;

    REP2(i, 1, dp.size()) {
        REP(j, dp[i].size()) {
            dp[i][j | keys[i - 1].kind] = min(dp[i - 1][j] + keys[i - 1].plice, dp[i - 1][j | keys[i - 1].kind]);
        }
    }

    if (dp[m][pow(2, n) - 1] == pow(2, 30)) {
        cout << -1;
    }
    else {
        cout << dp[m][pow(2, n) - 1];
    }

    return 0;
}

Compiler output:
a.cc:8:13: error: '__int32' does not name a type; did you mean '__int32_t'?
    8 | #define itn __int32
      |             ^~~~~~~
a.cc:17:1: note: in expansion of macro 'itn'
   17 | itn main() {
      | ^~~
Language: Java

import java.util.*;class Main{public static void main(String[] $){Scanner s=new Scanner(System.in);int INF=(int)1e9;int N=s.nextInt();int M=s.nextInt();int[] a=new int[M];int[] b=new int[M];int[][] c=new int[M][];for(int i=0;i<M;i++){a[i]=s.nextInt();b[i]=s.nextInt();c[i]=new int[b[i]];for(int j=0;j<b[i];j++){c[i][j]=s.nextInt()-1;}}int[] dp=new int[1<<N];Arrays.fill(dp,INF);dp[0]=0;for(int i=0;i<M;i++){int t=0;for(int j=0;j<b[i];j++){t|=1<<c[i][j];}for(int k=0;k<1<<N;k++){dp[k|s]=Math.min(dp[k|s],dp[k]+a[i]);}}System.out.println(dp[(1<<N)-1]==INF ? -1 : dp[(1<<N)-1]);}}

Compiler output:
Main.java:1: error: bad operand types for binary operator '|'
import java.util.*;class Main{public static void main(String[] $){Scanner s=new Scanner(System.in);int INF=(int)1e9;int N=s.nextInt();int M=s.nextInt();int[] a=new int[M];int[] b=new int[M];int[][] c=new int[M][];for(int i=0;i<M;i++){a[i]=s.nextInt();b[i]=s.nextInt();c[i]=new int[b[i]];for(int j=0;j<b[i];j++){c[i][j]=s.nextInt()-1;}}int[] dp=new int[1<<N];Arrays.fill(dp,INF);dp[0]=0;for(int i=0;i<M;i++){int t=0;for(int j=0;j<b[i];j++){t|=1<<c[i][j];}for(int k=0;k<1<<N;k++){dp[k|s]=Math.min(dp[k|s],dp[k]+a[i]);}}System.out.println(dp[(1<<N)-1]==INF ? -1 : dp[(1<<N)-1]);}}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ^
  first type:  int
  second type: Scanner
Main.java:1: error: bad operand types for binary operator '|'
import java.util.*;class Main{public static void main(String[] $){Scanner s=new Scanner(System.in);int INF=(int)1e9;int N=s.nextInt();int M=s.nextInt();int[] a=new int[M];int[] b=new int[M];int[][] c=new int[M][];for(int i=0;i<M;i++){a[i]=s.nextInt();b[i]=s.nextInt();c[i]=new int[b[i]];for(int j=0;j<b[i];j++){c[i][j]=s.nextInt()-1;}}int[] dp=new int[1<<N];Arrays.fill(dp,INF);dp[0]=0;for(int i=0;i<M;i++){int t=0;for(int j=0;j<b[i];j++){t|=1<<c[i][j];}for(int k=0;k<1<<N;k++){dp[k|s]=Math.min(dp[k|s],dp[k]+a[i]);}}System.out.println(dp[(1<<N)-1]==INF ? -1 : dp[(1<<N)-1]);}}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ^
  first type:  int
  second type: Scanner
2 errors
Language: Java

import java.util.*;class Main{public static void main(String[] $){Scanner s=new Scanner(System.in);int INF=(int)1e9;int N=s.nextInt();int M=s.nextInt();
        int[] a = new int[M];
        int[] b = new int[M];
        int[][] c = new int[M][];
        for (int i = 0; i < M; i++) {
            a[i] = sc.nextInt();
            b[i] = sc.nextInt();
            c[i] = new int[b[i]];
            for (int j = 0; j < b[i]; j++) {
                c[i][j] = sc.nextInt() - 1;
            }
        }
        int[] dp = new int[1 << N];
        Arrays.fill(dp, INF);
        dp[0] = 0;
        for (int i = 0; i < M; i++) {
            int s = 0;
            for (int j = 0; j < b[i]; j++) {
                s |= 1 << c[i][j];
            }
            for (int k = 0; k < 1 << N; k++) {
                dp[k | s] = Math.min(dp[k | s], dp[k] + a[i]);
            }
        }
        System.out.println(dp[(1 << N) - 1] == INF ? -1 : dp[(1 << N) - 1]);
    }
}

Compiler output:
Main.java:6: error: cannot find symbol
            a[i] = sc.nextInt();
                   ^
  symbol:   variable sc
  location: class Main
Main.java:7: error: cannot find symbol
            b[i] = sc.nextInt();
                   ^
  symbol:   variable sc
  location: class Main
Main.java:10: error: cannot find symbol
                c[i][j] = sc.nextInt() - 1;
                          ^
  symbol:   variable sc
  location: class Main
Main.java:17: error: variable s is already defined in method main(String[])
            int s = 0;
                ^
4 errors
Language: C++

#include<stdio.h>
#define MAX 1073741824
int min(const int a, const int b){return a>b?b:a;}
int n, l, i, j, k;
int m;
int a[1000], b, c;
int key[1000];
int d[4096];
int main(void){
	scanf("%d%d", &n, &m);
	for(i=0; i<m; i++){
		scanf("%d%d", a+i, &b);
		for(j=0; j<b; j++){
			scanf("%d", &c);
			key[i] |= 1<<(c-1);
		}
	}
	l = 1<<n;
	for(j=1; j<l; j++){
		if(((~key[0])&j)!=0){
			d[j]=MAX;
		}else{
			d[j]=a[0];
		}
	}
	for(i=1; i<m; i++){
		for(j=1; j<l; j++){
			k=j&(~key[i]);
			if(k!=j){
				d[j][i] = min(d[j], d[k]+a[i]);
			}
		}
	}
	if(d[l-1]==MAX){
		printf("%d\n", -1);
	}else{
		printf("%d\n", d[l-1]);
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:37: error: invalid types 'int[int]' for array subscript
   30 |                                 d[j][i] = min(d[j], d[k]+a[i]);
      |                                     ^
Language: C++

#include <bits/stdc++.h>

using namespace std;
using llong = long long;
using ldbl = long double;
using lpair = pair<llong, llong>;

#define ALL(x) x.begin(), x.end()

const llong inf = 1'000'000'000'000'007ll;
const llong mod = 1e9+7;

llong N, M;
vector<llong> money;
vector<<llong> key;

vector<vector<llong>> dp;

llong solve(llong now, llong opened) {
	if (opened == (1<<N) - 1) return 0;
	if (now == M) return inf;
	if (dp[now][opened] != inf) return dp[now][opened];

	llong ret = min(solve(now+1, opened), solve(now+1, key[now]|opened) + money[now]);

	return dp[now][opened] = ret;
}

int main() {

	cin >> N >> M;
	money.resize(M);
	key.resize(M, 0);
	for (int i = 0; i < M; ++i) {
		llong b, in;
		cin >> money[i] >> b;
		for (int j = 0; j < b; ++j) {
			cin >> in;
			key[in] += 1<<(in-1);
		}
	}

	dp.resize(M, vector<llong>(1<<N, inf));
	llong ans = solve(0, 0);
	if (ans == inf) ans = -1;
	cout << ans << endl;

	return 0;
}


Compiler output:
a.cc:15:7: error: expected unqualified-id before '<<' token
   15 | vector<<llong> key;
      |       ^~
a.cc: In function 'llong solve(llong, llong)':
a.cc:24:60: error: 'key' was not declared in this scope
   24 |         llong ret = min(solve(now+1, opened), solve(now+1, key[now]|opened) + money[now]);
      |                                                            ^~~
a.cc: In function 'int main()':
a.cc:33:9: error: 'key' was not declared in this scope; did you mean 'key_t'?
   33 |         key.resize(M, 0);
      |         ^~~
      |         key_t
Language: C++

    #include <bits/stdc++.h>
    #define ll  int64
    #define pb push_back
    #define mp make_pair
    #define ff first
    #define ss second
    #define vi vector<int>
    #define br cout <<"\n";
    #define all(x)  (x).begin(),(x).end()
    #define tr(c,i) for(auto i : c)
    #define pii pair< int,int >
    #define fast_io() ios_base::sync_with_stdio(false);cin.tie(nullptr)
    #define pq priority_queue< pair<ll,pii> ,vector<pair<ll,pii>>,greater <pair<ll,pii>> >p;//container adapter makes ascending q
    #define er(x) cout << x << " "
    #define err(x,y) cout << x << " "<<y
    const int M = 200005;
    using namespace std;
    clock_t time_p=clock();
    void dem()
    {
        time_p=clock()-time_p;
        cerr<<"Time Taken : "<<(float)(time_p)/CLOCKS_PER_SEC<<"\n";
    }
    using namespace std ;
    const int N =  100 ;
    const int dx[] = { 1, -1 , 0 , 0  };
    const int dy [] = { 0 ,0 , 1 , -1  };
    const int MOD = 1000 * 1000 * 1000 + 9 ;
ll gcd (  ll a , ll b ) // a > b
{
return     b ==  0   ?  a  : gcd ( b , a % b   ) ;
}
int main (){
   ll  a , b ;
   cin >> a >> b ;
    ll   g = gcd ( a, b ) ;
  int res = 1 ; 
if ( g % 2 == 0 ) res++ ; 
  while ( g % 2 == 0 ){
    g /=2 ; 
}
for (  ll i = 3 ; i * i <= g ; i += 2 ){
	if ( g % i == 0 ){ 
    while (  g % i == 0 )
        g /=i ;
      res ++ ;
    }

}

if ( g > 1 )res ++ ; 
cout <<  res ;

    return 0 ;
    }


Compiler output:
a.cc:2:17: error: 'int64' does not name a type; did you mean 'int64_t'?
    2 |     #define ll  int64
      |                 ^~~~~
a.cc:29:1: note: in expansion of macro 'll'
   29 | ll gcd (  ll a , ll b ) // a > b
      | ^~
a.cc: In function 'int main()':
a.cc:2:17: error: 'int64' was not declared in this scope
    2 |     #define ll  int64
      |                 ^~~~~
a.cc:34:4: note: in expansion of macro 'll'
   34 |    ll  a , b ;
      |    ^~
a.cc:35:11: error: 'a' was not declared in this scope
   35 |    cin >> a >> b ;
      |           ^
a.cc:35:16: error: 'b' was not declared in this scope
   35 |    cin >> a >> b ;
      |                ^
a.cc:36:10: error: expected ';' before 'g'
   36 |     ll   g = gcd ( a, b ) ;
      |          ^
a.cc:38:6: error: 'g' was not declared in this scope
   38 | if ( g % 2 == 0 ) res++ ;
      |      ^
a.cc:39:11: error: 'g' was not declared in this scope
   39 |   while ( g % 2 == 0 ){
      |           ^
a.cc:42:11: error: expected ';' before 'i'
   42 | for (  ll i = 3 ; i * i <= g ; i += 2 ){
      |           ^
a.cc:42:19: error: 'i' was not declared in this scope
   42 | for (  ll i = 3 ; i * i <= g ; i += 2 ){
      |                   ^
a.cc:42:28: error: 'g' was not declared in this scope
   42 | for (  ll i = 3 ; i * i <= g ; i += 2 ){
      |                            ^
a.cc:51:6: error: 'g' was not declared in this scope
   51 | if ( g > 1 )res ++ ;
      |      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
const int MOD=1e9+7;
//const int MOD=998244353;
const int INF=1e9;
const long long LINF=1e18;
#define int long long
//template
void chmin(int &a,int b){
  a=min(a,b);
}
template <typename T>
void fin(T a){
  cout<<a<<endl;
  exit(0);
}
int pw(int n,int k){
  if(k<0)return pw(n,k+MOD-1);
  int res=1;
  while(k){
    if(k&1)res*=n;///res%=MOD;
    n*=n;//n%=MOD;
    k>>=1;
  }
  return res;
}
//main
signed main(){
  int N,M;cin>>N>>M;
  int T=pw(2,N);

  std::vector<int> a(M),key(M,0);

  for(int i=0;i<M;i++){
    int b;cin>>a[i]>>b;
    while(b--){
      int k;cin>>k;k--;
      key[i]|=(1<<k);
    }
  }

  std::vector<int> open(10000,INF);
  open[0]=0;

  for(int i=0;i<M;i++){
    for(int j=0;j<T;j++){
      chmin(open[j|key[i]],open[j]+a[i]);

  if(open[T-1]>=INF)fin(-1);
  fin(open[T-1]);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:51:2: error: expected '}' at end of input
   51 | }
      |  ^
a.cc:45:23: note: to match this '{'
   45 |   for(int i=0;i<M;i++){
      |                       ^
a.cc:51:2: error: expected '}' at end of input
   51 | }
      |  ^
a.cc:28:14: note: to match this '{'
   28 | signed main(){
      |              ^
Language: C++

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

int main()
{
  int N,M;
  a[12][1010]={0}{0};
  cin>>N>>M;
  int price;
  int p;
  int q;
  for(int i=0;i<M;i++){
    cin>>price;
    cin>>p;
    for(int j=0;j<p;j++){
      cin>>q;
      A[q][i]=price;
    }
  }
  int b[12]={0};
  for(int i=0;i<N;i++) b[i]=1000000;
  for(int i=0;i<N;i++){
    for(int j=0;j<M;j++){
      if(b[i]>a[i][j]) b[i]=a[i][j];
    }
  }
  int ans=0;
  for(int i=0;i<N;i++){
    int ans+=b[i];
    for(int j=0;j<i;j++){
      if(b[i]==b[j]){
        ans-=b[i];
        break;
      }
    }
  }
  cout<<ans<<endl;
}
      

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'a' was not declared in this scope
    7 |   a[12][1010]={0}{0};
      |   ^
a.cc:17:7: error: 'A' was not declared in this scope
   17 |       A[q][i]=price;
      |       ^
a.cc:29:12: error: expected initializer before '+=' token
   29 |     int ans+=b[i];
      |            ^~
Language: C++

#include<vector>
#include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;

struct KEY {
	int a, b, c;
	bool operator<(const KEY &another) const {
//		if (c != another.c){
			int ands = 1;
			for (int i = 0; i < 12; i++) {
				if ((c&ands) != (another.c&ands)) {
					return (c&ands) > (another.c&ands);
				}
				ands *= 2;
			}
//		}
//		else {
			return a < another.a;
//		}
	};
};

void printdatas(KEY datas) {
	cout << datas.a << " " << datas.b << endl;
//	for (int i = 0; i < datas.b; i++) {
//		cout << datas.c[i] << " ";
		cout << datas.c << " ";
//	}
	cout << endl;
	return;
}

int n, m;
int goal;
int ans = INT_MAX;
vector<KEY> datas(1001);


void calc(int box, int cost, int now){
	int i, j;
	if(box==goal){
		ans = min(cost, ans);
		return;
	}


	for (i = now+1; i < m; i++) {
		if ((datas[i].c & box) != datas[i].c) {
//			cout << i << endl;
			calc((box | datas[i].c), (cost + datas[i].a) , i);
		}
	}
}



int main()
{
	int i, j, k, tmp;

	cin >> n >> m;
	goal = (long)pow(2, n) - 1;
	for (i = 0; i < m; i++) {
		cin >> datas[i].a >> datas[i].b;
		for (j = 0; j < datas[i].b; j++) {
			cin >> tmp;
			datas[i].c = (datas[i].c | ((long)pow(2, tmp - 1)));
		}
	}

	sort(datas.begin(), datas.begin() + m );
	calc(0, 0, -1);

//	cout << goal << endl;
	/*
	cout << endl;
	for (i = 0; i < m; i++) {
		printdatas(datas[i]);
	}
	*/

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


Compiler output:
a.cc:37:11: error: 'INT_MAX' was not declared in this scope
   37 | int ans = INT_MAX;
      |           ^~~~~~~
a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    4 | #include<cmath>
  +++ |+#include <climits>
    5 | using namespace std;
Language: C++

#include <bits/stdc++.h>

using namespace std;

using lint = long long;

#define INF 1000000

int main(void)
{
    lint N, M;
    cin >> N >> M;

    vector<lint> a(M);
    vector<lint> b(M);
    //vector<vector<bool>> c(M, vector<bool>(N, false));
    c[1000][4100] = {false};
    for(int i = 0; i < M; i++){
        cin >> a[i] >> b[i];
        for(int j = 0; j < b[i]; j++){
            int temp;
            cin >> temp;
            c[i][temp-1] = true;
        }
    }

    lint dp[1010][4100] = {INF};
    lint NX = 1;
    for(int j = 0; j < N; j++){
        NX *= 2;
    }
    for(int i = 0; i < 5000; i++){
        dp[0][i] = 0;
    }
    for(int i = 0; i < M; i++){
        for(int k = 0; k <= NX; k++){
            lint xx = 0;
            for(int j = 0; j < N; j++){
                if(j != 0) xx << 1;
                if(c[i][j]) xx += 1;
            }
            lint subx = ~(xx & k) & k;
            dp[i+1][k] = min(dp[i+1][k], dp[i][subx] + a[i]);
            dp[i+1][k] = min(dp[i+1][k], dp[i][k]);
        }
    }
    if(dp[M][NX] != INF){
        cout << dp[M][NX] << endl;
    }else{
        cout << -1 << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:5: error: 'c' was not declared in this scope
   17 |     c[1000][4100] = {false};
      |     ^