Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
#define REP2(i,x,n) for(int i=x; i<(n); i++)
#define ALL(n) begin(n),end(n)
#define sz(x) int(x.size())
using ll = long long;
using P = pair<int,int>;
const ll LLINF = numeric_limits<long long>::max();
const int mod = 1000000007;
const int INF = 1001001001;
 
int main()
{
    int N,M,X;
    cin >> N >>M >>X;
    vector <int> C(N);
    int  A[N][M];
    int W[M];
    for(int i=0;i<N;i++){
        cin >> C[i];
        for(int j=0;j<M;j++){
             cin >> A[i][j];
             W[i] = 0;
        }
    }
    ll ans = 10000000000;
    
    int n=N;
    int co=1;
    
    rep(div,1<<(N)) {
        int g = 0;
        vector<int> id(M);
        bool flag = true;
        ll cos=0; 
        //cout << "sss"<<div << endl;
        rep(i,N) {
        // cout << div;
        int d = div;
            if (d>>i&1){
                for(int j=0;j<M;j++){
                    //cout << "j " << j  << endl;
                    //cout << "a "<<A[i][j] << endl;
                    id[j] += A[i][j];
                    //cout << "id "<<id[j] << endl;
                    
                    
                    
                }
                cos += C[i];
        
                
            }
        }
        for(int j=0;j<M;j++){
            //cout << id[j] << " ";  
            if(id[j] < X){
                flag=false;
            }
        }
        //cout << endl;
        if(flag){
            ans = min(ans, cos);
        }
    }   
    if(ans == 10000000000){
        ans =-1;
    }
    cout << ans;
 
 
 
    return 0;
}
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
#define REP2(i,x,n) for(int i=x; i<(n); i++)
#define ALL(n) begin(n),end(n)
#define sz(x) int(x.size())
using ll = long long;
using P = pair<int,int>;
const ll LLINF = numeric_limits<long long>::max();
const int mod = 1000000007;
const int INF = 1001001001;

int main()
{
    int N,M,X;
    cin >> N >>M >>X;
    vector <int> C(N);
    int  A[N][M];
    int W[M];
    for(int i=0;i<N;i++){
        cin >> C[i];
        for(int j=0;j<M;j++){
             cin >> A[i][j];
             W[i] = 0;
        }
    }
    int ans = INF;
    
    int n=N;
    int co=1;
    
    rep(div,1<<(N)) {
        int g = 0;
        vector<int> id(M);
        bool flag = true;
        int cos=0; 
        //cout << "sss"<<div << endl;
        rep(i,N) {
        // cout << div;
        int d = div;
            if (d>>i&1){
                for(int j=0;j<M;j++){
                    //cout << "j " << j  << endl;
                    //cout << "a "<<A[i][j] << endl;
                    id[j] += A[i][j];
                    //cout << "id "<<id[j] << endl;
                    
                    
                    
                }
                cos += C[i];
        
                
            }
        }
        for(int j=0;j<M;j++){
            //cout << id[j] << " ";  
            if(id[j] < X){
                flag=false;
            }
        }
        //cout << endl;
        if(flag){
            ans = min(ans, cos);
        }
    }   
    if(ans == INF){
        ans =-1;
    }
    cout << ans;



    return 0;
}
提出情報

Compiler output:
a.cc:84:10: error: redefinition of 'const ll LLINF'
   84 | const ll LLINF = numeric_limits<long long>::max();
      |          ^~~~~
a.cc:9:10: note: 'const ll LLINF' previously defined here
    9 | const ll LLINF = numeric_limits<long long>::max();
      |          ^~~~~
a.cc:85:11: error: redefinition of 'const int mod'
   85 | const int mod = 1000000007;
      |           ^~~
a.cc:10:11: note: 'const int mod' previously defined here
   10 | const int mod = 1000000007;
      |           ^~~
a.cc:86:11: error: redefinition of 'const int INF'
   86 | const int INF = 1001001001;
      |           ^~~
a.cc:11:11: note: 'const int INF' previously defined here
   11 | const int INF = 1001001001;
      |           ^~~
a.cc:88:5: error: redefinition of 'int main()'
   88 | int main()
      |     ^~~~
a.cc:13:5: note: 'int main()' previously defined here
   13 | int main()
      |     ^~~~
a.cc:151:1: error: '\U000063d0\U000051fa\U000060c5\U00005831' does not name a type
  151 | 提出情報
      | ^~~~~~~~