Language: C++

#include <iostream>
#include <bits/stdc++.h>
#define ll long long
using namespace std;

int minimum = 987654321;
int N, M, X, C[13];
int A[13][13];
int select[13] = {0,};
int temp[13] = {0,};
void find(int n){
    if (n > N){
        int total = 0;
        for ( int i = 1 ; i <= M; ++i){
            if (temp[i] < X) {return ;} 
        }
        for (int i = 1; i <= N; ++i){
            total += C[i] * select[i];
        }
        if (total <= minimum ) minimum = total;
    
    }
    else {
        for (int i = 1; i <= M; ++i){
            temp[i] += A[n][i];
        }
        select[n] = 1;
        find(n+1);
        for (int i = 1; i <= M; ++i){
            temp[i] -= A[n][i];
        }
        select[n] = 0;
        find(n+1); 
    }

}
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    
    cin >> N >> M >> X;

    for (int i = 1 ; i <= N; ++i){
        cin >> C[i] ;
        for (int j = 1; j <= M; ++j){
            cin >> A[i][j];
        }
    }


    find(1);
    if (minimum == 987654321) cout << "-1";
    else cout << minimum;
}




Compiler output:
a.cc:9:14: error: 'int select [13]' redeclared as different kind of entity
    9 | int select[13] = {0,};
      |              ^
In file included from /usr/include/x86_64-linux-gnu/sys/types.h:179,
                 from /usr/include/stdlib.h:514,
                 from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/ext/string_conversions.h:43,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 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/x86_64-linux-gnu/sys/select.h:102:12: note: previous declaration 'int select(int, fd_set*, fd_set*, fd_set*, timeval*)'
  102 | extern int select (int __nfds, fd_set *__restrict __readfds,
      |            ^~~~~~
a.cc: In function 'void find(int)':
a.cc:18:37: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   18 |             total += C[i] * select[i];
      |                                     ^
a.cc:18:27: error: invalid operands of types 'int' and 'int(int, fd_set*, fd_set*, fd_set*, timeval*)' to binary 'operator*'
   18 |             total += C[i] * select[i];
      |                      ~~~~ ^ ~~~~~~~~~
      |                         |           |
      |                         int         int(int, fd_set*, fd_set*, fd_set*, timeval*)
a.cc:27:17: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   27 |         select[n] = 1;
      |                 ^
a.cc:27:19: error: assignment of read-only location '*(select + ((sizetype)n))'
   27 |         select[n] = 1;
      |         ~~~~~~~~~~^~~
a.cc:32:17: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   32 |         select[n] = 0;
      |                 ^
a.cc:32:19: error: assignment of read-only location '*(select + ((sizetype)n))'
   32 |         select[n] = 0;
      |         ~~~~~~~~~~^~~