Language: C++

#include <bits/stdc++.h>
using namespace std;
#include <math.h>
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const int INF=1001001001;
vector<pair<int64_t,int64_t>>func(int64_t x){
  vector<pair<int64_t,int64_t>>p;
  for(int64_t i=2;i*i<=x;i++){
    int cnt=0;
    if(x%i==0){
    while(x%i==0){cnt++;x/=i;}
    p.push_back(make_pair(i,cnt));
    }
  }
  if(x!=1){p.push_back(make_pair(x,1));}
  return p;
}


int a[10];
int ans=-999999999;
int N;
int F[200][10];
int P[200][11];

void func(void){
  int64_t score=0;
  for(int i=0;i<N;i++){
   int cnt=0;
   for(int j=0;j<10;j++){
    if(a[j]==1&&F[i][j]==1){
      cnt++;
    }
   }
   score+=P[i][cnt];
  }
  ans=max(ans,score);
}

void dfs(int pos){
  if(pos==10){
    bool ok=false;
    for(int i=0;i<10;i++){
      if(a[i]==1){ok=true;}
    }
    if(ok){func() ;}
    return ;
  }
  a[pos]=0;dfs(pos+1);
  a[pos]=1;dfs(pos+1);
}

int main() {
  cin>>N;
  for(int i=0;i<N;i++){
    for(int j=0;j<10;j++){
      cin>>F[i][j];
    }
  }
  for(int i=0;i<N;i++){
    for(int j=0;j<11;j++){
      cin>>P[i][j];
    }
  }
  dfs(0);

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

Compiler output:
a.cc: In function 'void func()':
a.cc:38:10: error: no matching function for call to 'max(int&, int64_t&)'
   38 |   ans=max(ans,score);
      |       ~~~^~~~~~~~~~~
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:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:38:10: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'int64_t' {aka 'long int'})
   38 |   ans=max(ans,score);
      |       ~~~^~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:38:10: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   38 |   ans=max(ans,score);
      |       ~~~^~~~~~~~~~~