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

//
#include <vector>
#include <set>
#include <array>
#include <iostream>
//
#include <cstdio>
#include <cstdint>
//
using ll = long long;
using namespace std;
//
void yes(bool cond) { cond ? puts("Yes") : puts("No"); }

//
class Init
{
public:
    Init()
    {
        cin.tie(0);
        ios::sync_with_stdio(false);
    }
}init;

//
void main()
{
    //
    ll w, h, k;
    cin >> h;
    cin >> w;
    cin >> k;
    vector<bool> table;
    for (int32_t i = 0; i < h; ++i)
    {
        for (int32_t j = 0; j < w; ++j)
        {
            char ch;
            cin >> ch;
            table.push_back((ch == '#'));
        }
    }

    const auto checkTable = [&](ll xb, ll yb)
    {
        ll cnt = 0;
        for (int32_t y = 0; y < h; ++y)
        {
            for (int32_t x = 0; x < w; ++x)
            {
                if (((xb >> x) % 2) && ((yb >> y) % 2))
                {
                    cnt += table[x + y * w] ? 1 : 0;
                }
            }
        }
        return cnt == k;
    };

    // 全探索
    ll ybm = (1 << h);
    ll xbm = (1 << w);
    ll okay = 0;
    for (ll yb=0;yb<ybm;++yb)
    {
        for (ll xb = 0; xb < xbm; ++xb)
        {
            if (checkTable(xb, yb))
            {
                ++okay;
            }
        }
    }
    cout << okay;
    puts("FUCK");
    cin >> okay;
}

Compiler output:
a.cc:27:1: error: '::main' must return 'int'
   27 | void main()
      | ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <cmath>
#include <string>

using namespace std;

void showTable(vector<vector<int> > c){
    for(int i = 0; i < c.size(); ++i){
        for(int j = 0; j < c[i].size(); ++j)
            cout << c[i][j];
        cout << endl;
    }
}

string binary(int x, int size){
    string b;
    for(int i = 0; i < size; ++i){
        if((x >> i) % 2 == 1)
            b.push_back('1');
        else
            b.push_back('0');
    }
    reverse(b.begin(), b.end());
    return b;
}

int main(){
    
    int H(0), W(0), K(0);
    vector<vector<int> > c;
    cin >> H >> W >> K;
    int answer(0);
    
    //cout << "\ncreate table" << endl;
    
    for(int i = 0; i < H; ++i){
        vector<int> v;
        string t;
        //cout << i + 1 << " row input : ";
        cin >> t;
        cout << t << endl;
        for(int j = 0; j < W; ++j){
            if(t[j] == '.')
                v.push_back(0);
            else{
                v.push_back(1);
            }
        }
        c.push_back(v);
    }
    
    //showTable(c);
    
    //cout << "count" << endl;
    
    int t = pow(2, W+H);
    
    for(int i = 0; i < t; ++i){
        //cout << i << " times (" << binary(i, H + W) << ")" << endl;
        int countBlack(0);
        for(int j = 0; j < H; ++j){
            if((i >> j) % 2 == 1){
                //cout << j << " ROW BREAK" << endl;
                continue;
            }
            //cout << j << " row search" << endl;
            for(int k = 0; k < W; ++k){
                if((i >> (k + H)) % 2 == 1){
                    //cout << k + H + 1 << " COL BREAK" << endl;
                    continue;
                }
                //cout << k + H + 1 << " col search" << endl;
                if(c[j][k] == 1){
                    //cout << "(j, k) = (" << j << ", " << k << ")" << endl;
                    ++countBlack;
                }
            }
        }
        //cout << i << " : " << countBlack << endl;
        if(countBlack == K)
            ++answer;
    }
    
    cout << answer << endl;
}


Compiler output:
a.cc: In function 'std::string binary(int, int)':
a.cc:24:5: error: 'reverse' was not declared in this scope
   24 |     reverse(b.begin(), b.end());
      |     ^~~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <cmath>

using namespace std;

void showTable(vector<vector<int> > c){
    for(int i = 0; i < c.size(); ++i){
        for(int j = 0; j < c[i].size(); ++j)
            cout << c[i][j];
        cout << endl;
    }
}

string binary(int x, int size){
    string b;
    for(int i = 0; i < size; ++i){
        if((x >> i) % 2 == 1)
            b.push_back('1');
        else
            b.push_back('0');
    }
    reverse(b.begin(), b.end());
    return b;
}

int main(){
    
    int H(0), W(0), K(0);
    vector<vector<int> > c;
    cin >> H >> W >> K;
    int answer(0);
    
    //cout << "\ncreate table" << endl;
    
    for(int i = 0; i < H; ++i){
        vector<int> v;
        string t;
        //cout << i + 1 << " row input : ";
        cin >> t;
        cout << t << endl;
        for(int j = 0; j < W; ++j){
            if(t[j] == '.')
                v.push_back(0);
            else{
                v.push_back(1);
            }
        }
        c.push_back(v);
    }
    
    //showTable(c);
    
    //cout << "count" << endl;
    
    int t = pow(2, W+H);
    
    for(int i = 0; i < t; ++i){
        //cout << i << " times (" << binary(i, H + W) << ")" << endl;
        int countBlack(0);
        for(int j = 0; j < H; ++j){
            if((i >> j) % 2 == 1){
                //cout << j << " ROW BREAK" << endl;
                continue;
            }
            //cout << j << " row search" << endl;
            for(int k = 0; k < W; ++k){
                if((i >> (k + H)) % 2 == 1){
                    //cout << k + H + 1 << " COL BREAK" << endl;
                    continue;
                }
                //cout << k + H + 1 << " col search" << endl;
                if(c[j][k] == 1){
                    //cout << "(j, k) = (" << j << ", " << k << ")" << endl;
                    ++countBlack;
                }
            }
        }
        //cout << i << " : " << countBlack << endl;
        if(countBlack == K)
            ++answer;
    }
    
    cout << answer << endl;
}


Compiler output:
a.cc: In function 'std::string binary(int, int)':
a.cc:23:5: error: 'reverse' was not declared in this scope
   23 |     reverse(b.begin(), b.end());
      |     ^~~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <bitset>
using namespace std;
#define rep(i,n)for(int i=0;i<()n;i++)

int main() {
	int h, w, k;
	cin >> h >> w >> k;
	vector<string> s(h);
	rep(i, h)cin >> s[i];
	int ans = 0;
	rep(is, 1 << h)rep(js, 1 << w) {
		int cnt = 0;
		rep(i, h)rep(j, w){
			if (is >> i & 1)continue;
			if (js >> j & 1)continue;
			if (s[i][j] == '#')cnt++;
		}
		if (cnt == k)ans++;
	}
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:32: error: expected primary-expression before ')' token
    5 | #define rep(i,n)for(int i=0;i<()n;i++)
      |                                ^
a.cc:11:9: note: in expansion of macro 'rep'
   11 |         rep(i, h)cin >> s[i];
      |         ^~~
a.cc:11:16: error: expected ';' before 'h'
   11 |         rep(i, h)cin >> s[i];
      |                ^
a.cc:5:33: note: in definition of macro 'rep'
    5 | #define rep(i,n)for(int i=0;i<()n;i++)
      |                                 ^
a.cc:5:34: error: expected ')' before ';' token
    5 | #define rep(i,n)for(int i=0;i<()n;i++)
      |                    ~             ^
a.cc:11:9: note: in expansion of macro 'rep'
   11 |         rep(i, h)cin >> s[i];
      |         ^~~
a.cc:11:13: error: 'i' was not declared in this scope
   11 |         rep(i, h)cin >> s[i];
      |             ^
a.cc:5:35: note: in definition of macro 'rep'
    5 | #define rep(i,n)for(int i=0;i<()n;i++)
      |                                   ^
a.cc:5:32: error: expected primary-expression before ')' token
    5 | #define rep(i,n)for(int i=0;i<()n;i++)
      |                                ^
a.cc:13:9: note: in expansion of macro 'rep'
   13 |         rep(is, 1 << h)rep(js, 1 << w) {
      |         ^~~
a.cc:13:17: error: expected ';' before numeric constant
   13 |         rep(is, 1 << h)rep(js, 1 << w) {
      |                 ^
a.cc:5:33: note: in definition of macro 'rep'
    5 | #define rep(i,n)for(int i=0;i<()n;i++)
      |                                 ^
a.cc:5:34: error: expected ')' before ';' token
    5 | #define rep(i,n)for(int i=0;i<()n;i++)
      |                    ~             ^
a.cc:13:9: note: in expansion of macro 'rep'
   13 |         rep(is, 1 << h)rep(js, 1 << w) {
      |         ^~~
a.cc:13:13: error: 'is' was not declared in this scope; did you mean 's'?
   13 |         rep(is, 1 << h)rep(js, 1 << w) {
      |             ^~
a.cc:5:35: note: in definition of macro 'rep'
    5 | #define rep(i,n)for(int i=0;i<()n;i++)
      |                                   ^
a.cc:13:28: error: 'js' was not declared in this scope; did you mean 's'?
   13 |         rep(is, 1 << h)rep(js, 1 << w) {
      |                            ^~
a.cc:5:29: note: in definition of macro 'rep'
    5 | #define rep(i,n)for(int i=0;i<()n;i++)
      |                             ^
a.cc:5:32: error: expected primary-expression before ')' token
    5 | #define rep(i,n)for(int i=0;i<()n;i++)
      |                                ^
a.cc:13:24: note: in expansion of macro 'rep'
   13 |         rep(is, 1 << h)rep(js, 1 << w) {
      |                        ^~~
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class atcoder_begin_173_C_HandV {
    public static void main(String[] args) {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        try {

            String[] str = reader.readLine().split("\s");
            int Hrow = Integer.parseInt(str[0]);
            int Wcol = Integer.parseInt(str[1]);
            int Kcnt = Integer.parseInt(str[2]);
            // int[] nums = { Integer.parseInt(str[0]), Integer.parseInt(str[1]),
            // Integer.parseInt(str[2]) };
            // 0:行H 1:列W 2:黒マスの残数K

            // H行W列の配列
            int[][] HWC = new int[Hrow][Wcol];
            // int Kcnt = 0;
            int answer = 0; // 答え 何通りあるか

            for (int i = 0; i < Hrow; i++) {
                String read = reader.readLine();
                for (int j = 0; j < Wcol; j++) {
                    if (read.charAt(j) == '#') {
                        HWC[i][j] = 1;
                    } else {
                        HWC[i][j] = 0;
                    }
                }
            }
            reader.close();
            for (int Hmask = 0; Hmask <= ((1 << Hrow) - 1); Hmask++) {
                for (int Wmask = 0; Wmask <= ((1 << Wcol) - 1); Wmask++) {
                    int Black_cnt = 0;
                    for (int i = 0; i < Hrow; i++) {
                        for (int j = 0; j < Wcol; j++) {
                            if ((((Hmask >> i) & 1) == 0) && (((Wmask >> j) & 1) == 0) && (HWC[i][j] == 1))
                                Black_cnt++;
                        }
                    }
                    if (Black_cnt == Kcnt) {
                        answer++;
                     }

                }
            }

            System.out.println(answer);

        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}


Compiler output:
Main.java:5: error: class atcoder_begin_173_C_HandV is public, should be declared in a file named atcoder_begin_173_C_HandV.java
public class atcoder_begin_173_C_HandV {
       ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int h, w, k;
  cin >> h >> w >> k;
  vector<string> G(h);
  for(int i = 0; i < h; i++) cin >> G.at(i);
  
  int ans = 0;
  // 行のboolを考える 2のｈ乗通り
  for(int i = 0; 1 << h; i++) {
    //列のbooiを考える 2のw乗通り
    for(int j = 0; 1 << w; j++) {
      int cnt = 0;
      //行を取り出してその行のboolを考える
      for(int a = 0; a < h; a++) {
        //塗られている行
        if((i >> a) & 1) continue;
        //列
        for(int b = 0; b < w; b++) {
          if(j >> b) & 1) continue;
          //ここまで来るのは塗られていない行列
          if(G.at(a).at(b) == '#') cnt++;
        }
      }
      if(cnt == k) ans++;
    }
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:24: error: lvalue required as unary '&' operand
   22 |           if(j >> b) & 1) continue;
      |                        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)

int main()
{
    int H,W,k,ans=0;
    cin>>H>>W>>k;
    vector<string> c(h);
    rep(i,H) cin>>c[i];
    rep(bith,1<<H) rep(bitw,1<<W)
    {
        int count=0;
        rep(h,H) rep(w,W)
        {
            if(bith>>h&1) continue;
            if(bitw>>w&1) continue;
            if(c[h][w]=='#') count++;
        }
        if(count==k) ans++;
    }
    cout<<ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:22: error: 'h' was not declared in this scope
    9 |     vector<string> c(h);
      |                      ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {
    int H, W, K;
    cin >> H >> W >> K;
    char g[10][10];
    bool visx[10], visy[10];
    for(int i = 0; i < H; ++i) scanf("%s", g[i]);
    int ans = 0;
    for(int mask = 1; mask < (1 << (H+W)); ++mask) {
        memset(visx, 0, sizeof(visx));
        memset(visy, 0, sizeof(visy));
        int cnt = 0;
        for(int r = 0; r < H; ++r) {
            if((1<<r) & mask) {
                visx[r] = true;
            }
        }
        for(int c = H; c < H+W; ++c) {
            if((1<<c) & mask) {
                visy[c-H] = true;
            }
        }
        for(int r = 0; r < H; ++r) {
            for(int c = 0; c < W; ++c) {
                if(g[r][c] == '#' && !visx[r] && !visy[c]))
                    ++cnt;
            }
        }
        //printf("cnt = %d\n", cnt);
        if(cnt == K) ++ans;
    }
    cout << ans << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:59: error: expected primary-expression before ')' token
   28 |                 if(g[r][c] == '#' && !visx[r] && !visy[c]))
      |                                                           ^
Language: C++

include <cstdio>
#include <cstring>
#define maxn 6
using namespace std;

char c[maxn][maxn];
int h, w, k;
int cnt = 0;

int main(int argc, char** argv)
{
	scanf("%d%d%d", &h, &w, &k);
	for(int i=0; i<h; i++)
		scanf("%s", c[i]);
	int m1 = 1 << h, m2 = 1 << w, ans = 0;
	for(int hs=0; hs<m1; hs++)
		for(int ws=0; ws<m2; ws++)
		{
			char tmp[maxn][maxn];
			memcpy(tmp, c, sizeof(c));
			for(int i=0; i<h; i++) // Row
				if(hs & (1 << i)) for(int j=0; j<w; j++) // Column
					tmp[i][j] = '.';
			for(int i=0; i<w; i++) // Column
				if(ws & (1 << i)) for(int j=0; j<h; j++) // Row
					tmp[j][i] = '.';
			int cnt = 0;
			for(int i=0; i<h; i++)
				for(int j=0; j<w; j++) if(tmp[i][j] == '#')
					cnt ++;
			if(cnt == k) ans ++;
		}
	printf("%d\n", ans);
	return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <cstdio>
      | ^~~~~~~
a.cc: In function 'int main(int, char**)':
a.cc:12:9: error: 'scanf' was not declared in this scope
   12 |         scanf("%d%d%d", &h, &w, &k);
      |         ^~~~~
a.cc:33:9: error: 'printf' was not declared in this scope
   33 |         printf("%d\n", ans);
      |         ^~~~~~
a.cc:3:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    2 | #include <cstring>
  +++ |+#include <cstdio>
    3 | #define maxn 6
Language: C++

#include <iostream>
#include <vector>
#include <string>

using namespace std;

int main() {
	int H, W, K;
	cin >> H >> W >> K;
	
	vector<string> s(H), t(H);
	for (int i = 0; i < H; i++) cin >> s[i];

	int num_of_K = 0;

	for (int i = 0; i < H; i++) {
		for (int j = 0; j < W; j++) {
			if (s[i][j] == '#') num_of_K++;
		}
	}

	int count = 0;

	for (int bit1 = 0; bit1 < (1 << H); bit1++) {
		for (int bit2 = 0; bit2 < (1 << W); bit2++) {
			int temp = num_of_K;
			t = s;
			R.assign(H, false);
			C.assign(W, false);
			for (int i = 0; i < H; i++) {
				if (bit1 & (1 << i)) {
					for (int j = 0; j < W; j++) {
						if (t[i][j] == '#') temp--;
						t[i][j] = 'r';
					}
				}
			}
			for (int j = 0; j < W; j++) {
				if (bit2 & (1 << j)) {
					for (int i = 0; i < H; i++) {
						if (t[i][j] == '#') temp--;
						t[i][j] = 'r';
					}
				}
			}
			if (temp == K) count++;
		}
	}

	cout << count << endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:25: error: 'R' was not declared in this scope
   28 |                         R.assign(H, false);
      |                         ^
a.cc:29:25: error: 'C' was not declared in this scope
   29 |                         C.assign(W, false);
      |                         ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
  int H, W, K; cin >> H >> W >> K;
  vector<vector<int>> v(H, vector<int>(W));
  for (int i = 0; i < H; i++) for (int j = 0; j < W; j++) {
    char c; cin >> c;
    v[i][j] = c == '#';
  }
  auto f = [&](int hmask, int wmask) -> int {
    int cnt = 0;
    for (int i = 0; i < H; i++) {
      if ((hmask >> i) & 1) continue;
      for (int j = j < W; j++) {
        if ((wmask >> j) & 1) continue;
        cnt += v[i][j];
      }
    }
    return cnt == K;
  };
  int res = 0;
  for (int h; h < (1 << H); h++) {
    for (int w = 0; w < (1 << W); w++) {
      res += f(h, w);
    }
  }
  cout << res << endl;
}


Compiler output:
a.cc: In lambda function:
a.cc:14:30: error: expected ';' before ')' token
   14 |       for (int j = j < W; j++) {
      |                              ^
      |                              ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
  int H, W, K; cin >> H >> W >> K;
  vector<vector<int>> v(H, vector<int>(W));
  for (int i = 0; i < H; i++) for (int j = 0; j < W; j++) {
    char c; cin >> c;
    v[i][j] = c == '#';
  auto f = [&](int hmask, int wmask) -> int {
    int cnt = 0;
    for (int i = 0; i < H; i++) {
      if ((hmask >> i) & 1) continue;
      for (int j = j < W; j++) {
        if ((wmask >> j) & 1) continue;
        cnt += v[i][j];
      }
    }
    return cnt == K;
  };
  int res = 0;
  for (int h; h < (1 << H); h++) {
    for (int w = 0; w < (1 << W); w++) {
      res += f(h, w);
    }
  }
  cout << res << endl;
}


Compiler output:
a.cc: In lambda function:
a.cc:13:30: error: expected ';' before ')' token
   13 |       for (int j = j < W; j++) {
      |                              ^
      |                              ;
a.cc: In function 'int main()':
a.cc:27:2: error: expected '}' at end of input
   27 | }
      |  ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
  int H, W, K; cin >> H >> W >> K;
  vector<vector<int>> v(H, vector<int>(W));
  auto f = [&](int hmask, int wmask) -> int {
    int cnt = 0;
    for (int i = 0; i < H; i++) {
      if ((hmask >> i) & 1) continue;
      for (int j = j < W; j++) {
        if ((wmask >> j) & 1) continue;
        cnt += v[i][j];
      }
    }
    return cnt == K;
  };
  int res = 0;
  for (int h; h < (1 << H); h++) {
    for (int w = 0; w < (1 << W); w++) {
      res += f(h, w);
    }
  }
  cout << res << endl;
}

Compiler output:
a.cc: In lambda function:
a.cc:10:30: error: expected ';' before ')' token
   10 |       for (int j = j < W; j++) {
      |                              ^
      |                              ;
Language: C

#include <stdio.h>
#include <unistd.h>
 
static const unsigned char TABLE_BITS_COUNT[] = {
  0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4,
  1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
  1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
  2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6
};
 
static const unsigned char TABLE_TRAILING_ZEROS[] = { 0, 1, 6, 2, 7, 5, 4, 3 };
 
static unsigned int
fold_bitflag_func(
  unsigned int  acc,

Compiler output:
main.c:15:3: error: expected declaration specifiers or '...' at end of input
   15 |   unsigned int  acc,
      |   ^~~~~~~~
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#include<cmath>
#include<vector>
#include<list>
#include<map>
#include<numeric>
#include<iomanip>
#define REP(i,m,n) for(int i=(int)(m);i<(int)(n);i++)
#define rep(i,n) REP(i,0,n)
#define ll long long

using namespace std;

//最大公約数
ll gcd(ll a, ll b) {
	if (b == 0) {
		return a;
	}
	return gcd(b, a % b);
}

//最小公倍数
ll lcm(ll a, ll b) {
	return a * b / gcd(a, b);
}


int main() {
	// .==黒　#==白
	int height, width;
	cin >> height >> width;
	int k;
	cin >> k;
	vector<vector<char>>box(height, vector<char>(width));
	rep(i, box.size()){
		rep(j, box[i].size()){
			cin >> box[i][j];
		}
	}

	rep(i, height){
		box[i]
	}
	rep(j, width){

	}
	rep(i, box.size()){
		rep(j, box[i].size()){
			cout << box[i][j];
		}
		cout << endl;
	}
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:44:23: error: expected ';' before '}' token
   44 |                 box[i]
      |                       ^
      |                       ;
   45 |         }
      |         ~              
a.cc:44:22: warning: ignoring return value of 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = std::vector<char>; _Alloc = std::allocator<std::vector<char> >; reference = std::vector<char>&; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
   44 |                 box[i]
      |                      ^
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:5:
/usr/include/c++/14/bits/stl_vector.h:1128:7: note: declared here
 1128 |       operator[](size_type __n) _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int numbit(int j){
    unsigned int i = static_cast<unsigned int>(j);
    i = i - ((i >> 1) & 0x55555555);
    i = (i & 0x33333333) + ((i >> 2) & 0x33333333);
    i = (i + (i >> 4)) & 0x0f0f0f0f;
    i = i + (i >> 8);
    i = i + (i >> 16);
    return static_cast<int>(i & 0x3f);
}

int main(){
    int H,W,K;
    cin >> H >> W >> K;

    string data_s;
    vector<int> data(H);

    for (int i = 0; i < H;i++){
        cin >> data_s;
        for (int j = 0; j < W;j++){
            data[i] |= (data_s.at(j) == '#');
            data[i] <<= 1;
        }
        data[i] >>= 1;
    }

    int ans = 0, numb;
    for (int i = 0; i < (1 << (H)); i++)
    {
        for (int j = 0; j < (1 << (W)); j++)
        {
            numb = 0;

            for (int k = 0; k < H;k++){
                if(!(i&(1<<k))){
                    numb += numbit((data[k] & (j^((1<<W)-1))));
                }
            }

            if(numb==K){

                ans++;
            }
        }
    }

    cout << ans << endl;
}#include <bits/stdc++.h>

using namespace std;

int numbit(int j){
    unsigned int i = static_cast<unsigned int>(j);
    i = i - ((i >> 1) & 0x55555555);
    i = (i & 0x33333333) + ((i >> 2) & 0x33333333);
    i = (i + (i >> 4)) & 0x0f0f0f0f;
    i = i + (i >> 8);
    i = i + (i >> 16);
    return static_cast<int>(i & 0x3f);
}

int main(){
    int H,W,K;
    cin >> H >> W >> K;

    string data_s;
    vector<int> data(H);

    for (int i = 0; i < H;i++){
        cin >> data_s;
        for (int j = 0; j < W;j++){
            data[i] |= (data_s.at(j) == '#');
            data[i] <<= 1;
        }
        data[i] >>= 1;
    }

    int ans = 0, numb;
    for (int i = 0; i < (1 << (H)); i++)
    {
        for (int j = 0; j < (1 << (W)); j++)
        {
            numb = 0;

            for (int k = 0; k < H;k++){
                if(!(i&(1<<k))){
                    numb += numbit((data[k] & (j^((1<<W)-1))));
                }
            }

            if(numb==K){

                ans++;
            }
        }
    }

    cout << ans << endl;
}

Compiler output:
a.cc:52:2: error: stray '#' in program
   52 | }#include <bits/stdc++.h>
      |  ^
a.cc:52:3: error: 'include' does not name a type
   52 | }#include <bits/stdc++.h>
      |   ^~~~~~~
a.cc:56:5: error: redefinition of 'int numbit(int)'
   56 | int numbit(int j){
      |     ^~~~~~
a.cc:5:5: note: 'int numbit(int)' previously defined here
    5 | int numbit(int j){
      |     ^~~~~~
a.cc:66:5: error: redefinition of 'int main()'
   66 | int main(){
      |     ^~~~
a.cc:15:5: note: 'int main()' previously defined here
   15 | int main(){
      |     ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <string.h>
using namespace std;
int main(void){
	int H;
	int W;
	int K;
	cin >> H;
	cin >> W;
	cin >> K;
	
	int count=0;
	int __count=0;
	vector<vector<char>> vec;
	for(int i=0; i<H; i++){
		for(int j=0; j<W; j++){
			cin >> vec.at(i).at(j);
		}
	}
	
	for(int i=0;i<H;i++){
		for(int j=0; j<W; j++){
			for(int k=0; k<W;k++){
				if(vec.at(i).at(k)=="#"){
					__count++;
				}
			}
			for(int k=0; k<H;k++){
				
				if(vec.at(k).at(j)=="#"){
					__count++;
				}
			}
			if(__count==K){
				count++;
			}
		}
	}
	
	cout << count << endl;
	
	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:51: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   25 |                                 if(vec.at(i).at(k)=="#"){
      |                                    ~~~~~~~~~~~~~~~^~~~~
a.cc:31:51: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   31 |                                 if(vec.at(k).at(j)=="#"){
      |                                    ~~~~~~~~~~~~~~~^~~~~
Language: C++

#include <iostream>
#include <vector>
#include <string.h>
using namespace std;
int main(void){
	int H;
	int W;
	int K;
	cin >> H;
	cin >> W;
	cin >> K;
	
	int count=0;
	int __count=0;
	vector<vector<char>> vec;
	for(int i=0; i<H; i++){
		for(int j=0; j<W; j++){
			cin >> vec.at(i).at(j);
		}
	}
	
	for(int i=0;i<H;i++){
		for(int j=0; j<W; j++){
			for(int k=0; k<W;k++){
				if(vec.at(i).at(k)=="#"){
					__count++;
				}
			}
			for(int k=0; k<H;k++){
				
				if(vec.at(k),at(j)=="#"){
					__count++;
				}
			}
			if(__count==K){
				count++;
			}
		}
	}
	
	cout << count << endl;
	
	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:51: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   25 |                                 if(vec.at(i).at(k)=="#"){
      |                                    ~~~~~~~~~~~~~~~^~~~~
a.cc:31:46: error: 'at' was not declared in this scope
   31 |                                 if(vec.at(k),at(j)=="#"){
      |                                              ^~
Language: C++

#include <iostream>
#include <string.h>
using namespace std;
int main(void){
	int H;
	int W;
	int K;
	cin >> H;
	cin >> W;
	cin >> K;
	
	int count=0;
	int __count=0;
	vector<vector<char>> vec;
	for(int i=0; i<H; i++){
		for(int j=0; j<W; j++){
			cin >> vec.at(i).at(j);
		}
	}
	
	for(int i=0;i<H;i++){
		for(int j=0; j<W; j++){
			for(int k=0; k<W;k++){
				if(vec.at(i).at(k)=="#"){
					__count++;
				}
			}
			for(int k=0; k<H;k++){
				
				if(vec.at(k),at(j)=="#"){
					__count++;
				}
			}
			if(__count==K){
				count++;
			}
		}
	}
	
	cout << count << endl;
	
	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'vector' was not declared in this scope
   14 |         vector<vector<char>> vec;
      |         ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include <string.h>
  +++ |+#include <vector>
    3 | using namespace std;
a.cc:14:23: error: expected primary-expression before 'char'
   14 |         vector<vector<char>> vec;
      |                       ^~~~
a.cc:17:32: error: 'vec' was not declared in this scope
   17 |                         cin >> vec.at(i).at(j);
      |                                ^~~
a.cc:24:36: error: 'vec' was not declared in this scope
   24 |                                 if(vec.at(i).at(k)=="#"){
      |                                    ^~~
a.cc:30:36: error: 'vec' was not declared in this scope
   30 |                                 if(vec.at(k),at(j)=="#"){
      |                                    ^~~
a.cc:30:46: error: 'at' was not declared in this scope
   30 |                                 if(vec.at(k),at(j)=="#"){
      |                                              ^~
Language: Java

import java.util.*;

public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);

        int h = sc.nextInt();
        int w = sc.nextInt();
        int k = sc.nextInt();
        int black=0;
        String[][] c = new String[h][w];
        for (int row = 0; row < h; row++) {
            for (int col = 0; col < w; col++) {
                if (c[row][col] == "#") {
                    black = black + 1;
                }
                c[row][col] = sc.next();
            }
        }
        int sum = solve(c, black, k);

        System.out.println(sum);

    }

    public static int solve(String[][] c, int black, int k) {
        int sum;

        for (int row = 0; row < String.length; row++) {
            for (int col = 0; col < String[0].length; col++) {
                if (c[row][col] == "#") {
                    black--;
                    if (black == k) {
                        sum++;
                    }
                }
                c[row][col] = "k";
            }
        }
        return sum;
    }
}

Compiler output:
Main.java:29: error: cannot find symbol
        for (int row = 0; row < String.length; row++) {
                                      ^
  symbol:   variable length
  location: class String
Main.java:30: error: cannot find symbol
            for (int col = 0; col < String[0].length; col++) {
                                    ^
  symbol:   variable String
  location: class Main
2 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int h,w,k;
  cin>>h>>w>>k;
  char s[h][w];
  for(int i=0;i<h;i++){
    for(int j=0;j<w;j++){
      cin>>s[i][j];
    }
  }
  for(int bit1=0;bit1<(1<<h);bit1++){
    for(int bit2=0;bit2<(1<<w);bit2++){
      int cnt=0;
      for(int i=0;i<h;i++){
         for(int j=0;j<w;j++){
           if(bit1&(1<<i)) continue;
           if(bit2&(1<<j)) continue;
           if(s[i][j]=='#') cnt++;
         }
      }
      if(cnt==k) ans++;
    }
  }
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:18: error: 'ans' was not declared in this scope; did you mean 'abs'?
   22 |       if(cnt==k) ans++;
      |                  ^~~
      |                  abs
a.cc:25:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   25 |   cout<<ans<<endl;
      |         ^~~
      |         abs
Language: C++

#include <iostream>
#include<vector>
#define rep(i,n) for(int i= 0;i < (n); ++i)
using namespace std;

int main() {
    int h,w,k;
    cin >> h >> w >> k;
    vector<string> s(h);
    rep(i,h) cin >> s[i];
    int ans = 0;
    rep(is,1 << h)rep(js,1<<w){
        int cnt = 0;
        rep(i,h)rep(j,w){
            if(is >> i&1)continue;
            if(js >> j&1)continue;
            if(s[i][j]== '#') cnt++;
        }
        if(cnt == k) ans++;
    }
    cout << ans << endl;
    return 0
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:13: error: expected ';' before '}' token
   22 |     return 0
      |             ^
      |             ;
   23 | }
      | ~
Language: C++

#include<bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
using namespace std;

int main(){
  int n;
  cin >> n;
  vector<int> a(n);
  rep(i,n) cin >> a[i];
  sort(a.rbegin(), a.rend());
  long long ans = 0;
  rep(i, n){
    int lim = 2;
    if(i == 0) lim = 1;
    rep(j, lim){
      if(t > 0){
        ans += a[i];
        t--;
      }
    }
  }
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:10: error: 't' was not declared in this scope
   16 |       if(t > 0){
      |          ^
Language: C

#include <stdio.h> 
int pow2(int n){
  int a = 1;
  for(int i = 0;i < n;i++){
    a = a*2;
  }
  return a;
}
 
void makeBinary(int num, int digit, int array[digit]) {
  int copiedNum = num;
  for (int i = digit - 1; i >= 0; i--) {
  	if (copiedNum >= pow2(i)) {
  	  array[i] = 1;
  	  copiedNum -= pow2(i);
	} else {
  	 array[i] = 0;
    }
  }
}
 
 
int main(void){
  int H, W, K;
  scanf("%d",&H);
  scanf("%d",&W);
  scanf("%d",&K);
 
  int matrix[W][H];
  for(int y = 0;y < H;y++){
	char str[256];
    scanf("%s",str);
    for(int x = 0;x < W;x++){
      matrix[x][y] = str[x] == '#';
    }
  }
  int answer = 0;
  for(int permY = 0;permY < pow2(H);permY++){
    int binaryY[H];
    makeBinary(permY,H,binaryY);
    for(int permX = 0;permX < pow2(W);permX++){
      int binaryX[W];
      makeBinary(permX,W,binaryX);
 	  int result = 0;
  	  for (int y = 0; y < H; y++) {
        for (int x = 0; x < W; x++) {
        result += matrix[x][y] && binaryX[x] && binaryY[y];
        }
      }
      answer += result == K
    }
  }
  printf("%d",answer);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:50:28: error: expected ';' before '}' token
   50 |       answer += result == K
      |                            ^
      |                            ;
   51 |     }
      |     ~
Language: C

#include <stdio.h> 
int pow2(int n){
  int a = 1;
  for(int i = 0;i < n;i++){
    a = a*2;
  }
  return a;
}
 
void makeBinary(int num, int digit, int array[digit]) {
  int copiedNum = num;
  for (int i = digit - 1; i >= 0; i++) {
  	if (copiedNum >= pow2(i)) {
  	  array[i] = 1;
  	  copiedNum -= pow2(i);
	} else {
  	 array[i] = 0;
    }
  }
}
 
 
int main(void){
  int H, W, K;
  scanf("%d",&H);
  scanf("%d",&W);
  scanf("%d",&K);
 
  int matrix[W][H];
  for(int y = 0;y < H;y++){
	char str[256];
    scanf("%s",str);
    for(int x = 0;x < W;x++){
      matrix[x][y] = str[x] == '#';
    }
  }
  int answer = 0;
  for(int permY = 0;permY < pow2(H);permY++){
    int binaryY[H];
    makeBinary(permY,H,binaryY);
    for(int permX = 0;permX < pow2(W);permX++){
      int binaryX[W];
      makeBinary(permX,W,binaryX);
 	  int result = 0;
  	  for (int y = 0; y < H; y++) {
        for (int x = 0; x < W; x++) {
        result += matrix[x][y] && binaryX[x] && binaryY[y];
        }
      }
      answer += result == K
    }
  }
  printf("%d",answer);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:50:28: error: expected ';' before '}' token
   50 |       answer += result == K
      |                            ^
      |                            ;
   51 |     }
      |     ~
Language: C

#include <stdio.h> 
int pow2(int n){
  int a = 1;
  for(int i = 0;i < n;i++){
    a = a*2;
  }
  return a;
}
 
void makeBinary(int num, int digit, int* array[digit]) {
  int copiedNum = num;
  for (int i = digit - 1; i >= 0; i++) {
  	if (copiedNum >= pow2(i)) {
  	  array[i] = 1;
  	  copiedNum -= pow2(i);
	} else {
  	 array[i] = 0;
    }
  }
}
 
 
int main(void){
  int H, W, K;
  scanf("%d",&H);
  scanf("%d",&W);
  scanf("%d",&K);
 
  int matrix[W][H];
  for(int y = 0;y < H;y++){
	char str[256];
    scanf("%s",str);
    for(int x = 0;x < W;x++){
      matrix[x][y] = str[x] == '#';
    }
  }
  int answer = 0;
  for(int permY = 0;permY < pow2(H);permY++){
    int binaryY[H];
    makeBinary(permY,H,binaryY);
    for(int permX = 0;permX < pow2(W);permX++){
      int binaryX[W];
      makeBinary(permX,W,binaryX);
 	  int result = 0;
  	  for (int y = 0; y < H; y++) {
        for (int x = 0; x < W; x++) {
        result += matrix[x][y] && binaryX[x] && binaryY[y];
        }
      }
      answer += result == K
    }
  }
  printf("%d",answer);
  return 0;
}

Compiler output:
main.c: In function 'makeBinary':
main.c:14:20: error: assignment to 'int *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
   14 |           array[i] = 1;
      |                    ^
main.c: In function 'main':
main.c:40:24: error: passing argument 3 of 'makeBinary' from incompatible pointer type [-Wincompatible-pointer-types]
   40 |     makeBinary(permY,H,binaryY);
      |                        ^~~~~~~
      |                        |
      |                        int *
main.c:10:42: note: expected 'int **' but argument is of type 'int *'
   10 | void makeBinary(int num, int digit, int* array[digit]) {
      |                                     ~~~~~^~~~~~~~~~~~
main.c:43:26: error: passing argument 3 of 'makeBinary' from incompatible pointer type [-Wincompatible-pointer-types]
   43 |       makeBinary(permX,W,binaryX);
      |                          ^~~~~~~
      |                          |
      |                          int *
main.c:10:42: note: expected 'int **' but argument is of type 'int *'
   10 | void makeBinary(int num, int digit, int* array[digit]) {
      |                                     ~~~~~^~~~~~~~~~~~
main.c:50:28: error: expected ';' before '}' token
   50 |       answer += result == K
      |                            ^
      |                            ;
   51 |     }
      |     ~
Language: C

#include <stdio.h>
 
int count(int matrix, int hi,int l,int k){
  int c = 0;
  for(int i = 0;i < l;i++){
    for(int j = 0;j < k;j++){
      if(strcmp(matrix[hi[j]],"#") == 0){
        c++;
      }
    }
  }
}
 
int pow2(int n){
  int a = 1;
  for(int i = 0;i < n;i++){
    a = a*2;
  }
  return a;
}
 
void makeBinary(int num, int digit, int* array[digit]) {
  int copiedNum = num;
  for (int i = digit - 1; i >= 0; i++) {
  	if (copiedNum >= pow2(i)) {
  	  array[i] = 1;
  	  copiedNum -= pow2(i);
	} else {
  	 array[i] = 0;
    }
  }
}
 
 
int main(void){
  int H, W, K;
  scanf("%d",&H);
  scanf("%d",&W);
  scanf("%d",&K);
 
  int matrix[W][H];
  for(int y = 0;y < H;y++){
	char str[256];
    scanf("%s",str);
    for(int x = 0;x < W;x++){
      matrix[x][y] = str[x] == '#';
    }
  }
  int answer = 0;
  for(int permY = 0;permY < pow2(H);permY++){
    int binaryY[H];
    makeBinary(permY,H,binaryY);
    for(int permX = 0;permX < pow2(W);permX++){
      int binaryX[W];
      makeBinary(permX,W,binaryX);
 	  int result = 0;
  	  for (int y = 0; y < H; y++) {
        for (int x = 0; x < W; x++) {
        result += matrix[x][y] && binaryX[x] && binaryY[y];
        }
      }
      answer += result == K
    }
  }
  printf("%d",answer);
  return 0;
}

Compiler output:
main.c: In function 'count':
main.c:7:10: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
    7 |       if(strcmp(matrix[hi[j]],"#") == 0){
      |          ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strcmp'
    1 | #include <stdio.h>
  +++ |+#include <string.h>
    2 | 
main.c:7:26: error: subscripted value is neither array nor pointer nor vector
    7 |       if(strcmp(matrix[hi[j]],"#") == 0){
      |                          ^
main.c: In function 'makeBinary':
main.c:26:20: error: assignment to 'int *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
   26 |           array[i] = 1;
      |                    ^
main.c: In function 'main':
main.c:52:24: error: passing argument 3 of 'makeBinary' from incompatible pointer type [-Wincompatible-pointer-types]
   52 |     makeBinary(permY,H,binaryY);
      |                        ^~~~~~~
      |                        |
      |                        int *
main.c:22:42: note: expected 'int **' but argument is of type 'int *'
   22 | void makeBinary(int num, int digit, int* array[digit]) {
      |                                     ~~~~~^~~~~~~~~~~~
main.c:55:26: error: passing argument 3 of 'makeBinary' from incompatible pointer type [-Wincompatible-pointer-types]
   55 |       makeBinary(permX,W,binaryX);
      |                          ^~~~~~~
      |                          |
      |                          int *
main.c:22:42: note: expected 'int **' but argument is of type 'int *'
   22 | void makeBinary(int num, int digit, int* array[digit]) {
      |                                     ~~~~~^~~~~~~~~~~~
main.c:62:28: error: expected ';' before '}' token
   62 |       answer += result == K
      |                            ^
      |                            ;
   63 |     }
      |     ~
Language: C

#include <stdio.h>

int count(int a, int hi,int l,int k){
  int c = 0;
  for(int i = 0;i < l;i++){
    for(int j = 0;j < k;j++){
      if(strcmp(a[hi[j]],"#") == 0){
        c++;
      }
    }
  }
}

int main(void){
  int H, W, K, r;
  int c = 0;
  scanf("%d",&H);
  scanf("%d",&W);
  scanf("%d",&K);

  int a[H];
  for(int i = 0;i < H;i++){
    int hi[K];
    a[i] = hi[K];
  }

  for(int i = 0;i < H;i++){
    for(int j = 0;j < K;j++){
      scanf("%c",&hi[j]);
    }
  }

  for(int i = 0;i < H;i++){
    for(int j = 0;j < K;j++){
      for(int k = 0;k < K-j;k++){
      	hi.splice(j,k);
        for(int l = 0;l < H-i;l++){
          a.splice(i,l);
          r = count(a,hi,l,k);
          if(r == K){
          	c++;
          }
        }
      }
    }
  }
  printf("%d",c);
  return 0;
}


Compiler output:
main.c: In function 'count':
main.c:7:10: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
    7 |       if(strcmp(a[hi[j]],"#") == 0){
      |          ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strcmp'
    1 | #include <stdio.h>
  +++ |+#include <string.h>
    2 | 
main.c:7:21: error: subscripted value is neither array nor pointer nor vector
    7 |       if(strcmp(a[hi[j]],"#") == 0){
      |                     ^
main.c: In function 'main':
main.c:29:19: error: 'hi' undeclared (first use in this function); did you mean 'i'?
   29 |       scanf("%c",&hi[j]);
      |                   ^~
      |                   i
main.c:29:19: note: each undeclared identifier is reported only once for each function it appears in
main.c:38:12: error: request for member 'splice' in something not a structure or union
   38 |           a.splice(i,l);
      |            ^
main.c:39:21: error: passing argument 1 of 'count' makes integer from pointer without a cast [-Wint-conversion]
   39 |           r = count(a,hi,l,k);
      |                     ^
      |                     |
      |                     int *
main.c:3:15: note: expected 'int' but argument is of type 'int *'
    3 | int count(int a, int hi,int l,int k){
      |           ~~~~^
Language: C

#include <stdio.h>

int count(int a,hi,l,k){
  int c = 0;
  for(int i = 0;i < l;i++){
    for(int j = 0;j < k;j++){
      if(strcmp(a[hi[j]],"#") == 0){
        c++;
      }
    }
  }
}

int main(void){
  int H, W, K, r;
  int count = 0;
  scanf("%d",&H);
  scanf("%d",&W);
  scanf("%d",&K);
  
  int a[H];
  for(int i = 0;i < H;i++){
    int hi[K];
    a[i] = hi[K];
  }
    
  for(int i = 0;i < H;i++){
    for(int j = 0;j < K;j++){
      scanf("%c",&hi[j]);
    }
  }
  
  for(int i = 0;i < H;i++){
    for(int j = 0;j < K;j++){
      for(int k = 0;k < K-j;k++){
      	hi.splice(j,k);
        for(int l = 0;l < H-i;l++){
          a.splice(i,l);
          r = count(a,hi,l,k);
          if(r == K){
          	count++;
          }
        }
      }
    }
  }
  printf("%d",count);
  return 0;
}
        
  

Compiler output:
main.c:3:17: error: unknown type name 'hi'
    3 | int count(int a,hi,l,k){
      |                 ^~
main.c:3:20: error: unknown type name 'l'
    3 | int count(int a,hi,l,k){
      |                    ^
main.c:3:22: error: unknown type name 'k'
    3 | int count(int a,hi,l,k){
      |                      ^
main.c: In function 'main':
main.c:29:19: error: 'hi' undeclared (first use in this function); did you mean 'i'?
   29 |       scanf("%c",&hi[j]);
      |                   ^~
      |                   i
main.c:29:19: note: each undeclared identifier is reported only once for each function it appears in
main.c:38:12: error: request for member 'splice' in something not a structure or union
   38 |           a.splice(i,l);
      |            ^
main.c:39:15: error: called object 'count' is not a function or function pointer
   39 |           r = count(a,hi,l,k);
      |               ^~~~~
main.c:16:7: note: declared here
   16 |   int count = 0;
      |       ^~~~~
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int H = sc.nextInt(); 
    int W = sc.nextInt(); 
    int K = sc.nextInt(); 
    char grid[][] = new char[H][W];
    for(int i = 0; i<H; i++){
      for(int j = 0; j<W; j++){
      grid[i][j]=sc.next();
    }
    int ans = 0;
    for (int i = 0; i < 1 << H; i++) {
      for(int j = 0; j < 1<<W; j++) {
        int cnt = 0;
        for(int k = 0; k < H; k++) {
          if(((i>>k)&1) == 1) {
            continue;
          }
          for(int l = 0; l < W; l++) {
            if(((j>>l)&1) == 1) {
              continue;
            }
            if(grid[k][l] == '#') {
              cnt++;
            }
          }
        }
        if(cnt == K) {
          ans++;
        }
      }
    }
    System.out.println(ans);
  }
}
        

Compiler output:
Main.java:38: error: reached end of file while parsing
}
 ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
  int H, W, K; cin >> H >> W >> K;
  char cell[H][W];
  int black = 0;
  for(int i = 0; i < H; i++){
    for(int j = 0; j < W; j++){
      cin >> cell[i][j];
      if(cell[i][j] == '#') black++;
    }
  }
  if(black < K) {
    cout << 0 << endl;
    return;
  }
  int ans = 0;
  for(int r = 0; r < (1<< 6) ; r++){
    bitset<6> row(r);
    for(int c = 0; c < (1 << 6 ); c++){
      bitset<6> col(c);
      int tmp = black;
	  for(int i = 0; i < 6; i++){
        for(int j = 0; j < 6; j++){
          if(row.test(i) || col.test(j)){
             if(cell[i][j] == '#') tmp--;
          }
          if(tmp < K) break;
        }
      }
      if(tmp == K) ans++;
    }
  }
  cout << ans << endl;
  return 0; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:5: error: return-statement with no value, in function returning 'int' [-fpermissive]
   16 |     return;
      |     ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
  int H, W, K; cin >> H >> W >> K;
  char cell[H][W];
  int black = 0;
  for(int i = 0; i < H; i++){
    for(int j = 0; k < W; j++){
      cin >> cell[i][j];
      if(cell[i][j] == '#') black++;
    }
  }
  int ans = 0;
  for(int r = 0; r < (1<< 6) ; r++){
    bitset<6> row(r);
    for(c = 0; c < (1 << 6 ); c++){
      bitset<6> col(c);
      int tmp = black;
	  for(int i = 0; i < 6; i++){
        for(int j = 0; j < 6; j++){
          if(row.test(i) || col.test(j)){
             if(cell[i][j] == '#') tmp--;
          }
          if(tmp < K) break;
        }
      }
      if(tmp == K) ans++;
    }
  }
  cout << ans << endl;
  return 0; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: 'k' was not declared in this scope
    9 |     for(int j = 0; k < W; j++){
      |                    ^
a.cc:17:9: error: 'c' was not declared in this scope
   17 |     for(c = 0; c < (1 << 6 ); c++){
      |         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
  int H, W, K; cin >> H >> W >> K;
  char cell[H][W];
  int black = 0;
  for(int i = 0; i < H; i++){
    for(int j = 0; k < W; j++){
      cin >> cell[i][j];
      if(block[i][j] == '#') black++;
    }
  }
  int ans = 0;
  for(int r = 0; r < (1<< 6) ; r++){
    bitset<6> row(r);
    for(c = 0; c < (1 << 6 ); c++){
      bitset<6> col(c);
      int tmp = black;
	  for(int i = 0; i < 6; i++){
        for(int j = 0; j < 6; j++){
          if(row.test(i) || col.test(j)){
             if(cell[i][j] == '#') tmp--;
          }
          if(tmp < K) break;
        }
      }
      if(tmp == K) ans++;
    }
  }
  cout << ans << endl;
  return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: 'k' was not declared in this scope
    9 |     for(int j = 0; k < W; j++){
      |                    ^
a.cc:11:10: error: 'block' was not declared in this scope; did you mean 'std::filesystem::file_type::block'?
   11 |       if(block[i][j] == '#') black++;
      |          ^~~~~
      |          std::filesystem::file_type::block
In file included from /usr/include/c++/14/filesystem:51,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200,
                 from a.cc:1:
/usr/include/c++/14/bits/fs_fwd.h:80:7: note: 'std::filesystem::file_type::block' declared here
   80 |       block = 4, character = 5, fifo = 6, socket = 7, unknown = 8
      |       ^~~~~
a.cc:17:9: error: 'c' was not declared in this scope
   17 |     for(c = 0; c < (1 << 6 ); c++){
      |         ^