Language: C++

using namespace std;
 
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep1(i, n) for (ll i = 1; i < (ll)(n); i++)
#define INF 1000000000000
#define MOD 1000000007
using ll = long long;
 
int main(){
  int n;
  cin >> n;
  vector<vector<int>> F(n,vector<int>(10,0));
  // vector<vector<vector<int>>> F(n,vector<vector<int>>(5,vector<int>(2,0)));
  rep(i,n)rep(j,10)cin>>F.at(i).at(j);
  vector<vector<int>> P(n,vector<int>(11));
  rep(i,n)rep(j,11)cin>>P.at(i).at(j);
 
  ll ans = -INF;//最大値を求める。
  //joshinoお姉ちゃんの見せの時間
  for(int bit = 1; bit < (1<<10); bit++){
    vector<int> num(10,0);
    for(int i = 0; i < 10; i++){//10の時間
      if(bit&(1<<i)){//joshino open
        for(int j = 0; j < n; j++){
          if(F.at(j).at(i))num.at(j)++;
        }
      }
    }
    ll tmp = 0;
    rep(i,n){
      tmp+=P.at(i).at(num.at(i));
    }
    if(bit==1)ans = tmp;
    else ans = max(ans,tmp);
  }
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'cin' was not declared in this scope
   11 |   cin >> n;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:12:3: error: 'vector' was not declared in this scope
   12 |   vector<vector<int>> F(n,vector<int>(10,0));
      |   ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | using namespace std;
a.cc:12:17: error: expected primary-expression before 'int'
   12 |   vector<vector<int>> F(n,vector<int>(10,0));
      |                 ^~~
a.cc:14:25: error: 'F' was not declared in this scope
   14 |   rep(i,n)rep(j,10)cin>>F.at(i).at(j);
      |                         ^
a.cc:15:17: error: expected primary-expression before 'int'
   15 |   vector<vector<int>> P(n,vector<int>(11));
      |                 ^~~
a.cc:16:25: error: 'P' was not declared in this scope
   16 |   rep(i,n)rep(j,11)cin>>P.at(i).at(j);
      |                         ^
a.cc:21:12: error: expected primary-expression before 'int'
   21 |     vector<int> num(10,0);
      |            ^~~
a.cc:25:14: error: 'F' was not declared in this scope
   25 |           if(F.at(j).at(i))num.at(j)++;
      |              ^
a.cc:25:28: error: 'num' was not declared in this scope; did you mean 'enum'?
   25 |           if(F.at(j).at(i))num.at(j)++;
      |                            ^~~
      |                            enum
a.cc:31:12: error: 'P' was not declared in this scope
   31 |       tmp+=P.at(i).at(num.at(i));
      |            ^
a.cc:31:23: error: 'num' was not declared in this scope; did you mean 'enum'?
   31 |       tmp+=P.at(i).at(num.at(i));
      |                       ^~~
      |                       enum
a.cc:34:16: error: 'max' was not declared in this scope
   34 |     else ans = max(ans,tmp);
      |                ^~~
a.cc:36:3: error: 'cout' was not declared in this scope
   36 |   cout<<ans<<endl;
      |   ^~~~
a.cc:36:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:36:14: error: 'endl' was not declared in this scope
   36 |   cout<<ans<<endl;
      |              ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;