func_code_string: #include <bits/stdc++.h>   using namespace std;   #pragma comment(linker,  /STACK:256000000 )   template <class T>   T sqr(T a) {     return a * a;   }   int n, m, b;   long long a[1 << 20];   int was[1 << 20];   struct dr {     int mon, pl, zad;     int mask;     const bool operator<(dr a) const {       if (mon < a.mon)         return true;       else         return false;     }   };   dr fr[100];   void init() {     scanf( %d%D%D , &n, &m, &b);     for (int i = 0; i < n; ++i) {       scanf( %d%d%D , &fr[i].pl, &fr[i].mon, &fr[i].zad);       for (int j = 0; j < fr[i].zad; ++j) {         int t;         scanf( %D , &t);         t--;         fr[i].mask |= 1 << t;       }     }     sort(fr, fr + n);   }   int q = 0;   long long ot = -1, ma = 1e18, co;   void solve() {     was[0] = 1;     for (int i = 0; i < (1 << m); ++i) a[i] = 1e18;     a[0] = 0;     for (int i = 0; i < n; ++i) {       co = fr[i].mon;       int t = fr[i].mask;       for (int j = (1 << m) - 1; j >= 0; --j) {         if (!was[j]) continue;         was[j | t] = 1;         a[j | t] = min(a[j | t], a[j] + fr[i].pl);       }       if (!was[(1 << m) - 1]) continue;       if (ot == -1)         ot = a[(1 << m) - 1] + co * (long long)b;       else         ot = min(ot, a[(1 << m) - 1] + co * (long long)b);     }     cout << ot;   }   int main() {     init();     solve();     return 0;   }   