Language: C++

const int pannels=16;
const int bits=2<<pannels;
int DP[bits+1][31]={};
int main(){
  while(true){
  int n,c,tmp;
  cin >> n >> c; 
  if(n==0)
    break;
  queue<bitset<pannels> > qoo[2];
  vector<bitset<pannels> > light;
  vector<bitset<pannels> > push;
  for(int i=0;i<bits;i++)
    for(int j=0;j<31;j++)
      DP[i][j]=0;

  for(int i=0;i<n;i++){
    light.push_back(bitset<pannels>(0));
    for(int j=0;j<pannels;j++){
    cin >> tmp;
    light[i].set(j,tmp);
    }
  }
  for(int i=0;i<c;i++){
    push.push_back(bitset<pannels>(0));
    for(int j=0;j<pannels;j++){
    cin >> tmp;
    push[i].set(j,tmp);
    }
  }
  bitset<pannels> lig(0),score(0),get(0);
  for(int i=0;i<c;i++){
    lig=light[0]^(light[0]&push[i]);
    get=light[0]&push[i];
    // cout << lig << endl;
    if(!DP[lig.to_ulong()][0]){
      qoo[1].push(lig);
    }
    DP[lig.to_ulong()][0]=max((int)get.count(),DP[lig.to_ulong()][0]);
  }
  for(int i=1;i<n;i++){
    while(!qoo[i%2].empty()){
      score=qoo[i%2].front();
      //  cout << score << endl;
      qoo[i%2].pop();
      for(int k=0;k<c;k++){
	lig=(score|light[i])^(push[k]&(score|light[i]));
	get=(score|light[i])&push[k];
	if(DP[lig.to_ulong()][i])
	  qoo[(i+1)%2].push(lig);
	DP[lig.to_ulong()][i]=max((int)bitset<pannels>(get).count()+DP[score.to_ulong()][i-1],DP[lig.to_ulong()][i]);
      }
    }
  }
  int ans=0;
  for(int i=0;i<bits;i++)
      ans=max(ans,DP[i][n-1]);
  cout << ans << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> n >> c;
      |   ^~~
a.cc:10:3: error: 'queue' was not declared in this scope
   10 |   queue<bitset<pannels> > qoo[2];
      |   ^~~~~
a.cc:10:9: error: 'bitset' was not declared in this scope; did you mean 'bits'?
   10 |   queue<bitset<pannels> > qoo[2];
      |         ^~~~~~
      |         bits
a.cc:10:25: error: expected primary-expression before '>' token
   10 |   queue<bitset<pannels> > qoo[2];
      |                         ^
a.cc:10:27: error: 'qoo' was not declared in this scope
   10 |   queue<bitset<pannels> > qoo[2];
      |                           ^~~
a.cc:11:3: error: 'vector' was not declared in this scope
   11 |   vector<bitset<pannels> > light;
      |   ^~~~~~
a.cc:11:26: error: expected primary-expression before '>' token
   11 |   vector<bitset<pannels> > light;
      |                          ^
a.cc:11:28: error: 'light' was not declared in this scope
   11 |   vector<bitset<pannels> > light;
      |                            ^~~~~
a.cc:12:26: error: expected primary-expression before '>' token
   12 |   vector<bitset<pannels> > push;
      |                          ^
a.cc:12:28: error: 'push' was not declared in this scope
   12 |   vector<bitset<pannels> > push;
      |                            ^~~~
a.cc:31:19: error: 'lig' was not declared in this scope
   31 |   bitset<pannels> lig(0),score(0),get(0);
      |                   ^~~
a.cc:31:26: error: 'score' was not declared in this scope
   31 |   bitset<pannels> lig(0),score(0),get(0);
      |                          ^~~~~
a.cc:31:35: error: 'get' was not declared in this scope
   31 |   bitset<pannels> lig(0),score(0),get(0);
      |                                   ^~~
a.cc:39:27: error: 'max' was not declared in this scope
   39 |     DP[lig.to_ulong()][0]=max((int)get.count(),DP[lig.to_ulong()][0]);
      |                           ^~~
a.cc:51:31: error: 'max' was not declared in this scope
   51 |         DP[lig.to_ulong()][i]=max((int)bitset<pannels>(get).count()+DP[score.to_ulong()][i-1],DP[lig.to_ulong()][i]);
      |                               ^~~
a.cc:57:11: error: 'max' was not declared in this scope
   57 |       ans=max(ans,DP[i][n-1]);
      |           ^~~
a.cc:58:3: error: 'cout' was not declared in this scope
   58 |   cout << ans << endl;
      |   ^~~~
a.cc:58:18: error: 'endl' was not declared in this scope
   58 |   cout << ans << endl;
      |                  ^~~~