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

#include<iostream>
#include<string>
#include <vector>
#include <algorithm>
#include <queue>

using namespace std;
using lli = long long int;

vector<lli> input(int N) { vector<lli> r(N); for (int i = 0; i < N; i++)cin >> r[i]; return r; }

int main() {
	int N, M;
	cin >> N >> M;
	int dp_max = pow(2, N);
	vector<int> dp(dp_max + 10);
	for (int i = 0; i < dp_max; i++)dp[i] = INT32_MAX;
	dp[0] = 0;
	for (int i = 0; i < M; i++) {
		int a, b;
		cin >> a >> b;
		int num = 0;
		for (int j = 0; j < b; j++) {
			int c;
			cin >> c;
			num += pow(2, c - 1);
		}
		//orとっていい感じにやる
		for (int x = dp_max - 1; x >= 0; x--) {
			if (dp[x] == INT32_MAX)continue;
			dp[x | num] = min(dp[x] + a, dp[x | num]);
		}
	}

	//for (int i = 0; i < dp_max; i++)cout << i << " : " << dp[i] << endl;
	if (dp[dp_max - 1] == INT32_MAX)cout << -1 << endl;
	else cout << dp[dp_max - 1] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:22: error: 'pow' was not declared in this scope
   15 |         int dp_max = pow(2, N);
      |                      ^~~
a.cc:17:49: error: 'INT32_MAX' was not declared in this scope
   17 |         for (int i = 0; i < dp_max; i++)dp[i] = INT32_MAX;
      |                                                 ^~~~~~~~~
a.cc:6:1: note: 'INT32_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    5 | #include <queue>
  +++ |+#include <cstdint>
    6 | 
a.cc:30:38: error: 'INT32_MAX' was not declared in this scope
   30 |                         if (dp[x] == INT32_MAX)continue;
      |                                      ^~~~~~~~~
a.cc:30:38: note: 'INT32_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
a.cc:36:31: error: 'INT32_MAX' was not declared in this scope
   36 |         if (dp[dp_max - 1] == INT32_MAX)cout << -1 << endl;
      |                               ^~~~~~~~~
a.cc:36:31: note: 'INT32_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
Language: C++

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

// types
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pdd;
typedef vector<ll> vll;

// macros
#define ALL(a) a.begin(),a.end()
#define SZ(a) ((int)a.size())
#define FI first
#define SE second
#define REP(i,n) for(int i=0;i<((int)n);i++)
#define REP1(i,n) for(int i=1;i<((int)n);i++)
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define PB push_back
#define EB emplace_back
#define MP(a,b) make_pair(a,b)
#define SORT_UNIQUE(c) (sort(c.begin(),c.end()), c.resize(distance(c.begin(),unique(c.begin(),c.end()))))
#define GET_POS(c,x) (lower_bound(c.begin(),c.end(),x)-c.begin())
#define Decimal fixed<<setprecision(20)
#define INF 1000000000
#define LLINF 1000000000000000000LL

// constants
const int inf = 1e9;
const ll linf = 1LL << 50;
const double eps = 1e-10;
const int MOD = 1e9 + 7;
const int dx[4] = {-1, 0, 1, 0};
const int dy[4] = {0, -1, 0, 1};

template<class T>
inline bool chmax(T &a, T b){
  if(a < b){
    a = b;
    return true;
  }
  return false;
}

template<class T>
inline chmin(T &a, T b){
  if(a < b){
    a = b;
    return true;
  }
  return false;
}

int N, M;
int a[1050], b[1050], c[1050][20];

void input(){
  cin >> N >> M;
  REP(i, M){
    cin >> a[i] >> b[i];
    REP(j, b[i])
      cin >> c[i][j];
  }
}

void solve(){
  input();
  vll dp(5000, INF);
  dp[0] = 0;
  REP(item, m){
    ll now = 0;
    REP(j, b[item])
      now |= (1 << c[item][j]-1);

    REP(bit, (1<<N))
      chmin(dp[bits|now], dp[bits]+a[item]);
  }

  if(dp[(1<<N)-1] == INF)
    dp[(1<<N)-1] = -1;
  cout << dp[(1<<N)-1] << endl;
  return;

}

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

  solve();
  return 0;
}


Compiler output:
a.cc:47:8: error: ISO C++ forbids declaration of 'chmin' with no type [-fpermissive]
   47 | inline chmin(T &a, T b){
      |        ^~~~~
a.cc: In function 'void solve()':
a.cc:71:13: error: 'm' was not declared in this scope
   71 |   REP(item, m){
      |             ^
a.cc:17:38: note: in definition of macro 'REP'
   17 | #define REP(i,n) for(int i=0;i<((int)n);i++)
      |                                      ^
a.cc:77:16: error: 'bits' was not declared in this scope; did you mean 'bit'?
   77 |       chmin(dp[bits|now], dp[bits]+a[item]);
      |                ^~~~
      |                bit
Language: C++

#include<iostream>
using namespace std;

int N,M;
int a[1050],b[1050],c[1050][20];

void input()
{
    cin>>N>>M;
    for(int i=1;i<=M;i++)
    {
             cin>>a[i]>>b[i];
             for(int j=1;j<=b[i];j++)
               cin>>c[i][j];
    }
}

void solve()
{
     input();
  	 const int inf=1e9;   
  	 vector<int> dp(5000,inf);
  dp[0]=0;
  	 for(int item=1;item<=M;item++)
     {
          int mask=0;
         for(int i=1;i<=b[item];i++)
            mask|=c[item][i]-1;    
       
         for(int bits=0;bits<(1<<N);bits++)
            dp[bits|mask]=min(dp[bits|mask],dp[bits]+a[item]);
     }
   if(dp[(1<<N)-1]==inf) dp[(1<<N)-1]=-1;
 
 cout<<dp[(1<<N)-1]<<endl;    
}



int main()
{
  solve();
 return 0; 
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:22:10: error: 'vector' was not declared in this scope
   22 |          vector<int> dp(5000,inf);
      |          ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:22:17: error: expected primary-expression before 'int'
   22 |          vector<int> dp(5000,inf);
      |                 ^~~
a.cc:23:3: error: 'dp' was not declared in this scope
   23 |   dp[0]=0;
      |   ^~
Language: C++

#include<iostream>
usign namespace std;

int N,M;
int a[1050],b[1050],c[1050][20];

void input()
{
    cin>>N>>M;
    for(int i=1;i<=M;i++)
    {
             cin>>a[i]>>b[i];
             for(int j=1;j<=b[i];j++)
               cin>>c[i][j];
    }
}

void solve()
{
     input();
  	 const int inf=1e9;   
  	 vector<int> dp(5000,inf);
  dp[0]=0;
  	 for(int item=1;item<=M;item++)
     {
          int mask=0;
         for(int i=1;i<=b[item];i++)
            mask|=c[item][i]-1;    
       
         for(int bits=0;bits<(1<<N);bits++)
            dp[bits|mask]=min(dp[bits|mask],dp[bits]+a[item]);
     }
   if(dp[(1<<N)-1]==inf) dp[(1<<N)-1]=-1;
 
 cout<<dp[(1<<N)-1]<<endl;    
}



int main()
{
  solve();
 return 0; 
}

Compiler output:
a.cc:2:1: error: 'usign' does not name a type
    2 | usign namespace std;
      | ^~~~~
a.cc: In function 'void input()':
a.cc:9:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 |     cin>>N>>M;
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc: In function 'void solve()':
a.cc:22:10: error: 'vector' was not declared in this scope
   22 |          vector<int> dp(5000,inf);
      |          ^~~~~~
a.cc:22:17: error: expected primary-expression before 'int'
   22 |          vector<int> dp(5000,inf);
      |                 ^~~
a.cc:23:3: error: 'dp' was not declared in this scope
   23 |   dp[0]=0;
      |   ^~
a.cc:31:27: error: 'min' was not declared in this scope; did you mean 'std::min'?
   31 |             dp[bits|mask]=min(dp[bits|mask],dp[bits]+a[item]);
      |                           ^~~
      |                           std::min
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:
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: 'std::min' declared here
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
a.cc:35:2: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   35 |  cout<<dp[(1<<N)-1]<<endl;
      |  ^~~~
      |  std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:35:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   35 |  cout<<dp[(1<<N)-1]<<endl;
      |                      ^~~~
      |                      std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <unordered_map>
#include <unordered_set>
#define mk make_pair
#define pb push_back
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef pair<ll, ll> pos;
const ll N = 200010, MOD = 1000000007;

ll n, m, dp[1 << 12];
pos key[1001];

ll mn(ll v1, ll v2) {
	if (v1 == -1)return v2;
	if (v2 == -1)return v1;
	return min(v1, v2);
}

int main() {
	memset(dp, -1, sizeof(dp));
	dp[0] = 0;
	cin >> n >> m;
	for (int i = 0; i < m; i++) {
		ll v,v2=0;
		cin >> key[i].first >> v;
		for (; v > 0; v--) {
			ll v1; cin >> v1;
			v2 |= ((ll)1 << (v1 - 1));
		}
		key[i].second = v2;
	}
	for (int s = 0; s < (1 << n); s++) {
		if (dp[s] == -1)continue;
		for (int i = 0; i < n; i++) {
			dp[s | key[i].second] = mn(dp[s | key[i].second], dp[s] + key[i].first);
		}
	}
	cout << dp[(1 << n) - 1] << endl;
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:36:9: error: 'memset' was not declared in this scope
   36 |         memset(dp, -1, sizeof(dp));
      |         ^~~~~~
a.cc:18:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   17 | #include <unordered_set>
  +++ |+#include <cstring>
   18 | #define mk make_pair
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
typedef long long ll;

int main(){
  int 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 |= 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[m].first;
      int cost = dp[s] + key[m].second;
      dp[t] = min(dp[t],cost);
    }
  }
  int ans = dp.back();
  if(ans==INF) ans = -1;
  cout << ans << endl;
}


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

#include <bits/stdc++.h>
#include <vector>
#include <iostream>
#include <utility>
#define chmin(x, y) x = min(x , y);
#define chmax(x, y) x = max(x, y);
#define rep(i, j) for (int (i)=0;(i)<(j);(i)++)
#define dump(x)  cout << #x << " = " << (x) << endl;
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
using namespace std;
typedef long long int ll;
const int INF = 1e8;

int N, M;
vector<pair<int, int>> key;

void input() {
    cin >> N >> M;
    
    rep(i, M){
        int a, b;
        cin >> a >> b;
        int s = 0;
        //bitで集合をとる
        rep(j, b){
            int c;cin >> c;
            c--;
            s |= 1 << c;
        }
        key.emplace_back(s, a);
    }
}

void solve() {
    input();
    /vector<int> dp(1<<N, INF);
    dp[0] = 0;
    rep(i, 1<<N){
        rep(j, M){
            int t = i | key[j].first;
            int cost = dp[i] + key[j].second;
            dp[t] = min(dp[t], cost);
        }
    }
    int ans = dp.back();
    if(ans == INF) ans = -1;
    cout << ans << endl;
    return;
}

int main () {
    solve();
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:36:5: error: expected primary-expression before '/' token
   36 |     /vector<int> dp(1<<N, INF);
      |     ^
a.cc:36:18: error: expected primary-expression before 'dp'
   36 |     /vector<int> dp(1<<N, INF);
      |                  ^~
a.cc:37:5: error: 'dp' was not declared in this scope; did you mean 'dup'?
   37 |     dp[0] = 0;
      |     ^~
      |     dup
Language: C++

#include <bits/stdc++.h>
#include <vector>
#include <iostream>
#include <utility>
#define chmin(x, y) x = min(x , y);
#define chmax(x, y) x = max(x, y);
#define rep(i, j) for (int (i)=0;(i)<(j);(i)++)
#define dump(x)  cout << #x << " = " << (x) << endl;
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
using namespace std;
typedef long long int ll;
const int INF = 1e8;

int N, M;
vector<pair<int, int>> key;

void input() {
    cin >> N >> M;
    
    rep(i, M){
        int a, b;
        cin >> a >> b;
        int s = 0;
        //bitで集合をとるtoru
        rep(j, b){
            int c;cin >> c;
            c--;
            s |= 1 << c;
        }
        key.emplace_back(s, a);
    }
}

void solve() {
    input();
    vector<int> dp(1<<N, INF);
    dp[0] = 0;
    rep(i, 1<<N){
        rep(j, m){
            int t = i | key[i].first;
            int cost = dp[i] + key[i].second;
            dp[t] = min(dp[t], cost);
        }
    }
    int ans = dp.back();
    if(ans == INF) ans = -1;
    cout << ans << endl;
    return;
}

int main () {
    solve();
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:39:16: error: 'm' was not declared in this scope
   39 |         rep(j, m){
      |                ^
a.cc:7:39: note: in definition of macro 'rep'
    7 | #define rep(i, j) for (int (i)=0;(i)<(j);(i)++)
      |                                       ^
Language: C++

#include <bits/stdc++.h>
#include <vector>
#include <iostream>
#include <utility>
#define chmin(x, y) x = min(x , y);
#define chmax(x, y) x = max(x, y);
#define rep(i, j) for (int (i)=0;(i)<(j);(i)++)
#define dump(x)  cout << #x << " = " << (x) << endl;
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
using namespace std;
typedef long long int ll;
const int INF = 1e8;

int N, M;
vector<pair<int, int>> key;

void input() {
    cin >> N >> M;
    
    rep(i, M){
        int a, b;
        cin >> a >> b;
        int s = 0;
        //bitで集合をとるtoru
        rep(j, b){
            int c;cin >> c;
            c--;
            s |= 1 << c;
        }
        key.emplace_back(s, a);
    }
}

void solve() {
    input();
    vector<int> dp(1<<N, INF);
    dp[0] = 0;
    rep(i, 1<<N){
        rep(j, m){
            int t = s | key.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;
}

int main () {
    solve();
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:39:16: error: 'm' was not declared in this scope
   39 |         rep(j, m){
      |                ^
a.cc:7:39: note: in definition of macro 'rep'
    7 | #define rep(i, j) for (int (i)=0;(i)<(j);(i)++)
      |                                       ^
a.cc:40:21: error: 's' was not declared in this scope
   40 |             int t = s | key.first;
      |                     ^
a.cc:40:29: error: 'class std::vector<std::pair<int, int> >' has no member named 'first'
   40 |             int t = s | key.first;
      |                             ^~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
const int INF = 1001001001;
typedef long long ll;

int main(){
  int n,m;
  cin >> n >> m;
  vector<pair<int,int>> key(m);
  rep(i,m){
    int a,b;
    cin >> a >> b;
    int s = 0;
    rep(j,b){
      int c;
      cin >> c;
      c--;
      s |= 1<<c;
    }
    key[i].emplace_back(s,a);
  }
  vector<int> dp(1<<n,INF);
  dp[0] = 0;
  rep(s,1<<n)
    rep(j,m){
    int t = s | key[j].first;
    int cost = dp[s] + key[j].second;
    dp[t] = min(dp[t],cost);
  }
  int ans = dp.back();
  if(ans==INF){
    puts("-1");
    return 0;
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:12: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 'emplace_back'
   21 |     key[i].emplace_back(s,a);
      |            ^~~~~~~~~~~~
Language: Java

import java.util.*;
import java.io.*;

class Key
{
    int cost;
    int mask;
    public Key(int cost,int mask)
    {
        this.cost=cost;
        this.mask=mask;
    }
}

public class Main 
{
    public static void main(String args[])
    {
        Scanner s1=new Scanner(System.in);
        int boxes,keys;
        boxes=s1.nextInt();
        keys=s1.nextInt();
        
        Key arr1=new Key[keys];
        int cost,mask1,size,store;
        for(int i=0;i<keys;i++)
        {
            cost=s1.nextInt();
            size=s1.nextInt();
            mask1=0;
            while(size>0)
            {
                size--;
                store=s1.nextInt();
                store--;
                mask1=mask1|(1<<store);
            }
            arr1[i]=new Key(cost,mask1);
        }
        int dp[1<<boxes];
        for(int i=0;i<(1<<boxes);i++)
        {
            dp[i]=1000000000;
        }
        dp[0]=0;
        for(int i=0;i<(1<<boxes);i++)
        {
            for(int j=0;j<keys;j++)
            {
                dp[i|arr1[j].mask]=Math.min(dp[i|arr1[j].mask],dp[i]+arr1[j].cost);
            }
        }
        int ans=dp[(1<<boxes)-1];
        if(ans==1000000000)
        {
            System.out.print("-1");
        }
        else
        {
            System.out.print(ans);
        }
    }
    return 0;
}

Compiler output:
Main.java:40: error: ']' expected
        int dp[1<<boxes];
               ^
Main.java:40: error: not a statement
        int dp[1<<boxes];
                  ^
Main.java:40: error: ';' expected
        int dp[1<<boxes];
                       ^
Main.java:63: error: illegal start of type
    return 0;
    ^
4 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
#define MOD (int) (1e9+7)
#define INF (int) 1e9
#define LLINF (ll) 2e18

int dp[1 << 15][1005];

int main(){
    int n, m;
    cin >> n >> m;

    rep(i, 1<<15){
        rep(j, 1005){
            if(i!=0) dp[i][j] = INF;
        }
    }

    rep(i, m){
        int a, b;
        cin >> a >> b;
        int s = 0;
        rep(j, b){
            int c;
            cin >> c;
            s += 1 << (c-1);
        }

        rep(j,1<<n) dp[j][i+1]=dp[j][i]
        rep(j, 1<<n){
            dp[j|s][i+1] = min(dp[j|s][i+1], dp[j][i] + a);
            // printf("%d %d %d\n", j, i, (j|s));
            // printf("%d %d %d %d %d\n", j, i, dp[j|s][i+1], dp[j][i]+a, dp[j|s][i]);
        }

        // rep(j, 1<<n){
        //     rep(k, m){
        //         cout << dp[j][k] << " ";
        //     }
        //     cout << endl;
        // }
        // cout << endl;
    }

    // rep(i, 1<<n){
    //     rep(j, m+1){
    //         cout << dp[i][j] << " ";
    //     }
    //     cout << endl;
    // }


    
    if(dp[(1<<n) -1][m] == INF){
        cout << -1 << endl;
    }else{
        cout << dp[(1<<n) -1][m] << endl;
    }
    // printf("%d\n", N);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:40: error: expected ';' before 'for'
   34 |         rep(j,1<<n) dp[j][i+1]=dp[j][i]
      |                                        ^
      |                                        ;
a.cc:35:13: error: 'j' was not declared in this scope
   35 |         rep(j, 1<<n){
      |             ^
a.cc:5:35: note: in definition of macro 'rep'
    5 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
      |                                   ^
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<queue>
#include<deque>
#include<set>
#include<map>
#include<math.h>
#include<algorithm>
#include<fstream>
#include<bitset>
using namespace std;
#define ll long long
#define endl '\n'
const int max_n = 1e6 + 3;
const double INF = 1e9+5;


pair<int, int>key[13];//bitmask,value;
int d[1001][1 << 13];
int n, m;
int go(int here, int state)
{
 	if (state == (1 <<(n+1)) - 2)
		return 0;
	if (here == n)
		return INF;
	
	int& ret = d[here][state];
	if (ret != -1)
		return ret;
	ret = INF;

	ret = min(ret,go(here + 1, state | key[here].first) + key[here].second);
	ret = min(ret, go(here + 1, state));
	return ret;
}
int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);

	memset(d, -1, sizeof(d));
	cin >> n >> m;
	for (int i = 0; i < m; i++)
	{
		int a, b;
		cin >> a >> b;

		int total = 0;
		for (int j = 0; j < b; j++)
		{
			int ci;
			cin >> ci;
			total |= (1<<ci);
		}
		key[i].first = total;
		key[i].second = a;
	}
	int val= go(0, 0);
	
	if (val == INF)
		cout << -1;
	else
		cout << val;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:9: error: 'memset' was not declared in this scope
   43 |         memset(d, -1, sizeof(d));
      |         ^~~~~~
a.cc:12:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   11 | #include<bitset>
  +++ |+#include <cstring>
   12 | using namespace std;
Language: C++

#include <bits/stdc++.h>

using namespace std;

const int N = 1005;
const int MASK = 1 << 15;

int n, m, box[N];
long long cost[N], dp[N][MASK];

long long fun(int pos, int mask) {
  if (mask == (1 << n) - 1) {
    return 0;
  }
  if (pos == m) {
    return 1e9;
  }
  if (dp[pos][mask]!=-1)
    return dp[pos][mask];
  return dp[pos][mask] = min(cost[pos] + fun(pos + 1, mask));
}

int main() {
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int x;
    cin >> cost[i] >> x;
    while (x--) {
      int y;
      cin >> y;
      box[i] |= (1 << (y - 1));
    }
  }
  memset(dp, -1, sizeof dp);
  long long ans = fun(0, 0);
  if (ans == 1e9) ans = -1;
  cout << ans << '\n';
  return 0;
}


Compiler output:
a.cc: In function 'long long int fun(int, int)':
a.cc:20:29: error: no matching function for call to 'min(long long int)'
   20 |   return dp[pos][mask] = min(cost[pos] + fun(pos + 1, mask));
      |                          ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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:   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
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:   template argument deduction/substitution failed:
a.cc:20:29: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   20 |   return dp[pos][mask] = min(cost[pos] + fun(pos + 1, mask));
      |                          ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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:   candidate expects 2 arguments, 1 provided
Language: C++

#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)

#define MAXN 13
#define MAXM 1001
#define INF 100000*13


int N,M;
int a[MAXM], b[MAXM];
int c[MAXM][MAXN];
int KeyCost[1 << 13]; //1キーナンバー 2コスト
bool KeyCostD[1 << 13];
bool Check[1 << 13];

int re(int comb)//returnコスト
{
	if (KeyCostD[comb])return KeyCost[comb];

	for (int i = comb; i>0; i = (i - 1)&comb) {
		if (~comb & ~i != ~comb||comb==i)continue;
		else
		{
			KeyCost[comb] = min(re(i)+re(~i&comb),KeyCost[comb]);
			KeyCostD[comb] = true;
		}
	}


	return KeyCost[comb];
}


int main() {

	
	cin >> N >> M;
	rep(i,M)
	{
		cin >> a[i] >> b[i];
		rep(j,b[i])
		{
			cin >> c[i][j];//i番目のキーがj番目にあける扉の数字
		}	
	}

	rep(i, 1 << 13) { KeyCost[i] = INF; KeyCostD[i] = false; };//０１０１０１に状態にするのに最小コスト

	rep(i, M)
	{
		int kn = 0;
		rep(j, b[i])kn += 1 << (c[i][j] - 1);		
		if (KeyCost[kn] > a[i])KeyCost[kn] = a[i];
	}

	rep(i,N){	//0000001を確定
		KeyCostD[1 << i] = true;
		rep(j, 1 << N){
			if (j >> i & 1){
				KeyCost[1 << i] = min(KeyCost[1 << i], KeyCost[j]);
			}		
		}
	}

	int ans = re((1<<N)-1);
	if (ans >= INF)cout << "-1" <<endl;
	else cout << ans << endl;
}


Compiler output:
a.cc: In function 'int re(int)':
a.cc:23:41: error: 'min' was not declared in this scope
   23 |                         KeyCost[comb] = min(re(i)+re(~i&comb),KeyCost[comb]);
      |                                         ^~~
a.cc: In function 'int main()':
a.cc:36:9: error: 'cin' was not declared in this scope
   36 |         cin >> N >> M;
      |         ^~~
a.cc:59:51: error: 'min' was not declared in this scope; did you mean 'main'?
   59 |                                 KeyCost[1 << i] = min(KeyCost[1 << i], KeyCost[j]);
      |                                                   ^~~
      |                                                   main
a.cc:65:24: error: 'cout' was not declared in this scope
   65 |         if (ans >= INF)cout << "-1" <<endl;
      |                        ^~~~
a.cc:65:39: error: 'endl' was not declared in this scope
   65 |         if (ans >= INF)cout << "-1" <<endl;
      |                                       ^~~~
a.cc:66:14: error: 'cout' was not declared in this scope
   66 |         else cout << ans << endl;
      |              ^~~~
a.cc:66:29: error: 'endl' was not declared in this scope
   66 |         else cout << ans << endl;
      |                             ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn=1<<13;
ll dp[13][maxn];
ll cost[maxn],k[maxn];
const ll inf=1e18;
int main()
{
	int n,m;scanf("%d%d",&n,&m);
	for(int j=0;j<=n;j++)for(int i=0;i<maxn;i++) dp[j][i]=inf;
	for(int i=1;i<=m;i++)
	{
		ll a,b;scanf("%lld%lld",&a,&b);
		int t=0;
		for(int j=1;j<=b;j++)
		{
			int x;scanf("%d",&x);
			t|=(1<<(x-1));
		}
		cost[i]=a;
		k[i]=t;
		//cout<<a<<" "<<t<<endl;
	}
	dp[0][0]=0;
	for(int j=1;j<=m;j++)
	{
		for(int i=0;i<(1<<n);i++) dp[j][i]=dp[j-1][i];
		for(int i=0;i<(1<<n);i++)dp[j][i|k[j]]=min(dp[j][i|k[j]],dp[j-1][i]+cost[j]);}
	}
	if(dp[m][(1<<n)-1]!=inf)
	cout<<dp[m][(1<<n)-1]<<endl;
	else puts("-1");
 } 

Compiler output:
a.cc:31:9: error: expected unqualified-id before 'if'
   31 |         if(dp[m][(1<<n)-1]!=inf)
      |         ^~
a.cc:33:9: error: expected unqualified-id before 'else'
   33 |         else puts("-1");
      |         ^~~~
a.cc:34:2: error: expected declaration before '}' token
   34 |  }
      |  ^
Language: C++

#include<iostream>
#include<cstring>

using namespace std;

long long dp[1001][1001];
int a[1001];
int b[1001];
int c[1001][51];
int N,M
long long T;
const int INF = 1e9;

long long solve(int i, long long j){
    if(dp[i][j] > 0) return dp[i][j];
    
    long long res;
    long long temp=0;
    if(i == M){
        if((j&T) == T){
            res = 0;
        }
        else {
            res = INF;
        }
    }
    else if( (j&T) == T ){
        res = solve(i+1,j);
    }
    else{
        for (int x=0;x<b[i];x++){
              temp |= (1 << (c[i][x]-1));
        }
        res = min(solve(i+1, j ),solve(i+1, j|temp) + a[i]);
    }
    //cout << "temp:" << " bits:" << temp << endl;

    //cout << "i:=" << i<< " j:=" << j << " j&T:=" << (j&T)  << " T=" << T << " res:=" << res << endl;
    
    return dp[i][j] = res;
}
    

int main() {
    long long out;
    cin >> N >> M;
    T = (1<<N)-1;
    //cout <<"T:"<< T << endl;
    for(int i=0; i<M;i++){
        cin >> a[i] >> b[i];
        for (int j=0;j<b[i];j++) cin >> c[i][j];
    }
    
    memset(dp, -1, sizeof(dp));
    
    out = solve(0,0);
    if (out == INF) out=-1;
    cout << out;
    
    return 0;
}



Compiler output:
a.cc:11:1: error: expected initializer before 'long'
   11 | long long T;
      | ^~~~
a.cc: In function 'long long int solve(int, long long int)':
a.cc:19:13: error: 'M' was not declared in this scope
   19 |     if(i == M){
      |             ^
a.cc:20:15: error: 'T' was not declared in this scope
   20 |         if((j&T) == T){
      |               ^
a.cc:27:17: error: 'T' was not declared in this scope
   27 |     else if( (j&T) == T ){
      |                 ^
a.cc: In function 'int main()':
a.cc:46:17: error: 'M' was not declared in this scope
   46 |     cin >> N >> M;
      |                 ^
a.cc:47:5: error: 'T' was not declared in this scope
   47 |     T = (1<<N)-1;
      |     ^
Language: C++

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

int main(){
    int N,M;
    std::cin >> N >> M;
    const Int max_size = (1LL << (N));
    const Int inf = (1LL << 60);
    std::vector<Int>dp(max_size,inf);
    std::vector<Int>d(M);
    std::vector<Int>c(M);
    for(Int i = 0; i < M; ++i){
        int c_num;
        std::cin >> d[i] >> c_num;
        Int val = 0;
        for(int j = 0; j < c_num; ++j){
            Int t; std::cin >> t;
            val += (1LL << (t-1));
        }
        c[i]  = val;
    }
    dp[0] = 0;
    for(Int S = 0; S < dp.size(); ++S){
        if(dp[S] == inf)continue;
        for(int j = 0; j < M; ++j){
            if((S | c[j]) > S)){
                Int tS = std::min(max_size - 1, S | c[j]);
                dp[tS] = std::min(dp[tS],dp[S] + d[j]);
            }
        }
    }
    std::cout << (dp.back() == inf ? -1 : dp.back()) << std::endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:31: error: expected primary-expression before ')' token
   27 |             if((S | c[j]) > S)){
      |                               ^
Language: C++

#include<bits/stdc++.h>
#define rep(i, n) for (int i=0;i<(n);i++)
using namespace std;
typedef long long ll;

int INF=1001001001;

int main(void){
    int 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;//1をcシフトしてorを取っている
        }
        key.emplace_back(s, a);//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:26:12: error: expected ';' before 'for'
   26 |     dp[0]=0
      |            ^
      |            ;
a.cc:27:9: error: 's' was not declared in this scope
   27 |     rep(s, 1<<n){
      |         ^
a.cc:2:32: note: in definition of macro 'rep'
    2 | #define rep(i, n) for (int i=0;i<(n);i++)
      |                                ^
Language: C++

#include "bits/stdc++.h"
using namespace std;
#define M 1000000000000000000LL
#define rep(i,n) for(int i=0;i<n;++i)
typedef long long ll;
typedef vector<ll> vll;
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; }

int main() {
	cin >> n >> m;
	vll a(m), b(m);
	vector<vll> c(m);
	rep(i, m) {
		cin >> a[i] >> b[i];
		rep(j, b[i]) cin >> d; c[i].emplace_back(d);
	}
	vll dp(1<<n, M);
	dp[0] = 0;
	rep(i, m) {
		ll now = 0;
		//get 'OR' of all c[i][j]
		rep(j, b[i]) now |= 1<<(c[i][j]-1);
		//cout << bitset<10>(now)<< endl;
		rep(bit, 1 << n) chmin(dp[bit | now], dp[bit]+a[i]);
	}
	if (dp[(1 << n) - 1] == M) dp[(1 << n) - 1] = -1;
	cout << dp[(1 << n) - 1] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: 'n' was not declared in this scope; did you mean 'yn'?
   11 |         cin >> n >> m;
      |                ^
      |                yn
a.cc:11:21: error: 'm' was not declared in this scope; did you mean 'tm'?
   11 |         cin >> n >> m;
      |                     ^
      |                     tm
a.cc:16:37: error: 'd' was not declared in this scope
   16 |                 rep(j, b[i]) cin >> d; c[i].emplace_back(d);
      |                                     ^
a.cc:16:58: error: 'd' was not declared in this scope
   16 |                 rep(j, b[i]) cin >> d; c[i].emplace_back(d);
      |                                                          ^
Language: C++

#include "bits/stdc++.h"
using namespace std;
#define M 1000000000000000000LL
#define rep(i,n) for(int i=0;i<n;++i)
typedef long long ll;
typedef vector<ll> vll;
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; }

int main() {
	cin >> n >> m;
	vll a(m), b(m);
	vvll c(m);
	rep(i, m) {
		cin >> a[i] >> b[i];
		rep(j, b[i]) cin >> d; c[i].emplace_back(d);
	}
	vll dp(1<<n, M);
	dp[0] = 0;
	rep(i, m) {
		ll now = 0;
		//get 'OR' of all c[i][j]
		rep(j, b[i]) now |= 1<<(c[i][j]-1);
		//cout << bitset<10>(now)<< endl;
		rep(bit, 1 << n) chmin(dp[bit | now], dp[bit]+a[i]);
	}
	if (dp[(1 << n) - 1] == M) dp[(1 << n) - 1] = -1;
	cout << dp[(1 << n) - 1] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: 'n' was not declared in this scope; did you mean 'yn'?
   11 |         cin >> n >> m;
      |                ^
      |                yn
a.cc:11:21: error: 'm' was not declared in this scope; did you mean 'tm'?
   11 |         cin >> n >> m;
      |                     ^
      |                     tm
a.cc:13:9: error: 'vvll' was not declared in this scope; did you mean 'vll'?
   13 |         vvll c(m);
      |         ^~~~
      |         vll
a.cc:16:37: error: 'd' was not declared in this scope
   16 |                 rep(j, b[i]) cin >> d; c[i].emplace_back(d);
      |                                     ^
a.cc:16:40: error: 'c' was not declared in this scope
   16 |                 rep(j, b[i]) cin >> d; c[i].emplace_back(d);
      |                                        ^
a.cc:16:58: error: 'd' was not declared in this scope
   16 |                 rep(j, b[i]) cin >> d; c[i].emplace_back(d);
      |                                                          ^
a.cc:23:41: error: 'c' was not declared in this scope
   23 |                 rep(j, b[i]) now |= 1<<(c[i][j]-1);
      |                                         ^
Language: C++

#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <unordered_set>
#include <unordered_map>
#include <bitset>
#include <limits>
#include <iostream> 
#include <iomanip>  
#include <string>
#include <sstream>  
#include <algorithm>
#include <numeric>
#include <complex>
#include <functional>
#include <cstring>
#include <cmath>
#include <cassert>


#define INF              (int)1000000007
#define EPS              1e-9
#define pb               push_back
#define mp               make_pair
#define all(c)           c.begin(), c.end()
#define forall(i,a,b)    for(int i=a;i<(b);++i)
#define trav(a,x)        for(auto & a: x)
#define in(a,b)          ((b).find(a) != (b).end())
#define sz(c)            (int)(c).size()
#define input(a)         for(auto & x : a) cin >> x;

using namespace std;

typedef vector<int>      vi;
typedef pair<int,int>    ii;
typedef vector<vi>       vvi;
typedef vector<ii>       vii;
typedef long long        ll;

#ifdef DEBUG
#define trace(...)       __f(#__VA_ARGS__, __VA_ARGS__)
#define debug(args...)   {dbg,args; clog<<endl;}
#define print_( a )      for( auto & x : a ) clog << x << ' '; clog << '\n';
#define printPair_( a )  for( auto & x : a ) clog << '(' << x.first << ',' << x.second << ')' << ' '; clog << '\n';
#else
#define debug(args...)            
#define print_( a )               
#define printPair_( a )           
#endif

struct debugger {
  template<typename T> debugger& operator , (const T& x) {    
    clog << x << " ";    return *this;    
  }
}dbg;

template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
    cerr << name << ": " << arg1 << endl;
}

template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
    const char* comma = strchr(names + 1, ',');
    cerr.write(names, comma - names) << ": " << arg1 << " |";
    __f(comma + 1, args...);
}

auto ____ =[]() { std::ios::sync_with_stdio(0); cin.tie(0); return nullptr; }();

int encode( const vi & v ){
  int ans = 0;
  for(auto x : v ) ans |= (1<<(x-1));
  return ans;
}
int main( int argc, char * argv[] ){
  int n, m, w; cin >> n >> m; 
  vi cost(m), code(m);
  forall(t,0,m){
    cin >> cost[t] >> w;
    debug("t=",t, cost[t], w);
    vi v(w);
    debug("vsz", v.size());
    input(v);
    code[t] = encode(v);
  }
  trace(code[1]);
  trace(code[0], code[2]);

  vi p(1<<n, INF), q(1<<n, INF);
  p[0]=q[0]=0;
  forall(i,0,m){// for each code
    int cur_code = code[i];
    int cur_cost = cost[i];
    q = p;
    forall(j,0,1<<n){ // for each state
      if( p[j] == INF ) continue;
      q[j|cur_code] = min(q[j|cur_code], p[j] + cur_cost);
    }
    swap(p,q);
  }

  int ans =  p[(1<<n)-1];
  cout << ( ans == INF ? -1 : ans ) << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:89:3: error: 'trace' was not declared in this scope
   89 |   trace(code[1]);
      |   ^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,m;
  cin >> n >> m;
  vector<int> a(m);
  vector<int> c(m);
  for(int i=0; i<m; i++){
    cin >> a[i];
    int b;
    cin >> b;
    for(int j=0; j<b; j++){
      int c;
      cin >> c;
      c[i] += (1<<(c-1));
    }
  }
  int pattern = (2<<n);
  vector<int> m(pattern);
  int INF=1000000
  for(int i=0; i<pattern; i++){
    m[i]=INF;
  }
  m[0]=0;
  for(int i=0; i<=m; i++){//until number i key. key numbers start from 0.
    for(int j=0; j<pattern; j++){
      m[(j|c[i])] = min(m[(j|c[i])],m[j]+a[i]);
    }
  }
  cout << m[pattern] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:8: error: invalid types 'int[int]' for array subscript
   15 |       c[i] += (1<<(c-1));
      |        ^
a.cc:19:15: error: conflicting declaration 'std::vector<int> m'
   19 |   vector<int> m(pattern);
      |               ^
a.cc:4:9: note: previous declaration as 'int m'
    4 |   int n,m;
      |         ^
a.cc:21:3: error: expected ',' or ';' before 'for'
   21 |   for(int i=0; i<pattern; i++){
      |   ^~~
a.cc:21:16: error: 'i' was not declared in this scope
   21 |   for(int i=0; i<pattern; i++){
      |                ^
a.cc:24:4: error: invalid types 'int[int]' for array subscript
   24 |   m[0]=0;
      |    ^
a.cc:27:8: error: invalid types 'int[int]' for array subscript
   27 |       m[(j|c[i])] = min(m[(j|c[i])],m[j]+a[i]);
      |        ^
a.cc:27:26: error: invalid types 'int[int]' for array subscript
   27 |       m[(j|c[i])] = min(m[(j|c[i])],m[j]+a[i]);
      |                          ^
a.cc:27:38: error: invalid types 'int[int]' for array subscript
   27 |       m[(j|c[i])] = min(m[(j|c[i])],m[j]+a[i]);
      |                                      ^
a.cc:30:12: error: invalid types 'int[int]' for array subscript
   30 |   cout << m[pattern] << endl;
      |            ^
Language: C++

#include <vector>
#include <iostream>
#include <stack>
#include <string>
#include <algorithm>

using namespace std;
typedef long long ll;
typedef vector<int> VI;

static const int MAX_N = 1<<12;
static const int MAX_M = 1001;
int a[MAX_M];
int b[MAX_M];
int c[MAX_M];
int dp[MAX_M][MAX_N];

static const int LARGE = 1e13;

void main(void)
{
	int n, m;
	cin >> n >> m;
	for (int i = 0; i < m; i++)
	{
		cin >> a[i] >> b[i];
		c[i] = 0;
		for (int j = 0; j < b[i]; j++)
		{
			int ci;
			cin >> ci;
			ci--;
			c[i] |= (1 << ci);
		}
	}
	fill((int*)dp, (int*)dp + MAX_M * MAX_N, LARGE);
	for (int i = 0; i <= m; i++)
	{
		dp[i][0] = 0;
	}
	for (int i = 0; i < m; i++) 
	{
		int ci = c[i];
		for (int j = 0; j < MAX_N; j++)
		{
			dp[i + 1][j] = min(dp[i + 1][j], dp[i][j]);
			dp[i + 1][j | ci] = min(dp[i + 1][j | ci], dp[i][j] + a[i]);
		}
	}
	int t = 0;
	for (int i = 0; i < n; i++) {
		t |= 1 << i;
	}
	if (dp[m][t] == LARGE)
	{
		cout << -1 << endl;
		return;
	}
	cout << dp[m][t] << endl;
	return;
}

Compiler output:
a.cc:18:26: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+13' to '2147483647' [-Woverflow]
   18 | static const int LARGE = 1e13;
      |                          ^~~~
a.cc:20:1: error: '::main' must return 'int'
   20 | void main(void)
      | ^~~~
a.cc: In function 'int main()':
a.cc:57:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
   57 |                 return;
      |                 ^~~~~~
a.cc:60:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   60 |         return;
      |         ^~~~~~
Language: C++

#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <vector>
#include <algorithm>
#include <set>
#include <string>
#include <bitset>
#include <tuple>
#include <queue>
#include <map>
#include <cmath>
#include <iomanip>
using namespace std;
#define ll long long
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, k, n) for (int i = (int)(k); i <(int)(n); i++)
#define rrep(i, n) for (int i = (int)(n)-1; i >= 0; i--)
#define rREP(i,k,n) for (int i = (int)(n)-1; i >= k; i--)
#define INF 1LL<<61

int main(){
    int n,m;
    int a[1010]     = {};
    int b[1010]     = {};
    int c[1010]     = {};
    vector<int> dp(1<<13,INT_MAX>>1);
    dp[0] = 0;
    cin >> n >> m;
    rep(i,m){
        cin >> a[i] >> b[i];
        rep(j,b[i]){
            int t;
            cin >> t;
            c[i] |= t;
        }
    }
    rep(i,n){
        rep(j,1<<n){
            dp[j|c[i]] = min(dp[j|c[i]],dp[j]+a[i]);
        }
    }
    cout << dp[(1<<n)-1] << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:26: error: 'INT_MAX' was not declared in this scope
   28 |     vector<int> dp(1<<13,INT_MAX>>1);
      |                          ^~~~~~~
a.cc:15:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   14 | #include <iomanip>
  +++ |+#include <climits>
   15 | using namespace std;
Language: C++

#include <iostream>
#include <vector>

using namespace std;
int N, M; //boxes, keys
int dp[(1<<12)][100];
int unlock;
int main() {
    scanf("%d %d", &N, &M);
    int a, b;
    memset(dp, 0x3f3f3f3f, sizeof(dp));
    dp[0][0] = 0;
    for (int i=1; i<=M; i++){
        scanf("%d %d", &a, &b);
        unlock = 0;
        int c;
        for (int j=0; j<b; j++){
            scanf("%d", &c);
            unlock |= (1<<(c-1));
        }
        for (int j=0; j<=(1<<N)-1; j++) dp[i][j] = dp[i-1][j];
        for (int j=1; j<=(1<<N)-1; j++){
                if (unlock & j) {
                    dp[i][j] = min(dp[i][j], dp[i - 1][j ^ (unlock & j)] + a);
                }
        }
    }
    if (dp[M][(1<<N)-1] == 0x3f3f3f3f) printf("-1\n");
    else printf("%d\n", dp[M][(1<<N)-1]);
    return 0;
}

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

#include "bits/stdc++.h"

using namespace std;
using ll = long long;

int main() {
  int n, m; cin >> n >> m;
  vector<int> a(m), b(m);
  vector<vector<int>> c(m);
  vector<bool> has(n, false);
  for (int i = 0; i < m; i++) {
    cin >> a[i] >> b[i];
    for (int j = 0; j < b[i]; j++) {
      int x; cin >> x; 
      has[x - 1] = true;
      b[i].push_back(x);
    }
  }
  
  for (int i = 0; i < n; i++) {
    if (!has[i]) {
      cout << "-1\n"; return 0;
    }
  }
  
  
  
  return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:12: error: request for member 'push_back' in 'b.std::vector<int>::operator[](((std::vector<int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   16 |       b[i].push_back(x);
      |            ^~~~~~~~~
Language: C++

//
#include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define fi first
#define se second
using namespace std;
typedef pair<int,int> P;
const int M=5000+10,inf=0x3f3f3f3f;
int dp[M],n,m;
P a[M];
int main()
{
    memset(dp,inf,sizeof(dp));dp[0]=0;
    scanf("%d%d",&n,&m);
    for(int i=0;i<m;i++)
    {
        int tmp=0,cost,b,z;
        scanf("%d%d",&cost,&b);
        while(b--)
            scanf("%d",&x),tmp|=(1<<(x-1));
        a[i]=P(tmp,cost);
    }
    for(int i=0;i<m;i++)
        for(int j=((1<<n)-1);j>=0;j--)
            dp[a[i].fi|j]=min(dp[a[i].fi|j],dp[j]+a[i].se);
    if(dp[((1<<n)-1)]!=inf) printf("%d\n",dp[((1<<n)-1)]);
    else printf("-1\n");
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:25: error: 'x' was not declared in this scope
   21 |             scanf("%d",&x),tmp|=(1<<(x-1));
      |                         ^
Language: C++

n,m = map(int,input().split())
vals = []
inf = float("inf")
ans = [inf]*2**n

for i in range(m):
	a,b = map(int,input().split())
	C = list(map(int,input().split()))
	cur = 0
	for c in C:
		cur += 2**(c-1)
	ans[cur] = min(ans[cur],a)

for i,a in enumerate(ans):
	if a == inf: continue
	for j,b in enumerate(ans):
		if b == inf: continue
		ans[i|j] = min(ans[i|j],ans[i]+ans[j])

if ans[-1] == inf:
	print(-1)
else:
	print(ans[-1])

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n,m = map(int,input().split())
      | ^
Language: C++

#include <iostream>
#include <vector>

using namespace std;

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

    vector<int> costs(M);
    vector<int> masks(M, 0);

    for (int i = 0; i < M; i++) {
        int cost, num;
        cin >> cost >> num;
        costs[i] = cost;
        for (int j = 0; j < num; j++) {
            int idx;
            cin >> idx;
            idx--;
            masks[i] |= 1 << idx;
        }
    }

    vector<vector<int>> dp(M+1, vector<int>(1 << N, INT_MAX));
    dp[0][0] = 0;

    for (int i = 0; i < M; i++) {
        for (int j = 0; j < (1 << N); j++) {
            if (dp[i][j] == INT_MAX) continue;
            dp[i+1][j] = min(dp[i+1][j], dp[i][j]);
            dp[i+1][j | masks[i]] = min(dp[i+1][j | masks[i]], dp[i][j] + costs[i]);
        }
    }

    if (dp[M][(1 << N) - 1] == INT_MAX) cout << -1 << endl;
    else cout << dp[M][(1 << N) - 1] << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:53: error: 'INT_MAX' was not declared in this scope
   25 |     vector<vector<int>> dp(M+1, vector<int>(1 << N, INT_MAX));
      |                                                     ^~~~~~~
a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    2 | #include <vector>
  +++ |+#include <climits>
    3 |