criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;

int main()
{
  int n;
  cin >> n;
  vector<int> s(n, 0);
  vector<vector<int>> b(n, vector<int>(11));
  for(int i = 0; i < n; ++i){
    for(int j = 0; j < 10; ++j){
      int k;
      cin >> k;
      s[i] += k << j;
    }
    for(auto& j : b[i]){
      cin >> j;
    }
  }
  
  int ret = 0;
  int fin = 1 << 10;
  for(int i = 1; i < fin; ++i){
    int tempret = 0;
    for(int j = 0; j < n; ++j){
      int check = s[j] & i;
      int count = 0;
      int k = 0;
      while(check != 0){
        if(check & 1){
          ++count;
        }
        check = check >> 1;
        ++k;
      }
      tempret += b[j][count];
    }
    ret = max(ret, tempret);
  }
  cout << ret << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'vector' was not declared in this scope
    9 |   vector<int> s(n, 0);
      |   ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include <algorithm>
  +++ |+#include <vector>
    3 | using namespace std;
a.cc:9:10: error: expected primary-expression before 'int'
    9 |   vector<int> s(n, 0);
      |          ^~~
a.cc:10:17: error: expected primary-expression before 'int'
   10 |   vector<vector<int>> b(n, vector<int>(11));
      |                 ^~~
a.cc:15:7: error: 's' was not declared in this scope
   15 |       s[i] += k << j;
      |       ^
a.cc:17:19: error: 'b' was not declared in this scope
   17 |     for(auto& j : b[i]){
      |                   ^
a.cc:27:19: error: 's' was not declared in this scope
   27 |       int check = s[j] & i;
      |                   ^
a.cc:37:18: error: 'b' was not declared in this scope
   37 |       tempret += b[j][count];
      |                  ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define sc(x) scanf("%d",&x);

int main(){
    int n, tmp; sc(n)
    ll ans = -1e10;
    vector<vector<int> > f(n, vector<int>(10)), p(n, vector<int>(11));
    vector<int> cnt(n, 0);
    for (int i = 0; i < n; i++){
        for (int j = 0; j < 10; j++) sc(f[i][j])
    }
    for (int i = 0; i < n; i++){
        for (int j = 0; j < 11; j++) sc(p[i][j])
    }
    for (int i = 1; i < (1<<10); i++){
        tmp = 0;
        fill(cnt.begin(), cnt.end(), 0);
        for (int j = 0; j < 10; j++){
            if (!(i & (1<<j))) continue;
            for (int k = 0; k < n; k++){
                if (f[k][j] == 1) cnt[k] += 1;
            }
        }
        for (int j = 0; j < n; j++) tmp += p[j][cnt[j]];
        ans = max(ans, tmp);
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:18: error: no matching function for call to 'max(ll&, int&)'
   29 |         ans = max(ans, tmp);
      |               ~~~^~~~~~~~~~
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:29:18: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   29 |         ans = max(ans, tmp);
      |               ~~~^~~~~~~~~~
/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:29:18: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   29 |         ans = max(ans, tmp);
      |               ~~~^~~~~~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <iomanip>
using namespace std;
typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<string> VS;
typedef vector< vector<int> > VVI;
typedef vector< vector<ll> > VVL;
typedef pair<int,int> PII;
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(a) (a).begin(),(a).end()
#define pb push_back
#define mp make_pair
#define ub upper_bound
#define lb lower_bound

int main(){
  ll N;
  cin>>N;
  VVL F(100,VL(10));
  rep(i,N) rep(j,10) cin>>F[i][j];
  VVL P(100,VL(11));
  rep(i,N) rep(j,11) cin>>P[i][j];
  ll ans=-1001001001;
  rep(i,1<<10){
    if(i){
      VL B(10);
      rep(j,10) B[j]=(i>>j)&1;
      VL C(10);
      /*rep(j,10){
        if(B[j]) rep(k,N) if(F[k][j]) C[k]++;
      }
      ll tmp=0;
      rep(j,N) tmp+=P[j][C[j]];*/
      ans=max(ans,tmp);
    }
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:44:19: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   44 |       ans=max(ans,tmp);
      |                   ^~~
      |                   tm
Language: Java

import oracle.jvm.hotspot.jfr.JFRTypeIDs;

import java.io.*;
import java.util.*;

public class Main {
    public static final long mod = (long)1e9+7;
    public static final long INF = Long.MAX_VALUE/10;
    public static final int inf = Integer.MAX_VALUE/10;

    static void solve(InputReader in, PrintWriter out){
        int n = in.ni();
        boolean[][] f = new boolean[n][10];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < 10; j++) {
                f[i][j] = in.ni()==1;
            }
        }
        int[][] p = new int[n][11];
        for (int i = 0; i < n; i++) p[i] = in.ni(11);
        int ans = Integer.MIN_VALUE, sum = 0, count = 0;
        String format = "%".concat(String.valueOf(10)).concat("s"), s;
        for (int i = 1; i < (1 << 10); i++) {
            s = String.format(format, Integer.toString(i,2)).replace(' ', '0');
            sum = 0;
            for (int j = 0; j < n; j++) {
                count = 0;
                for (int k = 0; k < 10; k++) {
                    if(s.charAt(k)=='1'&&f[j][k]) count++;
                }
                sum += p[j][count];
            }
            ans = Math.max(ans, sum);
        }
        out.println(ans);
    }

    public static void main(String[] args) throws Exception{
        InputReader in = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
        solve(in, out);
        out.close();
    }
    public static class InputReader{
        private BufferedReader br;
        private StringTokenizer st;
        public InputReader(InputStream is){
            br = new BufferedReader(new InputStreamReader(is));
            st = null;
        }
        public String ns(){
            if(st == null || !st.hasMoreTokens()){
                try{
                    st = new StringTokenizer(br.readLine());
                }catch (Exception e){
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }
        public long nl(){
            return Long.parseLong(ns());
        }
        public int ni(){
            return Integer.parseInt(ns());
        }
        public Double nd(){
            return Double.parseDouble(ns());
        }
        public int[] ni(int n){
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = ni();
            }
            return a;
        }
        public long[] nl(int n){
            long[] a = new long[n];
            for (int i = 0; i < n; i++) {
                a[i] = nl();
            }
            return a;
        }
        public double[] nd(int n){
            double[] a = new double[n];
            for (int i = 0; i < n; i++) {
                a[i] = nd();
            }
            return a;
        }
    }
}

Compiler output:
Main.java:1: error: package oracle.jvm.hotspot.jfr does not exist
import oracle.jvm.hotspot.jfr.JFRTypeIDs;
                             ^
1 error
Language: C++

import qualified Data.Vector as V
import qualified Data.ByteString.Char8 as B
import Data.Bits
import Data.Char

type Open = V.Vector (V.Vector Int)
type Prof = V.Vector (V.Vector Int)
type BitV = V.Vector Int
type OP = (V.Vector Int, V.Vector Int)

toBitV :: Int -> Int -> BitV
toBitV n l
    | l == 0 = V.empty
    | otherwise = V.snoc (toBitV (shiftR n 1) (l - 1)) (n .&. 1)

solve :: Open -> Prof -> BitV -> Int
solve open prof bitv = loop
    where
        zss :: V.Vector OP
        zss = V.zip open prof
        loop :: Int
        loop = V.foldl' step 0 zss
        step :: Int -> OP -> Int
        step acc (op, pf) = acc + (pf V.! l)
            where
                l = V.length $ V.filter (==1) $ V.zipWith (*) op bitv

main = do
    n <- readLn :: IO Int
    fss <- V.replicateM n $ do
        xs <- V.unfoldrN 10 (B.readInt . B.dropWhile isSpace) <$> B.getLine
        return xs
    pss <- V.replicateM n $ do
        xs <- V.unfoldrN 11 (B.readInt . B.dropWhile isSpace) <$> B.getLine
        return xs
    print $ maximum $  [solve fss pss (toBitV i 10) | i <- [1..2^10-1]]

Compiler output:
a.cc:22:23: warning: missing terminating ' character
   22 |         loop = V.foldl' step 0 zss
      |                       ^
a.cc:22:23: error: missing terminating ' character
   22 |         loop = V.foldl' step 0 zss
      |                       ^~~~~~~~~~~~
a.cc:36:61: error: too many decimal points in number
   36 |     print $ maximum $  [solve fss pss (toBitV i 10) | i <- [1..2^10-1]]
      |                                                             ^~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import qualified Data.Vector as V
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int (i)=0;(i)<(n);++(i))
#define all(x) (x).begin(),(x).end()
#define dump(x) cout << #x << " = " << (x) << endl
#define YES(n) cout << ((n) ? "YES" : "NO") << endl
#define Yes(n) cout << ((n) ? "Yes" : "No") << endl
#define yes(n) cout << ((n) ? "yes" : "no") << endl

using namespace std;
using ll = long long;
using P = pair<int, int>;

const int INF = 1001001001;
const vector<int> di = {-1,  0, 1, 0};
const vector<int> dj = { 0, -1, 0, 1};

void chmin(int &a, int b) { if (a > b) a = b; }

ll GCD(ll a, ll b) {
    if (b == 0) return a;
    else return GCD(b, a % b);
}
ll LCM(ll a, ll b) {
    ll g = GCD(a, b);
    return a / g * b;
}

int N; // 店の数
int F[111][11]; // 営業時間
int P[111][11]; // 利益

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++) { // 0個~10個なので1列の入力は11個ある
         cin >> P[i][j];
      }
   }

   ll ans = -1e15;
   for (int mask = 1; mask < (1<<10); mask++) {
      ll sum = 0;
      for (int i = 0; i < N; i++) {
         int cnt = 0;
         for (int j = 0; j < 10; j++) {
            if (((mask>>j)&1) && F[i][j]) cnt++;
         }
         sum += P[i][cnt];
      }
      ans = max(ans, sum);
   }
   cout << ans << endl;
}

Compiler output:
a.cc:30:14: error: 'int P [111][11]' redeclared as different kind of entity
   30 | int P[111][11]; // 利益
      |              ^
a.cc:11:7: note: previous declaration 'using P = struct std::pair<int, int>'
   11 | using P = pair<int, int>;
      |       ^
a.cc: In function 'int main()':
a.cc:42:18: error: expected primary-expression before '[' token
   42 |          cin >> P[i][j];
      |                  ^
a.cc:54:18: error: expected primary-expression before '[' token
   54 |          sum += P[i][cnt];
      |                  ^
Language: C++

#include <algorithm>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <stack>
#include <string>
#include <vector>

using namespace std;
using LLONG = long long;
const LLONG MOD = 1000000007;

int main()
{
    int N; cin >> N;
    vector<vector<int>> F(N, vector<int>(10));
    for (auto &Fi : F) for (auto &Fijk : Fi) cin >> Fijk;
    vector<vector<int>> P(N, vector<int>(11));
    for (auto &Pi : P) for (auto &Pic : Pi) cin >> Pic;
    // 全ての店の開き方（2^10-1）について全探索:O(10^3*10*N)=O(N*10^4)<O(10^6)
    int maxPayoff = INT_MIN;
    for (int bit = 1; bit < (1 << 10); ++bit)
    {
        // 各店ごとの重複数を計算:O(10N)
        vector<int> overlapNums(N, 0);
        for (int t = 0; t < 10; ++t)
        {
            // 店を開店しているとき
            if (bit & (1 << t))
            {
                for (int i = 0; i < N; ++i)
                {
                    if (F[i][t] == 1) ++overlapNums[i];
                }
            }
        }
        // 各店ごとの重複数に応じて利益計算:O(N)
        int tmpPayoff = 0;
        for (int i = 0; i < N; ++i)
        {
            tmpPayoff += P[i][overlapNums[i]];
        }
        maxPayoff = max(maxPayoff, tmpPayoff);
    }
    cout << maxPayoff << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:21: error: 'INT_MIN' was not declared in this scope
   25 |     int maxPayoff = INT_MIN;
      |                     ^~~~~~~
a.cc:12:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   11 | #include <vector>
  +++ |+#include <climits>
   12 |
Language: C++

#include<bits/stdc++.h>
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
#define ll long long
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define FORR(i,a,b)for(ll i=(a);i<=(b);i++)
#define repR(i,n) for(ll i=n;i>=0;i--)
#define all(v)(v).begin(),(v).end()
#define rall(v)(v).rbegin(),(v).rend()
#define F first
#define S second
#define pb push_back
#define pu push
#define COUT(x) cout<<(x)<<endl
#define PQ priority_queue<ll>
#define PQR priority_queue<ll,vector<ll>,greater<ll>>
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define mp make_pair
#define maxs(x,y) (x = max(x,y))
#define mins(x,y) (x = min(x,y))
#define sz(x) (int)(x).size()
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const ll MOD = 1000000007LL;
const ll INF = 1LL << 60;
using vll = vector<ll>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vvll = vector<vll>;
using vstr = vector<string>;
using pll = pair<ll, ll>;
ll gcd(ll a, ll b) { return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) { return a/gcd(a,b)*b;}
int main(){
  ll n;
  cin>>n;
  vvll table(n,vll(10));
  rep(i,n) rep(j,10)cin>>table[i][j];
  vvll p(n,vll (11));
  rep(i,n) rep(j,11) cin>>p[i][j];
  ll ans=0;

  for(int bit=1;bit<(1<<10);bit++){
    ll cu=0;
    vll pp(10);
    rep(i,10){
      if(bit&(1<<i)) pp[i]=1;
    }
    rep(i,n){
      ll k=0;
      rep(j,10){
        if(pp[j]&&t[i][j]){
          k++;
        }
      }
      cu+=p[i][k];
    }
    ans=max(ans,cu);
  }
  COUT(ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:56:19: error: 't' was not declared in this scope
   56 |         if(pp[j]&&t[i][j]){
      |                   ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<ll, ll> pll;


const ll LongINF=1e13+7;
const int INF=1e9+7;
const int dx[]={0,1,0,-1};
const int dy[]={1,0,-1,0};

template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b;return true;}return false;}
template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b;return true;}return false;}
template <class T, class Y>T GCD(T a, Y b){if(a<b){int c=a;a=b;b=c;}if (a % b == 0){return b;}return GCD(b, a % b);}
void clear(queue<pair<int, int>> &q){queue<pair<int, int>> empty;swap(q, empty);} //queueの中身の型は適時変更を忘れない

#define REP(i,a,b) for(int i=(a);i<(b);i++)
#define rep(i,n) REP(i,0,n)
#define pb push_back
#define rv reverse
#define ALL(a) (a).begin(),(a).end()


int main(){
    int N,F[101][15],P[101][15];
    vector<int> Co(101,0);
    cin>>N;

    rep(i,N){
        rep(j,10){
            cin>>F[i][j];
            if(F[i][j])Co[i]++;
        }
    }
    rep(i,N){
        rep(j,11){
            cin>>P[i][j];
        }
    }

    //bit全探索？
    int res=-INF;
    for(int b=0;b<(1<<10);b++){//営業するしないが10回選択できるため、10**2通りある
        int cc=0;
        for(int i=0;i<N;i++){
            int c=0;
            //b>>jが日にち指定 &1でその日営業するか否か
            for(int j=0;j<10;j++)if((b>>j&1)&&F[i][j])c++;//bitの各桁が営業日を表す？
            cc+=P[i][c];
        }
        if(res<cc)res=cc;
    }
    cout<<cc<<endl;


    return 0;
}

//a=97,z=122

Compiler output:
a.cc: In function 'int main()':
a.cc:55:11: error: 'cc' was not declared in this scope
   55 |     cout<<cc<<endl;
      |           ^~
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;

int main(){
  int n;
  int shop[n]={};
  for(int i=0;i<n;i++){
    for(int j=0;j<10;j++){
      int x;
      cin >> x;
      shop[i]+=x<<j;
    }
  }
  int value[n][11];
  for(int i=0;i<n;i++){
    for(int j=0;j<11;j++){
      cin >> value[i][j];
    }
  }
  int ret = -1e9-7;
  for(int i=1;i<1<<10;i++){
    int cnt[n]={};
    int sum = 0;
    for(int j=0;j<n;j++){
      for(int k=0;k<10;k++){
        if((i>>k)%2==1 && (shop[j]>>k)==1)cnt[j]++;
      }
    }
    for(int j=0;j<n;j++){
      sum+=value[j][cnt[j]];
    }
    ret = max(ret,sum);
  }
  cout << sum << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:11: error: 'sum' was not declared in this scope
   35 |   cout << sum << endl;
      |           ^~~
Language: C++

#include<bits/stdc++.h>
#define INF 1e9
#define llINF 1e18
#define MOD 1000000007
#define pb push_back
#define mp make_pair 
#define F first
#define S second
#define ll long long
#define ull unsigned long long
#define vi vector<ll>
#define vvi vector<vi>
#define BITLE(n) (1LL<<((ll)n))
#define BITCNT(n) (__builtin_popcountll(n))
#define SUBS(s,f,t) ((s).substr((f)-1,(t)-(f)+1))
#define ALL(a) (a).begin(),(a).end()
using namespace std;
ll f[111][11];
ll p[111][12];
int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  ll n;cin>>n;
  for(int i=0;i<n;i++){
    for(int j=0;j<10;j++)cin>>f[i][j];
  }
  ll ans=-llINF;
  for(int i=0;i<n;i++)
    for(int j=0;j<11;j++)cin>>p[i][j];
  for(int i=1;i<BITLE(10);i++){
    ll sum=0;
    for(int k=0;k<n;k++){
      ll cnt=0;
      for(int j=0;j<10;j++){
	for(i&BITLE(j)&&f[k][j]){
	  cnt++;
	}	
      }
      sum+=p[k][cnt];
    }
    ans=max(ans,sum);
  }
  cout<<ans<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:32: error: expected ';' before ')' token
   35 |         for(i&BITLE(j)&&f[k][j]){
      |                                ^
      |                                ;
a.cc:38:7: error: expected primary-expression before '}' token
   38 |       }
      |       ^
a.cc:37:16: error: expected ';' before '}' token
   37 |         }
      |          ^      
      |                ;
   38 |       }
      |       ~   
a.cc:38:7: error: expected primary-expression before '}' token
   38 |       }
      |       ^
a.cc:37:16: error: expected ')' before '}' token
   37 |         }
      |          ^      
      |                )
   38 |       }
      |       ~   
a.cc:35:12: note: to match this '('
   35 |         for(i&BITLE(j)&&f[k][j]){
      |            ^
a.cc:38:7: error: expected primary-expression before '}' token
   38 |       }
      |       ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int pow2(int n){
  int t = 1;
  for(int i=0;i<n;i++){
    t *= 2;
  }
  return t;
}


int main(){
  int n;
  cin >> n;
  int f[n][10];
  long p[i][10];

  int i,j,k;
  for(i=0;i<n;i++){
    for(j=0;j<10;j++){
      cin >> f[i][j];
    }
  }
  for(i=0;i<n;i++){
    for(j=0;j<10;j++){
      cin >> p[i][j];
    }
  }
  long ans = -99999999;
  long tmp = 0;
  for(i=1;i<=1023;i++){
    tmp = 0;
    for(j=0;j<10;j++){
      if(i%pow2(j+1)>=pow2(j)){
        for(k=0;k<n;k++){
          tmp += f[n][j]*p[n][j];
        }
      }
    }
    if(tmp>ans)ans = tmp;
  }
cout << ans;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:10: error: 'i' was not declared in this scope
   16 |   long p[i][10];
      |          ^
a.cc:26:14: error: 'p' was not declared in this scope
   26 |       cin >> p[i][j];
      |              ^
a.cc:36:26: error: 'p' was not declared in this scope
   36 |           tmp += f[n][j]*p[n][j];
      |                          ^
Language: C++

#include <iostream>
#include <algorithm>
#include <bits/stdc++.h>

using namespace std;

long long s = -999999999999;
int a[25];
int N;
bool F[100][11];
long long P[100][11];

void func(void) {
	long long  sco = 0;
	bool abc = false;
	for(int i=0;i<N;i++){
		int abcd = 0;
		for(int j =0;j<10;j++) {
          
			if (a[j] == 1)abc = true;
          
			if (F[i][j] == 1)if (a[j] == 1)abcd++;
		}
		sco += P[i][abcd];
	}
  
	if(abc)ans = max(ans, sco);
}
void dfs(int pos) {
	if (pos == 10) {
		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 i=0;i<=10;i++)cin >> F[i][j];
    }
	for(int i=0;i<N;i++){
      for(int i=0;i<11;i++)cin >> P[i][j];
    }
  
	dfs(0);
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'void func()':
a.cc:27:16: error: 'ans' was not declared in this scope; did you mean 'abs'?
   27 |         if(abc)ans = max(ans, sco);
      |                ^~~
      |                abs
a.cc: In function 'int main()':
a.cc:40:11: error: expected '(' before 'int'
   40 |       for int i=0;i<=10;i++)cin >> F[i][j];
      |           ^~~
      |           (
a.cc:40:41: error: 'j' was not declared in this scope
   40 |       for int i=0;i<=10;i++)cin >> F[i][j];
      |                                         ^
a.cc:43:40: error: 'j' was not declared in this scope
   43 |       for(int i=0;i<11;i++)cin >> P[i][j];
      |                                        ^
a.cc:47:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   47 |         cout << ans << endl;
      |                 ^~~
      |                 abs
Language: C++

package main

import (
	"fmt"
	"math"
)

var shops [][]int
var ben [][]int
var n int
var ans float64

func dfs(ary []int, d int) {
	if d == 10 {
		// fmt.Printf("%v ", ary)
		var q int
		for q=0; q<10; q++ {
			if ary[q] != 0 {
				break;
			}
		}
		if q == 10 {
			return
		}
		benefit := 0
		// o_c := make([]int, 0)
		for i := 0; i < n; i++ {
			c := 0
			for j := 0; j < 10; j++ {
				if ary[j]&shops[i][j] == 1 {
					// fmt.Println("hit: %v", j)
					c++
				}
			}
			benefit += ben[i][c]
			// o_c = append(o_c, ben[i][c])
		}
		if ans <= float64(benefit) {
			// if benefit == 0 {
			// 	fmt.Println(ary)
			// 	fmt.Println(ben)
			// }
			// fmt.Println(ary)
			ans = float64(benefit)
		}
		// fmt.Printf("%v\n", benefit)
		return
	}
	ary = append(ary, 0)
	dfs(ary, d+1)
	ary = ary[:len(ary)-1]
	ary = append(ary, 1)
	dfs(ary, d+1)
}

func main() {
	ans := math.MinInt32
	fmt.Scan(&n)
	shops = make([][]int, n)
	for i := 0; i < n; i++ {
		shops[i] = make([]int, 10)
		for j:=0; j<10; j++ {
			fmt.Scan(&shops[i][j])
		}
	}

	ben = make([][]int, n)
	for i := 0; i < n; i++ {
		ben[i] = make([]int, 11)
		for j:=0; j<11; j++ {
			fmt.Scan(&ben[i][j])
		}
	}
	// ary := make([]int, 0)
	// for i:=0; i<n; i++ {
	// 	for j:=0; j<10; j++ {
	// 		fmt.Printf("%v ", shops[i][j])
	// 	}
	// 	fmt.Print("\n")
	// }
	// dfs(ary, 0)
	for b:=uint16(1); b<(1<<10); b++ {
		cc := 0
		for i:=0; i<n; i++ {
			c := 0
			for j:=uint16(0); j<10; j++ {
				if (b>>j&1) & uint16(shops[i][j]) > 0{
					c++
				}
			}
			cc += ben[i][c]
		}
		if ans < cc {
			ans = cc
		}
		// ans = math.Max(float64(cc), ans)
	}
	fmt.Println(ans)
}


Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
a.cc:56:1: error: 'func' does not name a type
   56 | func main() {
      | ^~~~
Language: C++

#include <cstdio>
int N;
int F[100][14]; int P[100][15]; int main ()
{
scanf("%d",&N); for(int i=0;i<N;i++) {
for(int j=0;j<10;j++)scanf("%d",&F[i][j]);
}
for(int i=0;i<N;i++)for(int j=0;j<11;j++)scanf("%d",&P[i][j]); int res = -(1 < <30);
for(int b=1;b<(1<<10);b++)
{
int cc =0;
for(int i=0;i<N;i++) {
int c=0;
for(int j=0;j<10;j++)if((b>>j&1)&&F[i][j])c++; cc+=P[i][c];
} if(res<cc)res=cc;
} printf("%d\n",res);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:80: error: expected primary-expression before '<' token
    8 | for(int i=0;i<N;i++)for(int j=0;j<11;j++)scanf("%d",&P[i][j]); int res = -(1 < <30);
      |                                                                                ^
Language: C++

#include <cstdio > int N;
int F[100][14]; int P[100][15]; int main ()
{
scanf("%d",&N); for(int i=0;i<N;i++) {
for(int j=0;j<10;j++)scanf("%d",&F[i][j]);
}
for(int i=0;i<N;i++)for(int j=0;j<11;j++)scanf("%d",&P[i][j]); int res = -(1 < <30);
for(int b=1;b<(1<<10);b++)
{
int cc =0;
for(int i=0;i<N;i++) {
int c=0;
for(int j=0;j<10;j++)if((b>>j&1)&&F[i][j])c++; cc+=P[i][c];
} if(res<cc)res=cc;
} printf("%d\n",res);
}

Compiler output:
a.cc:1:20: warning: extra tokens at end of #include directive
    1 | #include <cstdio > int N;
      |                    ^~~
a.cc:1:10: fatal error: cstdio : No such file or directory
    1 | #include <cstdio > int N;
      |          ^~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#define FOR(i,a,b) for (int i = (a); i < (b); ++i)
#define RFOR(i,a,b) for (int i = (b)-1; i >= (a); --i)
#define REP(i,n) FOR(i,0,(n))
#define REPS(i,n) FOR(i,1,(n)+1)
#define RREP(i,n) RFOR(i,0,(n))
#define ALL(x) (x).begin(),(x).end()
#define RALL(x) (x).rbegin(),(x).rend()
#define DEBUG(x)  cout << #x << " = " << (x) << endl;
#define SORT(x) sort(ALL(x));
#define RSORT(x) sort(RALL(x));
#define SUM(x) accumulate(ALL(x),0);
#define FI first
#define SE second
#define PB push_back
#define EB emplace_back
#define SZ(x) (int)(x).size()
#define BN(x) ((1<<x)-1)
#define DUP(x,y) (((x)+(y)-1)/(y))
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
using tiii = tuple<int, int, int>;
const ll mod = 1e9+7;
const int INF = (1<<30)-1;
const ll INFLL = (1LL<<62)-1;
const int dx[4] = {1,0,-1,0};
const int dy[4] = {0,1,0,-1};
//cout << fixed << setprecision(10);

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }

ll gcd(ll a, ll b) { return b ? gcd(b,a%b) : a;}
ll lcm(ll a, ll b) { return a/gcd(a,b)*b;}

int N;
int F[110][15];
int P[110][15];

void func() {
  scanf("%d",&N);
  REP(i,N) {
    REP(j,10) {
      scanf("%d",&F[i][j]);
    }
  }
  
  REP(i,N) {
    REP(j,11) {
      scanf("%d",&P[i][j]);
    }
  }

  int res = -(1<<30);
  FOR(b,1,1<<10) {
    int cc = 0;
    REP(i,N) {
      int c = 0;
      REP(j,10) {
        if ((b>>j&1) && F[i][j]) c++;
      }
      cc += P[i][c];
    }
    if (res<cc) res = cc;
  }
  printf("%d\n",res);
}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include<cstdio>
int n;
int f[100][14];
int p[100][15];

int main() {
	scanf_s("%d", &n);
	for (int i = 0; i < n; i++)for (int j = 0; j < 10; j++)scanf_s("%d", &f[i][j]);
	for (int i = 0; i < n; i++)for (int j = 0; j < 11; j++) scanf_s("%d", &p[i][j]);
	int res = -(1 << 30);
	for (int b = 1; b < (1 << 10); b++) {
		int cc = 0;
		for (int i = 0; i < n; i++) {
			int c = 0;
			for (int j = 0; j < 10; j++)if ((b >> j & 1) && f[i][j])c++;
			cc += p[i][c];
		}
		if (res < cc)res = cc;
	}
	printf("%d\n", res);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    7 |         scanf_s("%d", &n);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <iostream>
#include <bitset>
#include <limit.h>

using namespace std;

int N;
int F[100][10];
int P[100][11];

int main(){
    long long max = LLONG_MIN;
    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];
        }
    }
    int count;
    long long m;
    for(int i=1;i<1024;i++){
        bitset<10> bs(i);
        m = 0;
        for(int j=0;j<N;j++){
            count = 0;
            for(int k=0;k<10;k++){
                if(bs[k] && F[j][k]==1) count++;
            }
            m += P[j][count];
        }
        if(m > max) max = m;
    }
    cout << max << endl;
    return 0;
}

Compiler output:
a.cc:3:10: fatal error: limit.h: No such file or directory
    3 | #include <limit.h>
      |          ^~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <bitset>
#include <limits>

using namespace std;

int N;
int F[100][10];
int P[100][11];

int main(){
    long long max = LLONG_MIN;
    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];
        }
    }
    int count;
    long long m;
    for(int i=1;i<1024;i++){
        bitset<10> bs(i);
        m = 0;
        for(int j=0;j<N;j++){
            count = 0;
            for(int k=0;k<10;k++){
                if(bs[k] && F[j][k]==1) count++;
            }
            m += P[j][count];
        }
        if(m > max) max = m;
    }
    cout << max << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: 'LLONG_MIN' was not declared in this scope
   12 |     long long max = LLONG_MIN;
      |                     ^~~~~~~~~
a.cc:4:1: note: 'LLONG_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    3 | #include <limits>
  +++ |+#include <climits>
    4 |
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<cmath>
#include<functional>
#include<map>
#include<cstdlib>
#include<complex>
#include<numeric>
#include<set>
#include<cstdio>

using namespace std;
using Int = long long;
Int INF = 1LL << 60;
const Int MOD = 1000000007;

int main() {

	cin.tie(nullptr);
	ios::sync_with_stdio(false);

	int N;
	cin >> N;

	vector<vector<int>> F(N, vector<int>(10, 0));
	for (Int i = 0; i < N; i++) {
		for (Int j = 0; j < 10; j++) {
			//cin >> F[i][j];
			scanf_s("%d", &F[i][j]);
		}
	}

	vector<vector<Int>> P(N, vector<Int>(11, 0));
	for (Int i = 0; i < N; i++) {
		for (Int j = 0; j < 11; j++) {
			cin >> P[i][j];
		}
	}

	Int ans = -INF;
	Int temp;
	Int count;
	for (Int bit = 1; bit < (1LL<<10); bit++) {
		temp = 0;
		for (Int i = 0; i < N; i++) {
			count = 0;
			for (Int j = 0; j < 10; j++) {
				if ((bit >> j & 1) && F[i][j]) {
					count++;
				}
			}
			temp += P[i][count];
		}
		ans = max(ans, temp);
	}

	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:25: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   31 |                         scanf_s("%d", &F[i][j]);
      |                         ^~~~~~~
      |                         scanf
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<cmath>
#include<functional>
#include<map>
#include<cstdlib>
#include<complex>
#include<numeric>
#include<set>
#include<stdio.h>

using namespace std;
using Int = long long;
Int INF = 1LL << 60;
const Int MOD = 1000000007;

int main() {

	cin.tie(nullptr);
	ios::sync_with_stdio(false);

	int N;
	cin >> N;

	vector<vector<int>> F(N, vector<int>(10, 0));
	for (Int i = 0; i < N; i++) {
		for (Int j = 0; j < 10; j++) {
			//cin >> F[i][j];
			scanf_s("%d", &F[i][j]);
		}
	}

	vector<vector<Int>> P(N, vector<Int>(11, 0));
	for (Int i = 0; i < N; i++) {
		for (Int j = 0; j < 11; j++) {
			cin >> P[i][j];
		}
	}

	Int ans = -INF;
	Int temp;
	Int count;
	for (Int bit = 1; bit < (1LL<<10); bit++) {
		temp = 0;
		for (Int i = 0; i < N; i++) {
			count = 0;
			for (Int j = 0; j < 10; j++) {
				if ((bit >> j & 1) && F[i][j]) {
					count++;
				}
			}
			temp += P[i][count];
		}
		ans = max(ans, temp);
	}

	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:25: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   31 |                         scanf_s("%d", &F[i][j]);
      |                         ^~~~~~~
      |                         scanf
Language: C++

# include < cstdio >
int N ;
int F [100][14];
int P [100][15];
int main ()
{
scanf ("% d " ,& N );
for ( int i =0; i < N ; i ++)
{
for ( int j =0; j <10; j ++) scanf ("% d " ,& F [ i ][ j ]);
}
for ( int i =0; i < N ; i ++) for ( int j =0; j <11; j ++) scanf ("% d " ,& P [ i ][ j ]);
int res = -(1 < <30);
for ( int b =1; b <(1 < <10); b ++)
{
int cc =0;
for ( int i =0; i < N ; i ++)
{
int c =0;
for ( int j =0; j <10; j ++) if (( b > > j &1)&& F [ i ][ j ]) c ++;
cc += P [ i ][ c ];
}
if ( res < cc ) res = cc ;
}
printf ("% d \ n " , res );
}

Compiler output:
a.cc:1:11: fatal error:  cstdio : No such file or directory
    1 | # include < cstdio >
      |           ^~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
# include < cstdio >
int N ;
int F [100][14];
int P [100][15];
int main ()
{
scanf ("% d " ,& N );
for ( int i =0; i < N ; i ++)
{
for ( int j =0; j <10; j ++) scanf ("% d " ,& F [ i ][ j ]);
}
for ( int i =0; i < N ; i ++) for ( int j =0; j <11; j ++) scanf ("% d " ,& P [ i ][ j ]);
int res = -(1 < <30);
for ( int b =1; b <(1 < <10); b ++)
{
int cc =0;
for ( int i =0; i < N ; i ++)
{
int c =0;
for ( int j =0; j <10; j ++) if (( b > > j &1)&& F [ i ][ j ]) c ++;
cc += P [ i ][ c ];
}
if ( res < cc ) res = cc ;
}
printf ("% d \ n " , res );
}

Compiler output:
a.cc:3:11: fatal error:  cstdio : No such file or directory
    3 | # include < cstdio >
      |           ^~~~~~~~~~
compilation terminated.
Language: C++

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <list>
#include <queue>
#include <deque>
#include <algorithm>
#include <numeric>
#include <utility>
#include <complex>
#include <functional>
using namespace std;
const int MOD = 1000000007;
typedef long long ll;
typedef pair<ll, ll> p;
const int INF = (1 << 28);
const int dx[4] = {0, 1, 0, -1}, dy[4] = {-1, 0, 1, 0};
const int Dx[8] = {0, 1, 1, 1, 0, -1, -1, -1}, Dy[8] = {-1, -1, 0, 1, 1, 1, 0, -1};
#define yes cout << "Yes" << endl
#define YES cout << "YES" << endl
#define no cout << "No" << endl
#define NO cout << "NO" << endl
#define rep(i, n) for (int i = 0; i < n; i++)
#define repr(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
int n;
int f[100][14];
int p[100][15];
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> n;
    rep(i, n)
    {
        rep(j, 10)
        {
            cin >> f[i][j];
        }
    }
    rep(i, n)
    {
        rep(j, 11)
        {
            cin >> p[i][j];
        }
    }
    int ans = -(1 << 30);
    for (int b = 1; b < (1 << 10); b++)
    {
        int sum = 0;
        rep(i, n)
        {
            int count = 0;
            rep(j, 10)
            {
                if ((b >> j & 1) && f[i][j])
                    count++;
            }
            sum += p[i][c];
        }
        ans = max(ans, sum);
    }
    cout << ans << "\n";
}

Compiler output:
a.cc:37:14: error: 'int p [100][15]' redeclared as different kind of entity
   37 | int p[100][15];
      |              ^
a.cc:22:22: note: previous declaration 'typedef struct std::pair<long long int, long long int> p'
   22 | typedef pair<ll, ll> p;
      |                      ^
a.cc: In function 'int main()':
a.cc:54:21: error: expected primary-expression before '[' token
   54 |             cin >> p[i][j];
      |                     ^
a.cc:69:21: error: expected primary-expression before '[' token
   69 |             sum += p[i][c];
      |                     ^
a.cc:69:25: error: 'c' was not declared in this scope
   69 |             sum += p[i][c];
      |                         ^
Language: Java

import java.util.Scanner;
public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[][] F = new int[N][10];
		int[][] P = new int[N][11];
		int ans = Integer.MIN_VALUE;
		for(int i = 0; i < N; i++) {
			for(int j = 0; j < 10; j++)
				F[i][j] = sc.nextInt();
		}
		for(int i = 0; i < N; i++) {
			for(int j = 0; j < 11; j++)
				P[i][j] = sc.nextInt();
		}

      for(int i = 1; i < 1 << 10; i++) {
			int sum = 0;
			for(int j = 0; j < N; j++) {
				int count = 0;
				for(int k = 0; k < 10; k++) {
					if((1 & (i >> k)) = 1 && F[j][k] == 1)
						count++;
				}
				sum += P[j][count];
			}
			ans = Math.max(ans, sum);
		}
		System.out.println(ans);
	}

}


Compiler output:
Main.java:24: error: unexpected type
					if((1 & (i >> k)) = 1 && F[j][k] == 1)
					      ^
  required: variable
  found:    value
Main.java:24: error: bad operand types for binary operator '&&'
					if((1 & (i >> k)) = 1 && F[j][k] == 1)
					                      ^
  first type:  int
  second type: boolean
2 errors
Language: C++

#include <stdio.h>
int main(void){
	int n;
  	scanf("%d",&n);
  	int* f=new int[n][10];
	int* p=new int[n][11];
  	for(int i=0;i<n;i++){
    	for(int j=1;j<10;j++){
            	scanf("%d",&f[i][j]);
        }
    }
   for(int i=0;i<n;i++){
    	for(int j=0;j<11;j++){
          scanf("%d",&p[i][j]);
        }
   }
int c=0,sum=0,ans=0;
 for(int k=0;k<10000;k++){
  for(int i=0;i<n;i++){
    	for(int j=0;j<10;j++){
 			if(f[i][j]==1)c++;
        }
    	sum+=p[i][c];
    }
	if(ans<sum)ans=sum;
 }
printf("%d",sum);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:29: error: cannot convert 'int (*)[10]' to 'int*' in initialization
    5 |         int* f=new int[n][10];
      |                             ^
      |                             |
      |                             int (*)[10]
a.cc:6:29: error: cannot convert 'int (*)[11]' to 'int*' in initialization
    6 |         int* p=new int[n][11];
      |                             ^
      |                             |
      |                             int (*)[11]
a.cc:9:33: error: invalid types 'int[int]' for array subscript
    9 |                 scanf("%d",&f[i][j]);
      |                                 ^
a.cc:14:27: error: invalid types 'int[int]' for array subscript
   14 |           scanf("%d",&p[i][j]);
      |                           ^
a.cc:21:32: error: invalid types 'int[int]' for array subscript
   21 |                         if(f[i][j]==1)c++;
      |                                ^
a.cc:23:18: error: invalid types 'int[int]' for array subscript
   23 |         sum+=p[i][c];
      |                  ^
Language: C++

#include <stdio.h>
int main(void){
	int n;
  	scanf("%d",&n);
  	int f[100][10];
	int p[100][11];
  	for(int i=0;i<n;i++){
    	for(int j=1;j<10;j++){
            	scanf("%d",f[i][j]);
        }
    }
   for(int i=0;i<n;i++){
    	for(int j=0;j<11;j++){
          scanf("%d",p[i][j]);
        }
   }
int c=0,sum=0,ans=0;
 for(int k=0;k<10000;k++)
  for(int i=0;i<n;i++){
    	for(int j=0;j<11;j++){
 			if(f[i][j]==1)c++;
        }
    	sum+=p[i][c];
    }
	if(ans<sum)ans=sum;
 }
printf("%d",sum);
}
 

Compiler output:
a.cc:27:7: error: expected constructor, destructor, or type conversion before '(' token
   27 | printf("%d",sum);
      |       ^
a.cc:28:1: error: expected declaration before '}' token
   28 | }
      | ^
Language: C++

#include <stdio.h>
int main(void){
	int n;
  	scanf("%d",&n);
  	int f[100][10];
	int p[100][11];
  	for(int i=0;i<n;i++){
    	for(int j=1;j<10;j++){
            	scanf("%d",&f[i][j]);
        }
    }
   for(int i=0;i<n;i++){
    	for(int j=0;j<11;j++){
          scanf("%d",&p[i][j]);
        }
   }
int c=0,sum=0,ans=0;
 for(int k=0;k<10000;k++)
  for(int i=0;i<n;i++){
    	for(int j=0;j<11;j++){
 			if(f[i][j]==1)c++;
        }
    	sum+=p[i][c];
    }
	if(ans<sum)ans=sum;
 }
printf("%d",sum);
}
 

Compiler output:
a.cc:27:7: error: expected constructor, destructor, or type conversion before '(' token
   27 | printf("%d",sum);
      |       ^
a.cc:28:1: error: expected declaration before '}' token
   28 | }
      | ^
Language: C++

#include <stdio.h>
int main(void){
	int n;
  	scanf("%d",&n);
  	int f[100][10];
	int p[100][11];
  	for(int i=0;i<n;i++){
    	for(int j=1;j<10;j++){
            	scanf("%d",&f[i][j]);
        }
    }
   for(int i=0;i<n;i++){
    	for(int j=0;j<11;j++){
          scanf("%d",&p);
        }
   }
int c=0,sum=0,ans=0;
 for(int k=0;k<10000;k++)
  for(int i=0;i<n;i++){
    	for(int j=0;j<11;j++){
 			if(f[i][j]==1)c++
        }
    	sum+=p[i][c]
    }
	if(ans<sum)ans=sum;
 }
printf("%d",sum);
}
 

Compiler output:
a.cc: In function 'int main()':
a.cc:21:42: error: expected ';' before '}' token
   21 |                         if(f[i][j]==1)c++
      |                                          ^
      |                                          ;
   22 |         }
      |         ~                                 
a.cc:23:21: error: expected ';' before '}' token
   23 |         sum+=p[i][c]
      |                     ^
      |                     ;
   24 |     }
      |     ~                
a.cc: At global scope:
a.cc:27:7: error: expected constructor, destructor, or type conversion before '(' token
   27 | printf("%d",sum);
      |       ^
a.cc:28:1: error: expected declaration before '}' token
   28 | }
      | ^
Language: C++

#include <stdio.h>
int main(void){
	int n;
  	scanf("%d",&n);
  	int* f=new int[n][10];
	int* p=new int[n][11];
  	for(int i=0;i<n;i++){
    	for(int j=1;j<10;j++){
            	scanf("%d",&f[i][j]);
        }
    }
   for(int i=0;i<n;i++){
    	for(int j=0;j<11;j++){
          scanf("%d",&p);
        }
   }
int c=0,sum=0,ans=0;
 for(int k=0;k<10000;k++)
  for(int i=0;i<n;i++){
    	for(int j=0;j<11;j++){
 			if(f[i][j]==1)c++
        }
    	sum+=p[i][c]
    }
	if(ans<sum)ans=sum;
 }
printf("%d",sum);
}



Compiler output:
a.cc: In function 'int main()':
a.cc:5:29: error: cannot convert 'int (*)[10]' to 'int*' in initialization
    5 |         int* f=new int[n][10];
      |                             ^
      |                             |
      |                             int (*)[10]
a.cc:6:29: error: cannot convert 'int (*)[11]' to 'int*' in initialization
    6 |         int* p=new int[n][11];
      |                             ^
      |                             |
      |                             int (*)[11]
a.cc:9:33: error: invalid types 'int[int]' for array subscript
    9 |                 scanf("%d",&f[i][j]);
      |                                 ^
a.cc:21:32: error: invalid types 'int[int]' for array subscript
   21 |                         if(f[i][j]==1)c++
      |                                ^
a.cc:21:42: error: expected ';' before '}' token
   21 |                         if(f[i][j]==1)c++
      |                                          ^
      |                                          ;
   22 |         }
      |         ~                                 
a.cc:23:18: error: invalid types 'int[int]' for array subscript
   23 |         sum+=p[i][c]
      |                  ^
a.cc: At global scope:
a.cc:27:7: error: expected constructor, destructor, or type conversion before '(' token
   27 | printf("%d",sum);
      |       ^
a.cc:28:1: error: expected declaration before '}' token
   28 | }
      | ^
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <list>

using namespace std;
#define rep(i, n) for(int i = 0; i < (int)(n); ++i)
typedef long long ll;

int main() {
    int n;
    cin >> n;
    vector<vector<int>> P(n, vector<int>(11)), F(n, vector<int>(10));
    rep(i, n) rep(j, 10) cin >> F[i][j];
    rep(i, n) rep(j, 11) cin >> P[i][j];
    int ans = -INT_MAX;
    //cout << ans << endl;
    for(int i = 1; i < 1 << 10; i++) {
        int ansi = 0;
        rep(shop, n) {
            int cnt = 0;
            rep(j, 10) {
                //cout << time + day*2 << endl;
                if(i & (1 << j)) {
                    if(F[shop][j]) cnt += 1;
                }
            }
            //if(i == 32) cout << "cnt: " << cnt << " benefit:" << P[shop][cnt] <<endl;
            ansi += P[shop][cnt];
        }

        //cout << " ansi: " << ansi << " i: " << i << endl;
        //cout << endl;
        ans = max(ans, ansi);
    }

    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:16: error: 'INT_MAX' was not declared in this scope
   21 |     int ans = -INT_MAX;
      |                ^~~~~~~
a.cc:10:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    9 | #include <list>
  +++ |+#include <climits>
   10 |