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

#include<bits/stdc++.h>
#define ll long long int
using namespace std;
ll n,m,k;
char a[n][m];
bool check(ll r,ll c)
{
  ll cont=0;
  for(ll i=0;i<n;i++)
    for(ll j=0;j<m;j++)
    {
      if(1&(1<<i) || 1&(1<<j))
        continue;
      else
        if(a[i][j]=='#')
          cont++;
    }
  if(cont==k)
    return true;
  else
    return false;
}
int main()
{
  
  cin>>n>>m>>k;
  for(ll i=0;i<n;i++)
  {
    for(l j=0;j<m;j++)
    {
      cin>>a[i][j];
    }
  }
  ll temp0=0,temp1=0,ans;
  for(ll i=0;i<(1<<n);i++)
  {
    for(l j=0;j<(1<<m);j++)
    {
      if(check(i,j))
        ans++;
    }
  }
  cout<<ans<<endl;
  
  return 0;
}

Compiler output:
a.cc:5:11: error: size of array 'a' is not an integral constant-expression
    5 | char a[n][m];
      |           ^
a.cc:5:8: error: size of array 'a' is not an integral constant-expression
    5 | char a[n][m];
      |        ^
a.cc: In function 'int main()':
a.cc:29:9: error: 'l' was not declared in this scope
   29 |     for(l j=0;j<m;j++)
      |         ^
a.cc:29:15: error: 'j' was not declared in this scope
   29 |     for(l j=0;j<m;j++)
      |               ^
a.cc:37:9: error: 'l' was not declared in this scope
   37 |     for(l j=0;j<(1<<m);j++)
      |         ^
a.cc:37:15: error: 'j' was not declared in this scope
   37 |     for(l j=0;j<(1<<m);j++)
      |               ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main()
{
    int H , V , K;
    string s;
    cin >> H >> V >> K;
    int a[6] = {0};

    for (int i = 0; i < H; i ++){
        cin >> s;
        int code = 0;
        for (int j = 0; j < V; j ++){
            if (s[j] == '#'){
                code |= 1 << j;
            }
        }
        a[i] = code;
    }

    int ans = 0;
    for (int i = 0; i < (1 << H); i ++){
        int b[6] = {0};
        for (int j = 0; j < H; j ++){
            if ((1 << j) & i){
                b[j] = 0;
            }
            else{
                b[j] = a[j];
            }
        }

        for (int k = 0; k < (1 << V); k ++){
            int c[6] = {0};
            memcpy(c, b, sizeof(b));
            int t = ((1 << V) - 1) ^ k;

            for (int j = 0; j < H; j ++){
                c[j] &= t;
            }
            int cnt = 0;
            for (int j = 0; j < H; j ++){
                while (c[j] > 0){
                    if (c[j] & 1 > 0){
                        cnt ++;
                    }
                    c[j] >>= 1;
                }
            }
            if (cnt == K){
                ans ++;
            }
        }
    }
    cout << ans;
    system("pause");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:13: error: 'memcpy' was not declared in this scope
   36 |             memcpy(c, b, sizeof(b));
      |             ^~~~~~
a.cc:2:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | #include <string>
Language: C++

#include <bits/stdc++.h> //全てのヘッダファイルをインクルード

//ループ
#define rep(i, n) for(int i = 0; i < n; i++) //普通のループ
#define repr(i, n) for(int i = n; i >= 0; i--) //逆ループ

//型名省略
typedef long long ll;
//値
static const ll MX = 100005;
static const ll MX_ll = 1e18;

using namespace std;

//#include "./lib/generic/search.h"

int main(){
    int h, w, k, sum=0;
    cin >> h >> w >> k;
    vector<string> s(h);
    int ans = 0;
    rep(i, h) cin >> s[i];
    rep(is, 1<<h){ //行情報。2のh乗している
        rep(js, 1<<w){ //列情報。2のh乗している
            if(is>>1&1) continue; //行が消されているならコンテニュー
            if(js>>1&1) continue; //列が消されているならコンテニュー
            if(s[i][j]=='#') cnt++;
        }
        if(cnt == k) ans++;
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:18: error: 'i' was not declared in this scope; did you mean 'is'?
   27 |             if(s[i][j]=='#') cnt++;
      |                  ^
      |                  is
a.cc:27:21: error: 'j' was not declared in this scope; did you mean 'js'?
   27 |             if(s[i][j]=='#') cnt++;
      |                     ^
      |                     js
a.cc:27:30: error: 'cnt' was not declared in this scope; did you mean 'int'?
   27 |             if(s[i][j]=='#') cnt++;
      |                              ^~~
      |                              int
a.cc:29:12: error: 'cnt' was not declared in this scope; did you mean 'int'?
   29 |         if(cnt == k) ans++;
      |            ^~~
      |            int
Language: C++

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const int maxn = 1e6+10;

int n,m,q;
int da[1010][1010];
int dp[1010][1010];

inline int read()
{
    int X=0,w=0; char ch=0;
    while(!isdigit(ch)) w|=ch=='-',ch=getchar();
    while(isdigit(ch)) X=(X<<3)+(X<<1)+(ch^48),ch=getchar();
    return w?-X:X;
}


int main()
{
    n =read(),m =read(),q= read();
    for(int i = 0;i<n;i++){
        for(int j = 0;j<m;j++){
            char u;
            cin>>u;
            if(u == '#')da[i][j] = 1;
            else da[i][j] = 0;
        }
    }
    int res = 0;
    for(int i = 0;i<(1<<n);i++){
        for(int j = 0;j<(1<<m);j++){
            int cnt = 0;
            for(int ni =0;ni<6;ni++){
                if(!((1<<ni)&i)) continue;
                for(int nj = 0;nj<6;nj++){
                    if(!((1<<nj)&j)) continue;
                    cnt++;
                }
            }
            if(cnt == k) res++;
        }
    }
    cout<<res<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:44:23: error: 'k' was not declared in this scope
   44 |             if(cnt == k) res++;
      |                       ^
Language: C++

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

int main() {
  int h, w, k;
  cin >> h >> w >> k;
  vector<string> c(h);
  for (int i = 0; i < h; i++) {
    cin >> c.at(i);
  }

  int black = 0;
  for (int i = 0; i < h; i++) {
    for (int j = 0; j < c.at(i).size(); j++) {
      if (c.at(i).at(j) == "#") black++;
    }
  }
  cout<<black<<endl
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:15:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |       if (c.at(i).at(j) == "#") black++;
      |           ~~~~~~~~~~~~~~^~~~~~
a.cc:18:20: error: expected ';' before '}' token
   18 |   cout<<black<<endl
      |                    ^
      |                    ;
   19 | }
      | ~
Language: C++

#include<bits/stdc++.h>
#define pii pair<int,int>
#define fi first
#define se second
#define int long long
#define pb push_back
#define mod 1000000007
#define pll pair<long long,long long>
using namespace std;
long long power(long long a,long long b){
    long long ans=1;
    while(b>0){
        if(b&1){ans=(ans*a)%mod;}
                a=(a*a)%mod;
                b>>=1;
        }
    return ans;
        
}
bool prime(int n){
    for(int i=2;i*i<=n;i++){
        if(n%i==0)return false;
    }
    return true;
}
int32_t main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    int n,m,k;
    cin>>n>>m>>k;
    string s[n];
    for(int i=0;i<n;i++){
    	cin>>s[i];
    }
    int x=n+m;
    for(int mask=0;mask<(1<<x);mask++){
    	string s1[n];
    	for(int i=0;i<n;i++)s1[i]=s[i];
        for(int i=0;i<x;i++){
    		if(mask&(1<<i)){
    			if(i<n){
    				for(int j=0;j<m;j++){
    					s1[i][j]='*';
                    }
                }
                else{
    	            for(int j=0;j<n;j++){
    		            s1[j][i-n]='*';
                   }
                }
            }
        }
    }
    int y=0;
    int ans=0;
    for(int i=0;i<n;i++){
    	for(int j=0;j<m;j++){
    		if(s1[i][j]=='#')y++;
        }
        if(y==k)ans++;
    }
    cout<<ans;
    return 0;
}

Compiler output:
a.cc: In function 'int32_t main()':
a.cc:59:20: error: 's1' was not declared in this scope; did you mean 's'?
   59 |                 if(s1[i][j]=='#')y++;
      |                    ^~
      |                    s
Language: C++

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

bool isRed(int i, int j, int bitw, int bith){
    if(((1 << i) & bith) || ((1 << j) & bitw)) return true;
    else return false;
}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    int h,w,k; cin >> h >> w >> k;
    vector<string> c(h); rep(i,h) cin >> c[i];
    int ans = 0;
    for(int bith = 0; bith < (1<<h); ++bith){
        for(int bitw = 0; bitw < (1<<w); ++bitw){
            int black = 0;
            rep(i,h) rep(j,w) if((!isRed(i,j,bith, bitw, c)) && c[i][j] == '#') ++black;
            if(black == k) ++ans;
        }
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:41: error: too many arguments to function 'bool isRed(int, int, int, int)'
   22 |             rep(i,h) rep(j,w) if((!isRed(i,j,bith, bitw, c)) && c[i][j] == '#') ++black;
      |                                    ~~~~~^~~~~~~~~~~~~~~~~~~
a.cc:7:6: note: declared here
    7 | bool isRed(int i, int j, int bitw, int bith){
      |      ^~~~~
Language: C++

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

bool isRed(int i, int j, int bitw, int bith){
    if(((1 << i) & bith) || ((1 << j) & bitw)) return true;
    else return false;
}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    int h,w,k; cin >> h >> w >> k;
    string c[h]; rep(i,h) cin >> s[i];
    int ans = 0;
    for(int bith = 0; bith < (1<<h); ++bith){
        for(int bitw = 0; bitw < (1<<w); ++bitw){
            int black = 0;
            rep(i,h) rep(j,w) if(!isRed(i,j,bith, bitw)) ++black;
            if(black == k) ++ans;
        }
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:34: error: 's' was not declared in this scope
   17 |     string c[h]; rep(i,h) cin >> s[i];
      |                                  ^
Language: C++

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

int n, m, k;

inline void input (int &ret) {
	ret = 0; char ch = getchar ();
	while (!isdigit (ch)) ch = getchar ();
	while (isdigit (ch)) {
		ret = (ret << 1) + (ret << 3) + (ch ^ '0');
		ch = getchar ();
	}
	return;
}

char ch[7][7];
bool vis[7], visit[7];
char change[7][7];
int ans;

inline void dfs (int now) {
	if (now == n + m + 1) {
		for (int i = 1; i <= n; ++ i) {
			for (int j = 1; j <= m; ++ j) change[i][j] = ch[i][j];
		}
		int cnt = 0;
		for (int i = 1; i <= n; ++ i) {
			for (int j = 1; j <= m; ++ j) {
				if (vis[i] || visit[j]) change[i][j] = '.';
			}
		}
		for (int i = 1; i <= n; ++ i) {
			for (int j = 1; j <= m; ++ j) cnt += (change[i][j] == '#');
		}
		if (cnt == k) ++ ans;
		return;
	}
	if (now > n) {
		visit[now - n] = true; dfs (now + 1);
		visit[now - n] = false; dfs (now + 1);
		return;
	}
	if (now <= n) {
		vis[now] = true; dfs (now + 1);
		vis[now] = false; dfs (now + 1);
		return;
	}
	return;
}

int main () {
	cin >> n >> m >> k;
	for (int i = 1; i <= n; ++ i) {
		for (int j = 1; j <= m; ++ j) cin >> ch[i][j];
	}
	dfs (1);
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'void dfs(int)':
a.cc:29:47: error: reference to 'visit' is ambiguous
   29 |                                 if (vis[i] || visit[j]) change[i][j] = '.';
      |                                               ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:80,
                 from a.cc:1:
/usr/include/c++/14/variant:1855:5: note: candidates are: 'template<class _Visitor, class ... _Variants> constexpr std::__detail::__variant::__visit_result_t<_Visitor, _Variants ...> std::visit(_Visitor&&, _Variants&& ...)'
 1855 |     visit(_Visitor&& __visitor, _Variants&&... __variants)
      |     ^~~~~
a.cc:17:14: note:                 'bool visit [7]'
   17 | bool vis[7], visit[7];
      |              ^~~~~
a.cc:39:17: error: reference to 'visit' is ambiguous
   39 |                 visit[now - n] = true; dfs (now + 1);
      |                 ^~~~~
/usr/include/c++/14/variant:1855:5: note: candidates are: 'template<class _Visitor, class ... _Variants> constexpr std::__detail::__variant::__visit_result_t<_Visitor, _Variants ...> std::visit(_Visitor&&, _Variants&& ...)'
 1855 |     visit(_Visitor&& __visitor, _Variants&&... __variants)
      |     ^~~~~
a.cc:17:14: note:                 'bool visit [7]'
   17 | bool vis[7], visit[7];
      |              ^~~~~
a.cc:40:17: error: reference to 'visit' is ambiguous
   40 |                 visit[now - n] = false; dfs (now + 1);
      |                 ^~~~~
/usr/include/c++/14/variant:1855:5: note: candidates are: 'template<class _Visitor, class ... _Variants> constexpr std::__detail::__variant::__visit_result_t<_Visitor, _Variants ...> std::visit(_Visitor&&, _Variants&& ...)'
 1855 |     visit(_Visitor&& __visitor, _Variants&&... __variants)
      |     ^~~~~
a.cc:17:14: note:                 'bool visit [7]'
   17 | bool vis[7], visit[7];
      |              ^~~~~
Language: C++

#include <bits/stdc++.h>
#define int long long
#define all(a) (a).begin(),(a).end()
using namespace std;

signed main(){
    ios_base::sync_with_stdio(0);

    int h,w,k;
    cin >> h >> w >> k;

    string grid[h];
    for(auto& i : grid)
        cin >> i;

    int ans=0;
    for(int bit_i=0;bit_i<(1ll<<h);bit_i++){
        for(int bit_j=0;bit_j<(1ll<<w);bit_j++){
            string new_grid[h];
            for(int l=0;l<h;l++)
                new_grid[l] = grid[l];

            for(int i=0;i<h;i++){
                for(int j=0;j<w;j++){
                    int x = (bit_i>>i)&1;
                    int y = (bit_j>>j)&1;
            int cnt=0;
            for(int i=0;i<h;i++){
                for(int j=0;j<w;j++){
                    if(new_grid[i][j] == '#') cnt++;
                }
            }

            if(cnt == k) ans++;
        }
    }

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


Compiler output:
a.cc: In function 'int main()':
a.cc:41:2: error: expected '}' at end of input
   41 | }
      |  ^
a.cc:17:44: note: to match this '{'
   17 |     for(int bit_i=0;bit_i<(1ll<<h);bit_i++){
      |                                            ^
a.cc:41:2: error: expected '}' at end of input
   41 | }
      |  ^
a.cc:6:14: note: to match this '{'
    6 | signed main(){
      |              ^
Language: C++

#include<bits/stdc++.h>
// #define int long long
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define repa(i, s, n) for(int i = s; i < (int)n; i++)
using namespace std;
using ll = long long;
typedef vector<int> vi;

signed main() {
    int h, w, k;
    cin >> h >> w >> k;
    vector<string> s(h);
    int ans = 0;
    rep(i, h) cin >> s[i];

    rep(is, 1<<h)rep(js, 1<<w){
        int cnt = 0;
        rep(i, h)rep(j, w){
            if(is<<i & 1) continue;
            if(ws<<i & 1) continue;
            if(s[i][j] == '#') cnt++;
        }
        if(cnt == k) ans++;
    }

    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:18: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator<<'
   20 |             if(ws<<i & 1) continue;
      |                ~~^~~
Language: C++

#include<bits/stdc++.h>
// #define int long long
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define repa(i, s, n) for(int i = s; i < (int)n; i++)
using namespace std;
using ll = long long;
typedef vector<int> vi;

signed main() {
    int h, w, k;
    cin >> h >> w >> k;
    vector<string> s(h);
    int ans = 0;
    rep(i, h) cin >> s[i];

    rep(is, 1<<h)rep(js, 1<<w){
        int cnt = 0;
        rep(i, h)rep(j, w){
            if(ls<<i & 1) continue;
            if(ws<<i & 1) continue;
            if(s[i][j] == "#") cnt++;
        }
        if(cnt == k) ans++;
    }

    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:16: error: 'ls' was not declared in this scope; did you mean 'js'?
   19 |             if(ls<<i & 1) continue;
      |                ^~
      |                js
a.cc:20:18: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator<<'
   20 |             if(ws<<i & 1) continue;
      |                ~~^~~
a.cc:21:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   21 |             if(s[i][j] == "#") cnt++;
Language: C++

#include<iostream>
using namespace std;
int main(){
int h,w,k,ans=0;
  cin>>h>>w>>k;
  vector<string> s(h);
  for(int i=0;i<h;i++) cin>>s[i];
  for(int i=0;i<(1<<h);i++){
    for(int j=0;j<(1<<w);j++){
       int cnt=0;
      for(int l=0;l<h;l++){
         for(int m=0;m<w;m++){
           if(i>>l&1) continue;
           if(j>>m&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:6:3: error: 'vector' was not declared in this scope
    6 |   vector<string> s(h);
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:6:16: error: expected primary-expression before '>' token
    6 |   vector<string> s(h);
      |                ^
a.cc:6:18: error: 's' was not declared in this scope
    6 |   vector<string> s(h);
      |                  ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int n,m,k;
#define sc(x) scanf("%d",&(x))
string mp[6];
bool check(int x)
{
  int t = 0;
  for(int i=0;i<n;i++){
    if((x>>i)&1)continue; 
    for(int j=0;j<m;j++){
       if((x>>(j+n))&1)continue;
       if(mp[i][j] == '#')t++;
    }
  }
  return t == k;

}
int main()
{
  sc(n); sc(m); sc(x);
   for(int i=0;i<n;i++){
      cin>>mp[i];
   }
  int w = 1<<(n+m)-1;
  int ans = 0;
  for(int i=0;i<w;i++){
     if(check(i))ans++;
  }
  cout<<ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:20: error: 'x' was not declared in this scope
   21 |   sc(n); sc(m); sc(x);
      |                    ^
a.cc:4:28: note: in definition of macro 'sc'
    4 | #define sc(x) scanf("%d",&(x))
      |                            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int n,m,k;
#define sc(x) scanf("%d",&(x))
string mp[6];
bool check(int x)
{
  int t = 0;
  for(int i=0;i<n;i++){
    if((x>>i)&1)continue; 
    for(int j=0;j<m;j++){
       if((x>>(j+n))&1)continue;
       if(mp[i][j] == '#')t++;
    }
  }
  return t == k;

}
int main()
{
  sc(n) sc(m) sc(x)
   for(int i=0;i<n;i++){
      cin>>mp[i];
   }
  int w = 1<<(n+m)-1;
  int ans = 0;
  for(int i=0;i<w;i++){
     if(check(i))ans++;
  }
  cout<<ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:15: error: expected ';' before 'scanf'
    4 | #define sc(x) scanf("%d",&(x))
      |               ^~~~~
a.cc:21:9: note: in expansion of macro 'sc'
   21 |   sc(n) sc(m) sc(x)
      |         ^~
a.cc:22:16: error: 'i' was not declared in this scope
   22 |    for(int i=0;i<n;i++){
      |                ^
Language: C++

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

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(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] == '#');
      }
      if(cnt == k) ans++;
   }
   cout << ans << endl;
   return 0;
}

Compiler output:
a.cc:13:25: error: macro "rep" requires 2 arguments, but only 1 given
   13 |    rep(is, 1<<h)rep(1<<w){
      |                         ^
a.cc:2:9: note: macro "rep" defined here
    2 | #define rep(i,n) for(int i = 0; i < (n); i++)
      |         ^~~
a.cc: In function 'int main()':
a.cc:13:17: error: 'rep' was not declared in this scope
   13 |    rep(is, 1<<h)rep(1<<w){
      |                 ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
const int maxn=10;
char a[maxn][maxn];
int h,w,k;
int r[maxn],c[maxn];
int binpow(int a,int n)
{
	int res=1;
	while(n)
	{
		if(n&1) res*=a;
		a*=a;
		n>>=1;
	}
	return res;
}
int main()
{
	cin>>h>>w>>k;
	for(int i=0;i<h;++i) cin>>a[i];
	memset(r,0,sizeof r);
	memset(c,0,sizeof c);
	int num=0;
	for(int i=0;i<h;++i)
	{
		for(int j=0;j<w;++j)
		{
			if(a[i][j]=='#') r[i]++,c[j]++,num++;
		}
	}
	if(num==k)
	{
		printf("1\n");
		return 0;
	}
	int ans=0;
	/*for(int i=0;i<binpow(2,h);++i)
	{
		int j=i;
		int num=0,sum=0;
		while(j)
		{
			if(j&1) sum+=r[num];
			j>>=1;
			num++;  
		}
		if(sum==k) 
		{
			cout<<0<<endl;
			cout<<i<<endl;
			ans++;
		}
	}
	for(int i=0;i<binpow(2,w);++i)
	{
		int j=i;
		int num=0,sum=0;
		while(j)
		{
			if(j&1) sum+=c[num];
			j>>=1;
			num++;  
		}
		if(sum==k) 
		{
			cout<<-1<<endl;
			cout<<i<<endl;
			ans++;
		}
	}*/
	for(int i=0;i<binpow(2,h);++i)
	{
		for(int j=0;j<binpow(2,w);++j)
		{
			int dx=i,dy=j;
			int sum=0,num=0,num1=0,num2=0;
			while(1)
			{ 
				if(dx==0&&dy===0)
				{
					break;
				} 
				if(dx&1) sum+=r[num];
			 	if(dy&1) sum+=c[num];
				if(dx>0) num1++;
				if(dy>0) num2++;
				dx>>=1;
				dy>>=1;
				num++;
			}
				
			if(num1>0&&num2>0)
			{
				if(a[num1-1][num2-1]=='#') sum=sum-1;
			 } 
			if(sum==k)
			{
				//cout<<-1<<endl;
				//cout<<i<<" "<<j<<endl;
				ans++;
			}
		}
	}
	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:80:47: error: expected primary-expression before '=' token
   80 |                                 if(dx==0&&dy===0)
      |                                               ^
Language: C++

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


int n, m, k;

void color_row(vector<string>& g, int r) {
  REP(j, m) g[r][j] = '.';
}

void color_col(vector<string>& g, int c) {
  REP(i, n) g[i][c] = '.';
}

int black(int rmask, int cmask, vector<string> g) {
  REP(i, n) if(rmask & (1 << i)) color_row(i);
  REP(j, m) if(cmask & (1 << j)) color_col(j);
  int res = 0;
  REP(i, n) REP(j, m) res += g[i][j] == '#';
  return res;
}

int main() {
  cin >> n >> m >> k;
  vector<string> g(n);
  REP(i, n) cin >> g[i];
  int ans = 0;
  REP(i, 1 << n) {
    REP(j, 1 << m) {
      if(black(i, j, g) == k) ++ans;
    }
  }
  cout << ans << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int black(int, int, std::vector<std::__cxx11::basic_string<char> >)':
a.cc:17:44: error: invalid initialization of reference of type 'std::vector<std::__cxx11::basic_string<char> >&' from expression of type 'int'
   17 |   REP(i, n) if(rmask & (1 << i)) color_row(i);
      |                                            ^
a.cc:8:32: note: in passing argument 1 of 'void color_row(std::vector<std::__cxx11::basic_string<char> >&, int)'
    8 | void color_row(vector<string>& g, int r) {
      |                ~~~~~~~~~~~~~~~~^
a.cc:18:44: error: invalid initialization of reference of type 'std::vector<std::__cxx11::basic_string<char> >&' from expression of type 'int'
   18 |   REP(j, m) if(cmask & (1 << j)) color_col(j);
      |                                            ^
a.cc:12:32: note: in passing argument 1 of 'void color_col(std::vector<std::__cxx11::basic_string<char> >&, int)'
   12 | void color_col(vector<string>& g, int c) {
      |                ~~~~~~~~~~~~~~~~^
Language: C++

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

int n, m, k;

void color_row(vector<string>& g, int r) {
  REP(j, m) g[r][j] = '.';
}

void color_col(vector<string>& g, int c) {
  REP(i, n) g[i][c] = '.';
}

int black(int rmask, int cmask, vector<string> g) {
  REP(i, n) if(rmask & (1 << i)) color_row(i);
  REP(j, m) if(cmask & (1 << j)) color_col(j);
  int res = 0;
  REP(i, n) REP(j, m) res += g[i][j] == '#';
  return res;
}

int main() {
  cin >> n >> m >> k;
  vector<string> g(n);
  REP(i, n) cin >> g[i];
  int ans = 0;
  REP(i, 1 << n) {
    REP(j, 1 << m) {
      if(black(i, j, g) == k) ++ans;
    }
  }
  cout << ans << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'void color_row(std::vector<std::__cxx11::basic_string<char> >&, int)':
a.cc:7:7: error: 'j' was not declared in this scope
    7 |   REP(j, m) g[r][j] = '.';
      |       ^
a.cc:7:3: error: 'REP' was not declared in this scope
    7 |   REP(j, m) g[r][j] = '.';
      |   ^~~
a.cc: In function 'void color_col(std::vector<std::__cxx11::basic_string<char> >&, int)':
a.cc:11:7: error: 'i' was not declared in this scope
   11 |   REP(i, n) g[i][c] = '.';
      |       ^
a.cc:11:3: error: 'REP' was not declared in this scope
   11 |   REP(i, n) g[i][c] = '.';
      |   ^~~
a.cc: In function 'int black(int, int, std::vector<std::__cxx11::basic_string<char> >)':
a.cc:15:7: error: 'i' was not declared in this scope
   15 |   REP(i, n) if(rmask & (1 << i)) color_row(i);
      |       ^
a.cc:15:3: error: 'REP' was not declared in this scope
   15 |   REP(i, n) if(rmask & (1 << i)) color_row(i);
      |   ^~~
a.cc:16:7: error: 'j' was not declared in this scope
   16 |   REP(j, m) if(cmask & (1 << j)) color_col(j);
      |       ^
a.cc: In function 'int main()':
a.cc:25:7: error: 'i' was not declared in this scope
   25 |   REP(i, n) cin >> g[i];
      |       ^
a.cc:25:3: error: 'REP' was not declared in this scope
   25 |   REP(i, n) cin >> g[i];
      |   ^~~
Language: C++

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

int main(){
	int n, m, x, res = 0;
  	cin >> n >> m >> x;
  	char a[n][m];
  	for(int i = 0; i < n; ++i)
      for(int j = 0; j < m; ++j)
        cin >> a[i][j];
  	for(int mask = 0; mask <= (1<<(n + m)); ++mask){
      int count = 0;
    	for(int i = 0; i < n; ++i){
          for(int j = 0; j < m; ++j){
         	if(a[i][j] != '#')
               continue;
            else if(mask&(1<<i) | mask&(1<<(i + j)) != 0)
               continue;
           	count++;
				
          }
        }
        if(count == k)
               res++;
    }
    cout << res << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:21: error: 'k' was not declared in this scope
   23 |         if(count == k)
      |                     ^
Language: C++


#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
const ll INF = 1LL << 60;

int main(){
    int h, w, k;
    cin >> h >> w >> k;
    vector<string> s(h);
    rep(i,h) cin >> s[i];

    int ans=0;
    //1<<hは2のh乗を表している
    rep(is,1<<h)rep(ls,1<<w){
        int cnt=0;
        rep(i,h)rep(j,w){
            //2進数のi桁目を取り出すにはこうする
            if(is>>i&1)continue;
            if(ls>>l&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:20: error: 'l' was not declared in this scope
   22 |             if(ls>>l&1)continue;
      |                    ^
Language: C++

#pragma GCC optimize("Ofast")

#include <bits/stdc++.h>

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


int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int h, w, k;
  cin >> h >> w >> k;
  vector<string> c(h);
  rep(i, h) cin >> c[i];

  int ans = 0;
  int count = 0;
  for(int i = 0; i < (1 << h); i++) {
    for(int j = 0; j < (1 << w); j++) {


      count = 0;
      rep(m, h) {
        rep(n, w) {
          if(i & (1 << m) || j & (1 << n)) continue;
          if(c[m][n] == "#") count++;
        }
      }
      if(count == k) ans++;
    }
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   28 |           if(c[m][n] == "#") count++;
Language: C++

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

int main(){
	int n, m, x, res = 0;
  	cin >> n >> m >> x;
  	char a[n][m];
  	for(int i = 0; i < n; ++i)
      for(int j = 0; j < m; ++j)
        cin >> a[i][j];
  	for(int mask = 0; mask <= (1<<(n + m)); ++mask){
      int count = 0;
    	for(int i = 0; i < n; ++i){
          for(int j = 0; j < m; ++j){
         	if(a[i][j] != '#)
               continue;
            else if(mask&(1<<i) | mask&(1<<(i + j)) != 0)
               continue;
           	count++;
				
          }
        }
        if(count == k)
               res++;
    }
    cout << res << endl;
}


Compiler output:
a.cc:15:31: warning: missing terminating ' character
   15 |                 if(a[i][j] != '#)
      |                               ^
a.cc:15:31: error: missing terminating ' character
   15 |                 if(a[i][j] != '#)
      |                               ^~~
a.cc: In function 'int main()':
a.cc:16:16: error: expected primary-expression before 'continue'
   16 |                continue;
      |                ^~~~~~~~
a.cc:17:13: error: expected primary-expression before 'else'
   17 |             else if(mask&(1<<i) | mask&(1<<(i + j)) != 0)
      |             ^~~~
a.cc:16:25: error: expected ')' before 'else'
   16 |                continue;
      |                         ^
      |                         )
   17 |             else if(mask&(1<<i) | mask&(1<<(i + j)) != 0)
      |             ~~~~         
a.cc:15:19: note: to match this '('
   15 |                 if(a[i][j] != '#)
      |                   ^
a.cc:23:21: error: 'k' was not declared in this scope
   23 |         if(count == k)
      |                     ^
Language: C++


#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
const ll INF = 1LL << 60;

int main(){
    int h, w, k;
    cin >> h >> w >> k;
    vector<string> s(h);
    rep(i,h) cin >> s[i];

    //1<<hは2のh乗を表している
    rep(is,1<<h)rep(js,1<<w){
        int cnt=0;
        rep(i,h)rep(j,w){
            //その行が消えているorその列が消えているならcontinue
            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:24:20: error: 'ans' was not declared in this scope; did you mean 'abs'?
   24 |         if(cnt==k) ans++;
      |                    ^~~
      |                    abs
a.cc:26:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   26 |     cout << ans << endl;
      |             ^~~
      |             abs
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int h,w,k;
	cin>>h>>w>>k;
	string h[6];
	for(int i=0;i<h;i++)
		cin>>s[i];
	int ans =0;
	
	for(int i=0;i<(1<<h);i++)
		for(int j=0;j<(1<<w);j++)
		{
			int cnt = 0;
			for(int x = 0;x < h;x++)
				for(int y = 0;y < w;y++)
					if(!(i>>x&1) and !(j>>y&1))
						cnt += s[x][y]=='#';
		
			ans += cnt==k;
		}
		cout<<ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: conflicting declaration 'std::string h [6]'
    7 |         string h[6];
      |                ^
a.cc:5:13: note: previous declaration as 'int h'
    5 |         int h,w,k;
      |             ^
a.cc:9:22: error: 's' was not declared in this scope
    9 |                 cin>>s[i];
      |                      ^
a.cc:19:56: error: 's' was not declared in this scope
   19 |                                                 cnt += s[x][y]=='#';
      |                                                        ^
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<stdbool.h>
#include<math.h>
#include<limits.h>
#define MAX 6
char table[MAX][MAX];
char table_copy[MAX][MAX];
char table_ori[MAX][MAX];
int H,W,K;
int count(){
    int ret = 0;
    for(int i=0;i<H;i++){
        for(int j=0;j<W;j++){
            if(table[i][j] == '#')
                ret++;
        }
    }
    return ret;
}
int main(){
   int ans=0;
   scanf("%d %d %d",&H,&W,&K);
   for(int i=0;i<H;i++)
       scanf("%s",table[i]);
   memcpy(table_ori,table,sizeof(table[0]) * max * max);


   for(int bit1=0;bit1<(1<<W);bit1++){
       memcpy(table,table_ori,sizeof(table[0]) * max * max);
       for(int i=0;i<W;i++){
            if(bit1 & (1<<i)){
                for(int j=0;j<H;j++)
                    table[j][i] = '*';
            }
       }

       memcpy(table_copy,table,sizeof(table[0]) * max * max);

       for(int bit2=0;bit2<(1<<H);bit2++){
            memcpy(table,table_copy,sizeof(table[0]) * max * max);
            for(int k=0;k<H;k++){
                if(bit2 & 1<<k){
                    for(int l=0;l<W;l++)
                        table[k][l] = '*';
                }
            }
            if(count() == K) ans++;
        }
    }

   printf("%d",ans);
}


Compiler output:
main.c: In function 'main':
main.c:27:46: error: 'max' undeclared (first use in this function); did you mean 'fmax'?
   27 |    memcpy(table_ori,table,sizeof(table[0]) * max * max);
      |                                              ^~~
      |                                              fmax
main.c:27:46: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main() {
    int h, w, k;
    cin >> h >> w >> k;
    vector<string> s(h);
    rep(i, h) cin >> s[i];
    rep(is,1 << h)rep(js,1 << w) {
        int cnt = 0;
        rep(i,h)rep(j,w) {
            if (is>>i&1) continue; // シフトして1桁目の&をとる
            if (js>>i&1) continue; // シフトして1桁目の&をとる
            if (s[i][j] == '#') cnt++; 
        }
        if (cnt == k) ans++;
    }
    cout << ans << endl;
    return 0;
}

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

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

int main() {
    int h, w, k;
    cin >> h >> w >> k;
    vector<string> s(h);
    rep(i, h) cin >> s[i]:
    rep(is,1 << h)rep(js,1 << w) {
        int cnt = 0;
        rep(i,h)rep(j,w) {
            if (is>>i&1) continue; // シフトして1桁目の&をとる
            if (js>>i&1) continue; // シフトして1桁目の&をとる
            if (s[i][j] == '#') cnt++; 
        }
        if (cnt == k) ans++;
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:26: error: expected ';' before ':' token
   11 |     rep(i, h) cin >> s[i]:
      |                          ^
      |                          ;
a.cc:12:9: error: 'is' was not declared in this scope; did you mean 's'?
   12 |     rep(is,1 << h)rep(js,1 << w) {
      |         ^~
a.cc:2:34: note: in definition of macro 'rep'
    2 | #define rep(i,n) for (int i = 1; i <= (n); i++)
      |                                  ^
a.cc:12:23: error: 'js' was not declared in this scope; did you mean 's'?
   12 |     rep(is,1 << h)rep(js,1 << w) {
      |                       ^~
a.cc:2:34: note: in definition of macro 'rep'
    2 | #define rep(i,n) for (int i = 1; i <= (n); i++)
      |                                  ^
a.cc:21:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   21 |     cout << ans << endl;
      |             ^~~
      |             abs
Language: C++

2 3 2
..#
###

Compiler output:
a.cc:2:3: error: stray '#' in program
    2 | ..#
      |   ^
a.cc:3:1: error: stray '##' in program
    3 | ###
      | ^~
a.cc:3:3: error: stray '#' in program
    3 | ###
      |   ^
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 2 3 2
      | ^
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <cmath>
using namespace std;

int main(){
  int H, W, K;
  int ans = 0;
  int num = 0;
  string S = "";
  cin >> H >> W >> K;
  vector<vector<int>> c(H, vector<int>(W));
  vector<int> binH(H);
  vector<int> binW(W);
  
  for (int i = 0; i < H; i++){
    binH[i] = pow(2, i);
  }
  for (int i = 0; i < W; i++){
    binW[i] = pow(2, i);
  }
   
  for (int i = 0; i < H; i++){
    S = "";
    cin >> S;
    for (int j = 0; j < W; j++){
      if(S.c_str()[j] == '.'){
        c[i][j] = 0;
      }else if(S.c_str()[j] == '#'){
        c[i][j] = 1;
      }
    }
  }
  int maxH = pow(2, H);
  int maxW = pow(2, W);
  
  for (int iH = 0; iH < maxH; iH++){
    for (int iW = 0; iW < maxW; iW++){
      num = 0;
      for (int i = 0; i < H; i++){
        for (int j = 0; j < W; j++){
          if(c[i][j] * ((iH / binH[i]) % 2) * ((iW / binW[j]) % 2) == 1){
            num += 1;
          }
        }
      }
      if (num == K) ans += 1;
    }
  }
  cout << ans << "\n";

Compiler output:
a.cc: In function 'int main()':
a.cc:51:23: error: expected '}' at end of input
   51 |   cout << ans << "\n";
      |                       ^
a.cc:7:11: note: to match this '{'
    7 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <string>
#include <bitset>

using namespace std;



int main(void) {
	int H, W, K;
	cin >> H >> W >> K;
	vector<int> c(H,0); //行のビット情報
	int number_black=0;
	for (int i = 0; i < H; i++) {
		for (int j = 0; j < W; j++) {
			string test;
			cin >> test;
			if (test == "#") {
				c[H] |= (1 << j); //ビットを立てる
				number_black++;
			}
			else {
			}
		}
	}

	int ans = 0;
	for (int row = 0; row < (1 << H); row++) {
		for (int column = 0; column < (1 << W); column++) {
			//上の行からスタートする。
			int draw_black =0; //黒のカウント
			for (int i = 0; i < H; i++) {
				if (!row&(1 << i)) {
					//この行が選択されていないとき
					int test = column & c[row];
					for (int k = 0; k < W; k++) {
						//ビットの数を数える
						if (test&(1 << k)) draw_black++;
					}
				}
				else {
					//この行が選択されているとき
					for (int k = 0; k < W; k++) {
						//ビットの数を数える
						if (c[row]&(1 << k)) draw_black++;
					}
				}
			}
			if (K == number_black - draw_black) ans++;
		}
	}
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'vector' was not declared in this scope
   12 |         vector<int> c(H,0); //行のビット情報
      |         ^~~~~~
a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    3 | #include <bitset>
  +++ |+#include <vector>
    4 | 
a.cc:12:16: error: expected primary-expression before 'int'
   12 |         vector<int> c(H,0); //行のビット情報
      |                ^~~
a.cc:19:33: error: 'c' was not declared in this scope
   19 |                                 c[H] |= (1 << j); //ビットを立てる
      |                                 ^
a.cc:35:61: error: 'c' was not declared in this scope
   35 |                                         int test = column & c[row];
      |                                                             ^
a.cc:45:53: error: 'c' was not declared in this scope
   45 |                                                 if (c[row]&(1 << k)) draw_black++;
      |                                                     ^
Language: C++

6 6 8
..##..
.#..#.
#....#
######
#....#
#....#

Compiler output:
a.cc:2:3: error: stray '##' in program
    2 | ..##..
      |   ^~
a.cc:3:2: error: stray '#' in program
    3 | .#..#.
      |  ^
a.cc:3:5: error: stray '#' in program
    3 | .#..#.
      |     ^
a.cc:4:2: error: invalid preprocessing directive #...
    4 | #....#
      |  ^~~
a.cc:5:1: error: stray '##' in program
    5 | ######
      | ^~
a.cc:5:3: error: stray '##' in program
    5 | ######
      |   ^~
a.cc:5:5: error: stray '##' in program
    5 | ######
      |     ^~
a.cc:6:2: error: invalid preprocessing directive #...
    6 | #....#
      |  ^~~
a.cc:7:2: error: invalid preprocessing directive #...
    7 | #....#
      |  ^~~
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 6 6 8
      | ^
Language: C++

int main(void) {
    ll H, W, K;
    cin >> H >> W >> K;
 
    vector<string> c(H);
    rep(i, H)
        cin >> c[i];
 
    ull a = 0;
    ll ans = 0;
    while (a < (1 << (H + W))) {
        bitset<64> b(a);
 
        ll cnt = 0;
        rep(yy, H) rep(xx, W) {
            if(!b[yy] && !b[W + xx])
                continue;
            if (c[yy][xx] == '#')
                cnt++;
        }
        if (cnt == K)
            ans++;
        a++;
    }
 
    cout << ans << endl;
 
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:2:5: error: 'll' was not declared in this scope
    2 |     ll H, W, K;
      |     ^~
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> H >> W >> K;
      |     ^~~
a.cc:3:12: error: 'H' was not declared in this scope
    3 |     cin >> H >> W >> K;
      |            ^
a.cc:3:17: error: 'W' was not declared in this scope
    3 |     cin >> H >> W >> K;
      |                 ^
a.cc:3:22: error: 'K' was not declared in this scope
    3 |     cin >> H >> W >> K;
      |                      ^
a.cc:5:5: error: 'vector' was not declared in this scope
    5 |     vector<string> c(H);
      |     ^~~~~~
a.cc:5:12: error: 'string' was not declared in this scope
    5 |     vector<string> c(H);
      |            ^~~~~~
a.cc:5:20: error: 'c' was not declared in this scope
    5 |     vector<string> c(H);
      |                    ^
a.cc:6:9: error: 'i' was not declared in this scope
    6 |     rep(i, H)
      |         ^
a.cc:6:5: error: 'rep' was not declared in this scope
    6 |     rep(i, H)
      |     ^~~
a.cc:9:5: error: 'ull' was not declared in this scope
    9 |     ull a = 0;
      |     ^~~
a.cc:10:7: error: expected ';' before 'ans'
   10 |     ll ans = 0;
      |       ^~~~
      |       ;
a.cc:11:12: error: 'a' was not declared in this scope
   11 |     while (a < (1 << (H + W))) {
      |            ^
a.cc:12:9: error: 'bitset' was not declared in this scope
   12 |         bitset<64> b(a);
      |         ^~~~~~
a.cc:12:20: error: 'b' was not declared in this scope
   12 |         bitset<64> b(a);
      |                    ^
a.cc:14:11: error: expected ';' before 'cnt'
   14 |         ll cnt = 0;
      |           ^~~~
      |           ;
a.cc:15:13: error: 'yy' was not declared in this scope
   15 |         rep(yy, H) rep(xx, W) {
      |             ^~
a.cc:21:13: error: 'cnt' was not declared in this scope; did you mean 'int'?
   21 |         if (cnt == K)
      |             ^~~
      |             int
a.cc:22:13: error: 'ans' was not declared in this scope
   22 |             ans++;
      |             ^~~
a.cc:26:5: error: 'cout' was not declared in this scope
   26 |     cout << ans << endl;
      |     ^~~~
a.cc:26:13: error: 'ans' was not declared in this scope
   26 |     cout << ans << endl;
      |             ^~~
a.cc:26:20: error: 'endl' was not declared in this scope
   26 |     cout << ans << endl;
      |                    ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <string>
using namespace std;
#define ll long long int

int main()
{
	int h, w, K, input = 0;
	string s;
	int ans = 0;

	cin >> h >> w >> K;
	vector<vector<int>> gyoretu(h,vector<int>(w));
	for (int i = 0; i < h; i++) {
		cin >> s;
		for (int k = 0; k < w; k++) {
			if (s[k] == '.') input = 0;
			else if (s[k] == '#') input = 1;
			else cout << "not accepted" << endl;
			gyoretu.at(i).at(k) = input;
		}			
	}

	auto count_kuro_flag = [](vector<vector<int>> input, int raw, int colum) {
		int ans = 0;
		for (int i = 0; i < input.size(); i++) {
			for (int k = 0; k < input.at(0).size(); k++) {
				if (((raw >> i) & 0b01) == 1 || ((colum >> k) & 0b01) == 1) {
					continue;
				}else {
					if (input.at(i).at(k) == 1) ans++;
				}
			}
		}
		return ans;
	};
	
	for (int i = 0; i < (int)pow(2,h); i++) {
		for (int j = 0; j < (int)pow(2,w); j++) {
			if (count_kuro_flag(gyoretu, i, j) == K) ans++;
		}
	}

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



Compiler output:
a.cc: In function 'int main()':
a.cc:39:34: error: 'pow' was not declared in this scope
   39 |         for (int i = 0; i < (int)pow(2,h); i++) {
      |                                  ^~~
Language: C++

#include <iostream>
#include <vector>
#include <string>
using namespace std;
#define ll long long int

int main()
{
	int h, w, K, input = 0;
	string s;
	int flag_raw;
	int flag_colum;
	int ans = 0;

	cin >> h >> w >> K;
	vector<vector<int>> gyoretu(h,vector<int>(w));
	for (int i = 0; i < h; i++) {
		cin >> s;
		for (int k = 0; k < w; k++) {
			if (s[k] == '.') input = 0;
			else if (s[k] == '#') input = 1;
			else cout << "not accepted" << endl;
			gyoretu.at(i).at(k) = input;
		}			
	}

	auto count_kuro_flag = [](vector<vector<int>> input, int raw, int colum) {
		int ans = 0;
		for (int i = 0; i < input.size(); i++) {
			for (int k = 0; k < input.at(0).size(); k++) {
				if ((raw >> i) & 0b01 == 1 || (colum >> k) & 0b01 == 1) {
					continue;
				}else {
					if (input.at(i).at(k) == 1) ans++;
				}
			}
		}
		return ans;
	};
	
	for (int i = 0; i < (int)pow(2,h); i++) {
		for (int j = 0; j < (int)pow(2,w); j++) {
			if (count_kuro_flag(gyoretu, i, j) == K) ans++;
		}
	}

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



Compiler output:
a.cc: In function 'int main()':
a.cc:41:34: error: 'pow' was not declared in this scope
   41 |         for (int i = 0; i < (int)pow(2,h); i++) {
      |                                  ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define all(v) v.begin(),v.end()

int main() {
  int h,w,k;
  cin >> h >> w >> k;
  char c[h][w];
  for(int i=0;i<h;i++){
  	for(int j=0;j<w;j++){
    	cin >> c[i][j];
    }
    cout << endl;
  }
  
  int result=0;
  for(int bit1=0;bit1<(1<<h);bit1++){
  	for(int bit2=0;bit2<(1<<w);bit2++){
      char d[h][w];
      d[h][c]=c[h][w];
      int count=0;
      for(int i=0;i<h;i++){
         if(bit1&(1<<i)){
         	for(int j=0;j<w;j++){
            	c[i][j]=' ';
            }
         }
      }
      for(int i=0;i<w;i++){
         if(bit2&(1<<i)){
         	for(int j=0;j<h;j++){
            	d[j][i]=' ';
            }
         }
      }
      for(int i=0;i<h;i++){
  	    for(int j=0;j<w;j++){
    	if(d[i][j]=='#'){count++;}
   		 }
 	  }
      if(count==k)result++;
    }
  }
  
  cout << result;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:11: error: invalid types 'char [w][char [h][w]]' for array subscript
   21 |       d[h][c]=c[h][w];
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define all(v) v.begin(),v.end()

int main() {
  int h,w,k;
  cin >> h >> w >> k;
  char c[h][w];
  for(int i=0;i<h;i++){
  	for(int j=0;j<w;j++){
    	cin >> c[i][j];
    }
    cout << endl;
  }
  
  int result=0;
  for(int bit1=0;bit1<(1<<h);bit1++){
  	for(int bit2=0;bit2<(1<<w);bit2++){
      char d[h][w]=c[h][w];
      int count=0;
      for(int i=0;i<h;i++){
         if(bit1&(1<<i)){
         	for(int j=0;j<w;j++){
            	c[i][j]=' ';
            }
         }
      }
      for(int i=0;i<w;i++){
         if(bit2&(1<<i)){
         	for(int j=0;j<h;j++){
            	d[j][i]=' ';
            }
         }
      }
      for(int i=0;i<h;i++){
  	    for(int j=0;j<w;j++){
    	if(d[i][j]=='#'){count++;}
   		 }
 	  }
      if(count==k)result++;
    }
  }
  
  cout << result;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:26: error: array must be initialized with a brace-enclosed initializer
   20 |       char d[h][w]=c[h][w];
      |                    ~~~~~~^