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

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

void solve() {
    int t; cin>>t;
    int a = 0, b=0, c=0, d=0;
    rep(i, 0, n) {
        string s; cin>>s;
        if(s == "AC")
            a++;
        else if (s == "WA")
            b++;
        else if (s == "TLE")
            c++;
        else
            d++;
    }
    cout << "AC x " << a << "\n";  
    cout << "WA x " << b << "\n";  
    cout << "TLE x " << c << "\n";  
    cout << "RE x " << d << "\n";  

}

int main() {
    int t = 1; //scanf("%d", &t);
    while(t--) {
        solve();
    }
    return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:8:9: error: 'i' was not declared in this scope
    8 |     rep(i, 0, n) {
      |         ^
a.cc:8:15: error: 'n' was not declared in this scope
    8 |     rep(i, 0, n) {
      |               ^
a.cc:8:5: error: 'rep' was not declared in this scope
    8 |     rep(i, 0, n) {
      |     ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int n;
  cin >> n;
  
  vector<string> s(n);
  for(int i=0; i<n; i++){
    cin >> s[i];
  }
  
  vector<int> a(4);
  for(int j=0; i<n; j++){
    if(s[j] == "AC"){
      a[0]++;
    }
    else if(s[j] == "WA"){
      a[1]++;
    }
    else if(s[j] == "TLE"){
      a[2]++;
    }
    else{
      a[3]++;
    }
  }
  
    cout << "AC x " << a[0] << endl;
    cout << "WA x " << a[1] << endl;
    cout << "TLE x " << a[2] << endl;
    cout << "RE x " << a[3] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: 'i' was not declared in this scope
   14 |   for(int j=0; i<n; j++){
      |                ^
Language: C++

lude "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--)
#define FOR(i, m, n) for(int i = (m);i < (n);i++)
#define FORR(i, m, n) for(int i = (m);i >= (n);i--)
#define SORT(v, n) std::sort(v, v+n);
#define VSORT(v) std::sort(v.begin(), v.end());
#define VRSORT(v) std::sort(v.rbegin(), v.rend());
#define ll long long
#define pb(a) push_back(a)
#define ALL(obj) (obj).begin(),(obj).end()

using namespace std;

const int INF = 99999999;
const ll LINF = 9999999999999;

typedef pair<ll, ll> LP;
int dx[4] = { 1,0,-1,0 };
int dy[4] = { 0,1,0,-1 };


ll N,ac=0,wa=0,tle=0,re=0;
int main() {
	cin >> N;

	REP(i, N) {
		string tmp;
		cin >> tmp;
		if (tmp == "AC") {
			ac++;
		}
		if (tmp == "TLE") {
			tle++;
		}
		if (tmp == "WA") {
			wa++;
		}
		if (tmp == "re") {
			re++;
		}
	}

	cout << "AC x " << ac << endl;
	cout << "WA x " << wa << endl;

	cout << "TLE x " << tle << endl;

	cout << "RE x " << re << endl;

	return 0;

}

Compiler output:
a.cc:1:1: error: 'lude' does not name a type
    1 | lude "bits/stdc++.h"
      | ^~~~
a.cc:19:9: error: 'pair' does not name a type
   19 | typedef pair<ll, ll> LP;
      |         ^~~~
a.cc: In function 'int main()':
a.cc:26:9: error: 'cin' was not declared in this scope
   26 |         cin >> N;
      |         ^~~
a.cc:29:17: error: 'string' was not declared in this scope
   29 |                 string tmp;
      |                 ^~~~~~
a.cc:30:24: error: 'tmp' was not declared in this scope
   30 |                 cin >> tmp;
      |                        ^~~
a.cc:45:9: error: 'cout' was not declared in this scope
   45 |         cout << "AC x " << ac << endl;
      |         ^~~~
a.cc:45:34: error: 'endl' was not declared in this scope
   45 |         cout << "AC x " << ac << endl;
      |                                  ^~~~
Language: C++

#include<bits/stdc++.h>
#define int long long
using namespace std;
int n,a[5];
signed main()
{
	scanf("%lld",&n);
	while(n--)
	{
		string s;
		cin>>s;
		switch(s){
			case "AC":{
				a[1]++;
				break;
			}
			case "WA":{
				a[2]++;
				break;
			}
			case "TLE":{
				a[3]++;
				break;
			}
			case "RE":{
				a[4]++;
				break;
			}
		}
	}
	cout<<"AC x "<<a[1]<<endl<<"WA x "<<a[2]<<endl<<"TLE x "<<a[3]<<endl<<"RE x "<<a[4];
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:24: error: switch quantity not an integer
   12 |                 switch(s){
      |                        ^
Language: C++

//  Author : Amit Kumar 

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

int main(void){
#ifdef HELL_JUDGE
    auto INITIAL_TIME = high_resolution_clock::now();
#endif 
    map<string , int>f; 
    f["AC"] = 0; 
    f["WA"] = 0;
    f["RE"] = 0;
    f["TLE"] = 0;
    while(n--){
        string s; cin >> s; 
        f[s]++;
    }
    printf("AC x %d\n",f["AC"]);
    printf("WA x %d\n",f["WA"]);
    printf("TLE x %d\n",f["TLE"]);
    printf("RE x %d\n",f["RE"]);

#ifdef HELL_JUDGE
    auto FINAL_TIME = high_resolution_clock::now();
    cout << "Time : "
         << duration_cast<milliseconds>(FINAL_TIME-INITIAL_TIME).count() 
         << " ms" << '\n'; 
#endif 
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:11: error: 'n' was not declared in this scope
   16 |     while(n--){
      |           ^
Language: C++

//To debug :  g++ -g file.cpp -o code
//to flush output : fflush(stdout) or cout.flush()
//cout<<setprecision(p)<<fixed<<var
//use 1LL<<i to for 64 bit shifting , (ll)2 because by default 2 is ll
 
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,a,n) for(i=a;i<n;++i)
#define irep(i,n,a) for(i=n;i>a;--i)
#define mod 1000000007
#define pb push_back
#define big 9223372036854775807
#define big1 LONG_MAX
#define big2 ll_MAX
#define big3 1000000000
#define sma1 LONG_MIN
#define sma2 ll_MIN
#define sma3 -1000000000
#define mp make_pair
#define dub double
#define ivec vector<ll>
#define lvec vector<long long>
#define cvec vector<char>
#define svec vector<string>
#define mt make_tuple
#define MOD 998244353
#define ld long double
#define pi acos(-1.0)

#define SZ(x)  (ll)(x.size())

//comment the below if now required

#define ss second.second
#define ff first.first
#define f first
#define s second
#define sf second.first
#define fs first.second


#define IOS std::ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)

int main()
{

    ll n;
   
    string s;

    map<string,n> m;

    cin>>n;

    while(n--)
    {
        cin>>s;
        ++m[s];

        cout<<"AC"<<" x "<<m["AC"]<<"\n";

                cout<<"WA"<<" x "<<m["WA"]<<"\n";

                            cout<<"TLE"<<" x "<<m["TLE"]<<"\n";

                cout<<"RE"<<" x "<<m["RE"]<<"\n";


    }


    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:52:17: error: type/value mismatch at argument 2 in template parameter list for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
   52 |     map<string,n> m;
      |                 ^
a.cc:52:17: note:   expected a type, got 'n'
a.cc:52:17: error: template argument 4 is invalid
a.cc:59:12: error: no match for 'operator[]' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   59 |         ++m[s];
      |            ^
Language: C++

from collections import Counter
import sys

sys.setrecursionlimit(10 ** 6)

mod = 1000000007
inf = int(1e18)

dx = [0, 1, 0, -1]
dy = [1, 0, -1, 0]


def inverse(a):
    return pow(a, mod - 2, mod)


def usearch(x, a):
    lft = 0
    rgt = len(a) + 1
    while rgt - lft > 1:
        mid = (rgt + lft) // 2
        if a[mid] <= x:
            lft = mid
        else:
            rgt = mid
    return lft



def main():
    n = int(input())
    s = [input() for i in range(n)]
    r = {}
    for x in s:
        r[x] = r.get(x, 0) + 1

    for i in ['AC', 'WA', "TLE", "E"]:
        print("{} x {}".format(i, r.get(i, 0)))

main()

Compiler output:
a.cc:37:15: warning: multi-character character constant [-Wmultichar]
   37 |     for i in ['AC', 'WA', "TLE", "E"]:
      |               ^~~~
a.cc:37:21: warning: multi-character character constant [-Wmultichar]
   37 |     for i in ['AC', 'WA', "TLE", "E"]:
      |                     ^~~~
a.cc:1:1: error: 'from' does not name a type
    1 | from collections import Counter
      | ^~~~
a.cc:34:5: error: expected unqualified-id before 'for'
   34 |     for x in s:
      |     ^~~
Language: Java

//Created by Aminul on 7/5/2020.

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

import static java.lang.Math.*;

public class B {
    public static void main(String[] args) throws Exception {
        Scanner in = new Scanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
        HashMap<String, Integer> map = new HashMap<>();
        int n = in.nextInt();
        for (int i = 0; i < n; i++) {
            String s = in.next();
            map.put(s, map.getOrDefault(s, 0) + 1);
        }

        pw.println("AC x " + map.getOrDefault("AC", 0));
        pw.println("AC x " + map.getOrDefault("WA", 0));
        pw.println("TLE x " + map.getOrDefault("TLE", 0));
        pw.println("RE x " + map.getOrDefault("RE", 0));


        pw.close();
    }

    static void debug(Object... obj) {
        System.err.println(Arrays.deepToString(obj));
    }
}

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

n = gets.to_i
a = [0,0,0,0]
n.times do
    s = gets.chomp
    a[0] += 1 if s == "AC"
    a[1] += 1 if s == "WA"
    a[2] += 1 if s == "TLE"
    a[3] += 1 if s == "RE"
end
puts "AC x #{a[0]}"
puts "WA x #{a[1]}"
puts "TLE x #{a[2]}"
puts "RE x #{a[3]}"

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = gets.to_i
      | ^
Language: C++

#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define pii pair<int, int>
#define pll pair<ll, ll>
#define str string
#define fi first
#define se second
#define pb push_back
#define SET(a, b) memset(a, b, sizeof(a))
#define eps 1e-6
#define pi atan(1) * 4
#define mod 1000000007
#define inf 1000000000
#define llinf 1000000000000000000
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define FORD(i, a, b) for (int i = (a); i >= (b); i--)
#define FORl(i, a, b) for (ll i = (a); i <= (b); i++)
#define FORDl(i, a, b) for (ll i = (a); i >= (b); i--)
using namespace std;
map<string, int> freq;
string vd[4] = ["AC", "WA", "TLE", "RE"];
int main () {
  ios::sync_with_stdio(false); cin.tie(0);
  int t;
  cin >> t;
  FOR(i, 1, t) {
    string S;
    cin >> S;
    freq[S]++;
  }
  FOR(i, 0, 3) {
    printf("%s x %d\n", vd[i].c_str(), freq[vd[i]]);
  }
  return 0;
}

Compiler output:
a.cc:22:17: error: expected identifier before string constant
   22 | string vd[4] = ["AC", "WA", "TLE", "RE"];
      |                 ^~~~
a.cc:22:21: error: expected ']' before ',' token
   22 | string vd[4] = ["AC", "WA", "TLE", "RE"];
      |                     ^
      |                     ]
a.cc: In lambda function:
a.cc:22:21: error: expected '{' before ',' token
a.cc: At global scope:
a.cc:22:16: error: array must be initialized with a brace-enclosed initializer
   22 | string vd[4] = ["AC", "WA", "TLE", "RE"];
      |                ^~~~~
a.cc:22:23: error: expected unqualified-id before string constant
   22 | string vd[4] = ["AC", "WA", "TLE", "RE"];
      |                       ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define R cin>>
#define ll long long
#define ln cout<<'\n'
#define in(a) insert(a)
#define pb(a) push_back(a)
#define pd(a) printf("%.10f\n",a)
#define mem(a) memset(a,0,sizeof(a))
#define all(c) (c).begin(),(c).end()
#define iter(c) __typeof((c).begin())
#define rrep(i,n) for(ll i=(ll)(n)-1;i>=0;i--)
#define REP(i,m,n) for(ll i=(ll)(m);i<(ll)(n);i++)
#define rep(i,n) REP(i,0,n)
#define tr(it,c) for(iter(c) it=(c).begin();it!=(c).end();it++)
ll check(ll n,ll m,ll x,ll y){return x>=0&&x<n&&y>=0&&y<m;}void pr(){ln;}
template<class A,class...B>void pr(const A &a,const B&...b){cout<<a<<(sizeof...(b)?" ":"");pr(b...);}
template<class A>void PR(A a,ll n){rep(i,n)cout<<(i?" ":"")<<a[i];ln;}
const ll MAX=1e9+7,MAXL=1LL<<61,dx[8]={-1,0,1,0,-1,-1,1,1},dy[8]={0,1,0,-1,-1,1,1,-1};
typedef pair<ll,ll> P;

void Main() {
  ll n;
  R n;
  map<string,int> m;
  rep(i,n) {
    string s;
    R s;
    m[s]++;
  }
  pr("AC","x",m["AC"]);
  pr("WA","x",m["WA"]);
  pr("TLE","x",m["TLE"]);
  pr("RE","x",,m["RE"]);
}

int main(){ios::sync_with_stdio(0);cin.tie(0);Main();return 0;}


Compiler output:
a.cc: In function 'void Main()':
a.cc:36:15: error: expected primary-expression before ',' token
   36 |   pr("RE","x",,m["RE"]);
      |               ^
Language: C++

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

int main(){
  int H,W,K;cin>>H>>W>>K;
  char A[H][W];
  for(int i=0;i<H;i++){
    for(int j=0;j<W;j++) cin>>A[i][j];
  }
  int ans=0;
  for(int s=0;s<(1<<H);s++){
    for(int t=0;t<(1<<W);t++){
      int black=0;
      for(int i=0;i<H;i++){
        for(int j=0;j<W;j++){
          if(((s>>i) & 1)==0 && ((t>>j) &1)== 0 && C[i][j]=='#') black++;
          
          if(black==K) ans++;
        }
      }
    }
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:52: error: 'C' was not declared in this scope
   16 |           if(((s>>i) & 1)==0 && ((t>>j) &1)== 0 && C[i][j]=='#') black++;
      |                                                    ^
Language: C++

#include<bits/stdc++.h>
int main() {
    int n,m,k;
    cin>>n>>m>>k;
    char s[11][11];
    for(int i=0;i<n;i++){
        cin>>s[i];
    }
    int lim=(1<<(n+m));
    int ans=0;
    for(int mask=0;mask<lim;mask++){
        int cnt=0;
        for(int i=0;i<n;i++){
            for(int j=0;j<m;j++){
                if(s[i][j]=='#'&&!(mask&(i<<i))&&!(mask&(1<<(n+j))))
                    cnt++;
                if(cnt==k)ans++;
            }
        }
    }
    cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |     cin>>n>>m>>k;
      |     ^~~
      |     std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:21:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   21 |     cout<<ans<<endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:21:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   21 |     cout<<ans<<endl;
      |                ^~~~
      |                std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

int main(){
  int H,W,K,count,ans=0;
  cin >> H >> W >> K;
  
  vector<vector<string>> table(H+1,vector<string>(W+1,.));
  
  for(int i=0; i<H; i++){
    for(int j=0; j<W; j++){
      cin >> table.at(i).at(j);
    }
  }
  
  rep(i,H+1){
    rep(j,W+1){
      count=0
      rep(k,H+1){
        rep(l,W+1){
          table.at(i).at(l)=".";
          table.at(k).at(j)=".";
        }
      }
      rep(m,H+1){
        rep(n,W+1){
          if(table.at(m).at(n)=="#") count++;
        }
      }
      if(count==K) ans++;
    }
  }
      
   cout << ans << endl;
      
}    

Compiler output:
a.cc: In function 'int main()':
a.cc:10:50: error: expected primary-expression before '(' token
   10 |   vector<vector<string>> table(H+1,vector<string>(W+1,.));
      |                                                  ^
a.cc:10:55: error: expected primary-expression before '.' token
   10 |   vector<vector<string>> table(H+1,vector<string>(W+1,.));
      |                                                       ^
a.cc:10:56: error: expected unqualified-id before ')' token
   10 |   vector<vector<string>> table(H+1,vector<string>(W+1,.));
      |                                                        ^
a.cc:20:14: error: expected ';' before 'for'
   20 |       count=0
      |              ^
      |              ;
a.cc:21:11: error: 'k' was not declared in this scope
   21 |       rep(k,H+1){
      |           ^
a.cc:2:31: note: in definition of macro 'rep'
    2 | #define rep(i,n) for(int i=0; i<(n); i++)
      |                               ^
Language: Java

import java.util.*;
public class Atcoder4 {

	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 count_Bl=0;
		int result=0;
		int[][] board =new int[h][w];
		
		for(int i=0;i<h;i++){
			String input=sc.next();
			for(int j=0;j<w;j++){
				if(input.charAt(j)=='#'){
					board[i][j] = 1;
				}else{
					board[i][j] = 0;
				}

			}
		}  
		for(int i=0;i<Math.pow(2,h);i++){
			String paH=String.format("%6s",Integer.toBinaryString(i));
			for(int j=0;j<Math.pow(2,w);j++){
				String paW=String.format("%6s",Integer.toBinaryString(j));

				for(int n=0;n<h;n++){
					for(int m=0;m<w;m++){
						if(paH.charAt(6-h+n)!='1' && paW.charAt(6-w+m)!='1'){
							if(board[n][m]==1){
								count_Bl+=1;
							}
						}
					}   
				}
				if(count_Bl==k){
					result+=1;
				}
				count_Bl=0;
			} 
		}
		System.out.println(result);
	} 
}

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

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

int main(){
    int h,w,k,c;
    cin >> h >> w >> k >> c;

    vector<string> s(n);
    rep(i, n) 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:9:22: error: 'n' was not declared in this scope
    9 |     vector<string> s(n);
      |                      ^
Language: C++

#include <bits/stdc++.h>

using namespace std;
int n,m,k,sum = 0;
char a[10][10];
bool avail[10][10];
void reset(){
    for (int i = 1; i <= n; i++)
        for (int j = 1; j <= m; j++) avail[i][j] = false;
}
int main(){
    cin >> n >> m >> k;
    for (int i = 1; i <= n; i++){
        string s;
        cin >> s;
        for (int j = 1; j <= m; j++){
            a[i][j] = s[j - 1];
            if (a[i][j] == '#') sum++;
        }
    }
    for (int i = 0; i <= n; i++) a[i][0] = '.';
    for (int j = 0; j <= m; j++) a[0][j] = '.';
    int ans = 0;
    for (int i = 0; i < (1LL << (n + 1)); i += 2)
        for (int j = 0; j < (1LL << (m + 1)); j += 2){
            reset();
            int cnt = 0;
            for (int mask = 0; mask <= n; mask++)
                if ((i >> mask) & 1 == 1){                
                    for (int cj = 1; cj <= m; cj++)
                        if (avail[mask][cj] == false && a[mask][cj] == '#'){
                        avail[mask][cj] = true;
                        cnt++;
                        }
                }            
            for (int mask = 0; mask <= m; mask++)
                if ((j >> mask) & 1 == 1){                  
                    for (int ci = 1; ci <= n; ci++)
                        if (avail[ci][mask] == false && a[ci][mask] == '#'){
                            avail[ci][mask] = true;
                            cnt++;
                        }
                }
            if (sum - cnt == k){ans++;
        }
    cout << ans;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:48:2: error: expected '}' at end of input
   48 | }
      |  ^
a.cc:11:11: note: to match this '{'
   11 | int main(){
      |           ^
Language: C++

#include<vector>
using namespace std;
int main() {

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

	int ans = 0;
	for (int is = 0; is < 1 << H; is++) {
		for (int js = 0; js < 1 << W; js++) {
			int cnt = 0;
			for (int i = 0; i < H; i++) {
				for (int j = 0; j < W; j++) {
					if (is >> i || js >> j) continue;
					else 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:9: error: 'cin' was not declared in this scope
    6 |         cin >> H >> W >> K;
      |         ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<vector>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:7:16: error: 'string' was not declared in this scope
    7 |         vector<string> s(H);
      |                ^~~~~~
a.cc:2:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    1 | #include<vector>
  +++ |+#include <string>
    2 | using namespace std;
a.cc:7:22: error: template argument 1 is invalid
    7 |         vector<string> s(H);
      |                      ^
a.cc:7:22: error: template argument 2 is invalid
a.cc:9:25: error: invalid types 'int[int]' for array subscript
    9 |                 cin >> s[i];
      |                         ^
a.cc:19:51: error: invalid types 'int[int]' for array subscript
   19 |                                         else if (s[i][j] == '*') cnt++;
      |                                                   ^
a.cc:26:9: error: 'cout' was not declared in this scope
   26 |         cout << ans << endl;
      |         ^~~~
a.cc:26:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:26:24: error: 'endl' was not declared in this scope
   26 |         cout << ans << endl;
      |                        ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include<vector>
  +++ |+#include <ostream>
    2 | using namespace std;
Language: C++

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

int main(){
  int H,W,K;
  cin >> H >> W >> K;
  vector<vector<int>> C(H,vector<int>(W));
  for(int i=0;i<H;i++){
    for(int j=0;j<W;j++){
      cin >> C.at(i).at(j);
    }
  }
  int count=0;
  for(int bith=0;bith<(1<<H);bith++){
    for(int bitw=0;bitw<(1<<W);bitw++){
      int kuro=0;
      for(int i=0;i<H;i++){
        for(int j=0;j<W;j++){
          if(bith &(1<<i)){
            continue;
          }
          if(bitw &(1<<j)){
            continue;
          }
          if(C.at(i).at(j)=="#"){
            kuro++;
          }
        }
      }
      if(kuro==K){
        count++;
      }
    }
  }
  cout << count << endl;
}
      

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

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

int main() {
  ll h,w,k; cin >> h >> w >> k;
  vector<vector<ll>> grid(h, vector<ll>(w));
  rep(i, h){
    rep(j, w){
      char c; cin >> c;
      if(c == '#')
        grid[i][j] = 1;
      else
        grid[i][j] = 0:
    }
  }
  
  ll cnt;
 
  rep (bt, (1 << h)) {
    bitset<h> s(bt);
    rep (bbt, (1 << w)) {
      bitset<w> t(bbt);
    
      ll sum = 0;
        rep(i, h){
          rep(j, w){
            if(s.test(i) & t.test(j))
              sum += grid[i][j];
          }
        }
      if (sum == k)
        cnt++;
    }
  }
 
    cout << cnt << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:23: error: expected ';' before ':' token
   16 |         grid[i][j] = 0:
      |                       ^
      |                       ;
a.cc:23:13: error: the value of 'h' is not usable in a constant expression
   23 |     bitset<h> s(bt);
      |             ^
a.cc:8:6: note: 'll h' is not const
    8 |   ll h,w,k; cin >> h >> w >> k;
      |      ^
a.cc:23:13: note: in template argument for type 'long unsigned int'
   23 |     bitset<h> s(bt);
      |             ^
a.cc:25:15: error: the value of 'w' is not usable in a constant expression
   25 |       bitset<w> t(bbt);
      |               ^
a.cc:8:8: note: 'll w' is not const
    8 |   ll h,w,k; cin >> h >> w >> k;
      |        ^
a.cc:25:15: note: in template argument for type 'long unsigned int'
   25 |       bitset<w> t(bbt);
      |               ^
a.cc:30:18: error: request for member 'test' in 's', which is of non-class type 'int'
   30 |             if(s.test(i) & t.test(j))
      |                  ^~~~
a.cc:30:30: error: request for member 'test' in 't', which is of non-class type 'int'
   30 |             if(s.test(i) & t.test(j))
      |                              ^~~~
Language: C++



int  n, m, k;

char a[MAX][MAX];


int line[MAX], col[MAX];
 
int main () {
  
  
  scanf("%d %d %d",&n,&m, &k);
  
  for(int i = 0 ;i  < n;i++) {
    scanf("%s", a[i]);
  }
  
  int ans = 0;
  
  for(int i = 0;i < (1 << n);i++) {
    for(int j = 0 ;j < ( 1 << m) ;j++) {
      
      int num = 0;
      
      for(int k = 0 ;k < n ;k++) {
        for(int y = 0 ; y < m ;y ++) {
          if ( a[k][y] == '#' ){
            bool l = ( 1 << k) & i;
            bool c = ( 1<< y) & j;
            
            if ( c||l ) {
              ++num;
            }
          }
        }
      }
 
      if ( num == k ) {
        ++ans;
      }
    }
  }
  
  printf("%d\n", ans );
  
  return 0;
}




Compiler output:
a.cc:5:8: error: 'MAX' was not declared in this scope
    5 | char a[MAX][MAX];
      |        ^~~
a.cc:5:13: error: 'MAX' was not declared in this scope
    5 | char a[MAX][MAX];
      |             ^~~
a.cc:8:10: error: 'MAX' was not declared in this scope
    8 | int line[MAX], col[MAX];
      |          ^~~
a.cc:8:20: error: 'MAX' was not declared in this scope
    8 | int line[MAX], col[MAX];
      |                    ^~~
a.cc: In function 'int main()':
a.cc:13:3: error: 'scanf' was not declared in this scope
   13 |   scanf("%d %d %d",&n,&m, &k);
      |   ^~~~~
a.cc:16:17: error: 'a' was not declared in this scope
   16 |     scanf("%s", a[i]);
      |                 ^
a.cc:28:16: error: 'a' was not declared in this scope
   28 |           if ( a[k][y] == '#' ){
      |                ^
a.cc:45:3: error: 'printf' was not declared in this scope
   45 |   printf("%d\n", ans );
      |   ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 |
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const long long INF = 1LL << 60; //intじゃ扱えないことに注意！
using P = pair<int,int>;
#define rep(i, n) for(int i = 0; i < (int)(n); i++) //範囲外参照とループの初期化に注意！

int main() {
    int h,w,k;
    cin >> h >> w >> k;
    vecot<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;  //i行目を消す
            if(js>>j&1) continue;  //j列目を消す
            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:5: error: 'vecot' was not declared in this scope
   11 |     vecot<string> s(h);
      |     ^~~~~
a.cc:11:17: error: expected primary-expression before '>' token
   11 |     vecot<string> s(h);
      |                 ^
a.cc:11:19: error: 's' was not declared in this scope
   11 |     vecot<string> s(h);
      |                   ^
Language: C++

#include <bits/stdc++.h>
#include <math.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
using ll = long long;
using vec = vector<ll>;
using vec2 = vector<vector<ll>>;
ll inf = pow(2, 62);

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

Compiler output:
a.cc: In function 'int main()':
a.cc:28:21: error: 'j' was not declared in this scope
   28 |                 reo(j, w)
      |                     ^
a.cc:28:17: error: 'reo' was not declared in this scope; did you mean 'rep'?
   28 |                 reo(j, w)
      |                 ^~~
      |                 rep
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int h = scn.nextInt();
    	int w = scn.nextInt();
    	int k = scn.nextInt();
    	char[][] c = new char[h][w];
    	for(int i=0;i<h;i++){
      		String s = sc.next();
      		for(int j=0;j<w;j++){
        		c[i][j] = s.charAt(j);
      		}
    	}
	}
}
//一旦保存

Compiler output:
Main.java:11: error: cannot find symbol
      		String s = sc.next();
      		           ^
  symbol:   variable sc
  location: class Main
1 error
Language: C

#include <stdio.h>
#define MAX_H 6
#define MAX_W 6
 
unsigned int two_exp(int x) {
  unsigned int n =1;
  int i;
  for (i=0; i<x; i++) {
    n *= 2;
  }
  return n;
}
 
int main(void) {
  unsigned char h, w, k;
  unsigned int i, j;
  int ans = 0;
  char col[MAX_H][MAX_W+1] = {0};
  scanf("%d%d%d",&h,&w,&k);
  for (i=0;i<h;i++) {
      scanf("%s",&col[i][0]);
  }
  
  for (i=0; i<two_exp(h);i++) {
    for (j=0; j<two_exp(w);j++) {
      unsigned int t, s;
      int block = 0;
      for (k
           t=0; t<h; t++) {
        if (block>k) {
          break;
        }
        for (s=0; s<w; s++) {
          if (col[k][l]=='#' && (t & i != 1) && (s & j !=1)) {
            block++;
          }
          if (block>k) {
            break;
          }
        }
      }
      if (block == k) ans++;
    }
  }
  
  printf("%d",ans);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:28:13: error: expected ';' before 't'
   28 |       for (k
      |             ^
      |             ;
   29 |            t=0; t<h; t++) {
      |            ~ 
main.c:34:22: error: 'l' undeclared (first use in this function)
   34 |           if (col[k][l]=='#' && (t & i != 1) && (s & j !=1)) {
      |                      ^
main.c:34:22: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<bits/stdc++.h>
typedef long long int ll;
using namespace std;

void solve()
{
    int h, w, k;
    cin >> h >> w >> k;
    string a[h];
    for(int i = 0; i < h; i++)
    {
        cin >> a[i];
    }
    int ans = 0;

    for(int mask = 0; mask<1<<(h+w); mask++)
    {
        int cnt = 0;
        for(int x=0; x<h; x++)
        {
            for(int y=0; y<w; y++)
            {
                if(a[x][y]!='#') continue;
                if(mask&((1<<x)|(1<<(h+y)))) continue;
                cnt++;
            }
        }
        if(cnt==k)
            ans++;
    }

    cout << ans << endl;
}


int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    solve();
    return 0;
}
#include<bits/stdc++.h>
typedef long long int ll;
using namespace std;

void solve()
{
    int h, w, k;
    cin >> h >> w >> k;
    string a[h];
    for(int i = 0; i < h; i++)
    {
        cin >> a[i];
    }
    int ans = 0;

    for(int mask = 0; mask<1<<(h+w); mask++)
    {
        int cnt = 0;
        for(int x=0; x<h; x++)
        {
            for(int y=0; y<w; y++)
            {
                if(a[x][y]!='#') continue;
                if(mask&((1<<x)|(1<<(h+y)))) continue;
                cnt++;
            }
        }
        if(cnt==k)
            ans++;
    }

    cout << ans << endl;
}


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


Compiler output:
a.cc:47:6: error: redefinition of 'void solve()'
   47 | void solve()
      |      ^~~~~
a.cc:5:6: note: 'void solve()' previously defined here
    5 | void solve()
      |      ^~~~~
a.cc:78:5: error: redefinition of 'int main()'
   78 | int main()
      |     ^~~~
a.cc:36:5: note: 'int main()' previously defined here
   36 | int main()
      |     ^~~~
Language: C++

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

std::vector<int> onesIndex(int n) {
	std::vector<int> ret;

	for (int k = 0; n != 0; ++k) {
		if (n % 2 == 1) {
			ret.push_back(k);
		}
		n = n / 2;
	}

	return ret;
}

int main() {
	int h, w, k;
	std::cin >> h >> w >> k;
	std::vector<std::vector<char>> grid;
	std::vector<int> rowSum(h);
	std::vector<int> heightSum(w);
	int t = 0;
	for (int i = 0; i < h; ++i) {
		std::string s;
		std::cin >> s;
		std::vector<char> v;
		for (int j = 0; j < w; ++j) {
			v.push_back(s[j]);
			if (s[j] == '#') {
				rowSum[i] += 1;
				heightSum[j] += 1;
				t += 1;
			}
		}
		grid.push_back(v);
	}

	int num = 0;
	for (int i = 0; i < std::pow(2,h); ++i) {
		for (int j = 0; j < std::pow(2,w); ++j) {
			int sum = 0;
			for (auto y : onesIndex(i)) {
				for (auto x : onesIndex(j)) {
					if (grid[y][x] == '#') {
						sum -= 1;
					}
				}
				sum += rowSum[y];
			}
			for (auto x : onesIndex(j)) {
				sum += heightSum[x];
			}

			if (t - sum == k) {
				num += 1;
			}
		}
	}

	std::cout << "sum:" << num << "\n";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:42:34: error: 'pow' is not a member of 'std'
   42 |         for (int i = 0; i < std::pow(2,h); ++i) {
      |                                  ^~~
a.cc:43:42: error: 'pow' is not a member of 'std'
   43 |                 for (int j = 0; j < std::pow(2,w); ++j) {
      |                                          ^~~
Language: C++

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

using namespace std;

int cal(vector<string> board,int high,int wide,int k){
  int p = 0;
  for(int i = 0;i<high;i++){
    for(int j = 0;j<wide;j++){
      if(board[i][j]=='#'){
        p++;
      }
    }
  }
  if(p==k){
    return 1;
  }else{
    return 0;
  }
}

int yokobo(vector<string> board,int loc,int high,int wide,int k){
  if(loc==wide){
    return cal(board,high,wide,k);
  }
  int p = yokobo(board,loc+1,high,wide,k);
  for(int i = 0;i<high,i++){
    board[i][loc]='.';
  }
  return p+yokobo(board,loc+1,high,wide,k);

int tatebo(vector<string> board,int loc,int high,int wide,int l){
  if(loc == high){
    return yokobo(board,0,high,wide,k);
  }
  int p =  tatebo(board,loc+1,high,wide,k);
  for(int i = 0;i<wide;i++){
    board[loc][i]= '.';
  }
  return tatebo(board,loc+1,high,wide,k)+p;

int main(void){
  int high,wide,k;
  cin >> hih >> wide >> k;
  vector<string> board(high);
  for(int i = 0;i<high,i++){
    cin >> board[i];
  }
  int ans = 0;
  for(int i = 0;i < 64;i++){
    ans = ans + tatebo(board,0,high,wide,k);
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int yokobo(std::vector<std::__cxx11::basic_string<char> >, int, int, int, int)':
a.cc:28:27: error: expected ';' before ')' token
   28 |   for(int i = 0;i<high,i++){
      |                           ^
      |                           ;
a.cc:33:65: error: a function-definition is not allowed here before '{' token
   33 | int tatebo(vector<string> board,int loc,int high,int wide,int l){
      |                                                                 ^
a.cc:56:2: error: expected '}' at end of input
   56 | }
      |  ^
a.cc:23:65: note: to match this '{'
   23 | int yokobo(vector<string> board,int loc,int high,int wide,int k){
      |                                                                 ^
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int h, w, k, cnt = 0;

void judge(bool b[6][6])
{
  int num = 0;
  for (int i = 0; i < h; i++)
	for (int j = 0; j < h; j++)
	  b[i][j] && num++;
  num == k && cnt++;
}

void enumit(bool b[6][6], int x)
{
  judge(b);
  
  bool d[6][6];
  while (x < h + w)
  {
    for (int i = 0; i < h; i++)
	  for (int j = 0; j < w; j++)
		d[i][j] = b[i][j];
	
	if (x < h)
	  for (int j = 0; j < w; j++)
		d[x][j] = false;
	else
	  for (int i = 0; i < h; i++)
		d[i][x-h] = false;
	
	enumit(d, x+1);
  }
}

int main()
{
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  
  cin >> h >> w >> k;
  
  char c[6][6];
  for (int i = 0; i < h; i++)
	cin >> c[i];
  
  bool b[6][6];
  for (int i = 0; i < h; i++)
    for (int j = 0; j < w; j++)
      b[i][j] = (c[i][j] == '#')
  
  judge(b);
  enumit(b, 0);
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:54:33: error: expected ';' before 'judge'
   54 |       b[i][j] = (c[i][j] == '#')
      |                                 ^
      |                                 ;
   55 | 
   56 |   judge(b);
      |   ~~~~~
Language: C++

#include <iostream>
#include <vector>

int h, w, k, cnt = 0;

void judge(bool b[6][6])
{
  int num = 0;
  for (int i = 0; i < h; i++)
	for (int j = 0; j < h; j++)
	  bool[i][j] && num++;
  num == k && cnt++;
}

void enumit(bool b[6][6], int x)
{
  judge(b);
  
  bool d[6][6];
  while (x < h + w)
  {
    for (int i = 0; i < h; i++)
	  for (int j = 0; j < w; j++)
		d[i][j] = b[i][j];
	
	if (x < h)
	  for (int j = 0; j < w; j++)
		d[x][j] = false;
	else
	  for (int i = 0; i < h; i++)
		d[i][x-h] = false;
	
	enumit(d, x+1);
  }
}

int main()
{
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  
  cin >> h >> w >> k;
  
  char c[6][6];
  for (int i = 0; i < h; i++)
	cin >> c[i];
  
  bool b[6][6];
  for (int i = 0; i < h; i++)
    for (int j = 0; j < w; j++)
      b[i][j] = (c[i][j] == '#')
  
  judge(b);
  enumit(b, 0);
  
  return 0;
}

Compiler output:
a.cc: In function 'void judge(bool (*)[6])':
a.cc:11:15: error: structured binding declaration cannot have type 'bool'
   11 |           bool[i][j] && num++;
      |               ^~~
a.cc:11:15: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:11:18: error: expected initializer before '[' token
   11 |           bool[i][j] && num++;
      |                  ^
a.cc:11:18: error: expected ';' before '[' token
a.cc: In function 'int main()':
a.cc:39:3: error: 'ios' has not been declared
   39 |   ios::sync_with_stdio(false);
      |   ^~~
a.cc:40:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   40 |   cin.tie(nullptr);
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:41:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   41 |   cout.tie(nullptr);
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:52:33: error: expected ';' before 'judge'
   52 |       b[i][j] = (c[i][j] == '#')
      |                                 ^
      |                                 ;
   53 | 
   54 |   judge(b);
      |   ~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define FOR(i, N) for (long i = 0; i < (N); i++)

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int H, W, K;
    cin >> H >> W >> K;
    vector<string> masu(H);
    string str;
    FOR(h, H) {
        cin >> masu[h];
    }

    int ans = 0;
    FOR(i, (1 << H)) {
        FOR(j, (1 << W)) {
            int count = 0;
            FOR(h, H) {
                FOR(w, W) {
                    if (i >> h == 1)
                        continue;
                    if (j >> W == 1)
                        continue;
                    if (masu[h][w] == "#")
                        count += 1;
                }
            }
            if (count == K) {
                ans += 1;
            }
        }
    }

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


Compiler output:
a.cc: In function 'int main()':
a.cc:27:36: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   27 |                     if (masu[h][w] == "#")
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define FOR(i, N) for (long i = 0; i < (N); i++)

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int H, W, K;
    cin >> H >> W >> K;
    vector<string> masu(H);
    string str;
    FOR(h, H) {
        cin >> masu[h];
    }

    int ans = 0;
    FOR(i, (1 << H)) {
        FOR (j, (1 << W){
            int count = 0;
            FOR(h, H) {
                FOR(w, W) {
                    if (i >> h == 1)
                        continue;
                    if (j >> W == 1)
                        continue;
                    if (masu[h][w] == "#")
                        count += 1;
                }
            }
            if (count == K) {
                ans += 1;
            }
        }
    }

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


Compiler output:
a.cc:39:2: error: unterminated argument list invoking macro "FOR"
   39 | }
      |  ^
a.cc: In function 'int main()':
a.cc:19:9: error: 'FOR' was not declared in this scope
   19 |         FOR (j, (1 << W){
      |         ^~~
a.cc:19:12: error: expected '}' at end of input
   19 |         FOR (j, (1 << W){
      |            ^
a.cc:18:22: note: to match this '{'
   18 |     FOR(i, (1 << H)) {
      |                      ^
a.cc:19:12: error: expected '}' at end of input
   19 |         FOR (j, (1 << W){
      |            ^
a.cc:6:12: note: to match this '{'
    6 | int main() {
      |            ^
Language: Java


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

        int h = sc.nextInt();
        int w = sc.nextInt();
        int k = sc.nextInt();

        String[][] c = new String[h][w];

        for (int row = 0; row < h; row++) {
            for (int col = 0; col < w; col++) {
                c[row][col] = sc.next();
            }
        }
        sc.close();
        for (int i = 0; i < h; h++) {
            for (int j = 0; j < w; j++) {
                sum = sum + equalK(c, h, w, k, i, j);
            }
        }
        System.out.println(String.valueOf(sum));
    }

    public static int equalK (String[][] c, int h, int w, int k, int i,int j) {
        int sum = 0;
        //列を赤く塗る
        for (int col = 0; col < h; col++) {
            c[col][j] = "red";
        }
        //行を赤く塗る
        for (int row = 0; row < w; row++) {
            c[i][row] = "red";

        }

        //黒を数える
        for (int row = 0; row < h; row++) {
            for (int col = 0; col < w; col++) {
                if (c[row][col] == "#") sum = sum + 1;
            }
        }
        if (sum == k){
            return 1;
        } else {
            return 0;
    }
    }
}

Compiler output:
Main.java:5: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.util.*;

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

        int h = sc.nextInt();
        int w = sc.nextInt();
        int k = sc.nextInt();

        String[][] c = new String[h][w];

        for (int row = 0; row < h; row++) {
            for (int col = 0; col < w; col++) {
                c[i][j] = sc.next();
            }
        }
        for (int i = 0; i < h; h++) {
            for (int j = 0; j < w; j++){
                sum = sum + count(c, h, w, k, i, j);
            }
        }
    }

    public static int count(String[][] c, int h, int w, int k, int i,int j) {
        int sum = 0;
        //列を赤く塗る
        for (int col = 0; col < h; col++) {
            c[col][j] = "red";
        }
        //行を赤く塗る
        for (int row = 0; row < w; row++) {
            c[i][row] = "red";

        }

        //黒を数える
        for (int row = 0; row < h; row++) {
            for (int col = 0; col < w; col++) {
                if (c[row][col] == "#") sum = sum + 1;
            }
        }

        return sum;
    }
}

Compiler output:
Main.java:16: error: cannot find symbol
                c[i][j] = sc.next();
                  ^
  symbol:   variable i
  location: class Main
Main.java:16: error: cannot find symbol
                c[i][j] = sc.next();
                     ^
  symbol:   variable j
  location: class Main
2 errors
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
  static int H;
  int W, K;
  int c = 0;
  string s;
  cin >> H >> W >> K;
  string matrix[H];
  for(int i=0;i<H;i++){
    cin >> s;
    matrix[i] = s;
  }
  int nob = 0;
  for(int i=0;i<H;i++){
    for(int j=0;j<W;j++){
        if(matrix[i][j]=='#'){
            nob++;
        }
    }
  }
  string row;
  for(int i=0;i<H;i++){
      int nb = nob;
      row = matrix[i];
      for(int j=0;j<W;j++){
          if(matrix[i][j]=='#'){
              nb--;
          }
          matrix[i][j] = "%"
      }
      if(nb < K){
          matrix[i] = row;
          continue;
      }else if(nb == K){
          c++;
      }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:26: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   31 |           matrix[i][j] = "%"
      |                          ^~~
      |                          |
      |                          const char*
a.cc:31:29: error: expected ';' before '}' token
   31 |           matrix[i][j] = "%"
      |                             ^
      |                             ;
   32 |       }
      |       ~
Language: C++

#include <iostream>
using namespace std;

#define SIZE 6

int main(void){
    int answer = 0;
    int H, W, K;
    char V[SIZE][SIZE];

    cin >> H >> W >> K;

    for(int i = 0; i < H; ++i){
        cin >> V[i];
    }

    for(int maskH = 0; maskH < (1 << H); ++maskH){
        for(int maskW = 0; maskW < (1 << W); ++maskW){
            black = 0;
            for(int i = 0; i < H; ++i){
                for(int j = 0; j < W; ++j){
                    if(((maskH >> i) & 1 == 0) && ((maskW >> j) & 1 == 0) && V[i][j] == '#'){
                        ++black;
                    }
                }
            }
            if(black == K) ++answer;
        }
    }

    cout << answer << endl;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:13: error: 'black' was not declared in this scope
   19 |             black = 0;
      |             ^~~~~