Language: C++

#include <bits/stdc++.h>
#define int long long
#define p pair<int, int>
#define endl '\n'
const int INF = 1000000001;
const long double E = 0.00000001;

using namespace std;

signed main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    int n, m, k;
    cin >> n >> m >> k;
    vector<vector<char>> a(n, vector<char>(m));
    for (int q = 0; q < n; q++){
        for (int q1 = 0; q1 < m; q1++){
            cin >> a[q][q1];
        }
    }
    int ans = 0;
    for (int q = 0; q < (1 << n); q++){
        for (int q1 = 0; q1 < (1 << m); q1++){
            vector<vector<char>> s = a;
            for (int q2 = 0; q2 < n; q2++){
                if ((q >> q2) & 1){
                    for (int q3 = 0; q3 < m; q3++){
                        s[q2][q3] = '$';
                    }
                }
            }
            for (int q2 = 0; q2 < m; q2++){
                if ((q1 >> q2) & 1){
                    for (int q3 = 0; q3 < n; q3++){
                        s[q3][q2] = '$';
                    }
                }
            }
            int quan = 0;
            for (int q2 = 0; q2 < n; q2++){
                for (int q3 = 0; q3 < m; q3++){
                    quan += (s[q2][q3] == '#');
                }
            }
            ans += (quan == k);
        }
    }
    cout << ans << endl;
    return 0;
}
#include <bits/stdc++.h>
#define int long long
#define p pair<int, int>
#define endl '\n'
const int INF = 1000000001;
const long double E = 0.00000001;

using namespace std;

signed main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    int n, m, k;
    cin >> n >> m >> k;
    vector<vector<char>> a(n, vector<char>(m));
    for (int q = 0; q < n; q++){
        for (int q1 = 0; q1 < m; q1++){
            cin >> a[q][q1];
        }
    }
    int ans = 0;
    for (int q = 0; q < (1 << n); q++){
        for (int q1 = 0; q1 < (1 << m); q1++){
            vector<vector<char>> s = a;
            for (int q2 = 0; q2 < n; q2++){
                if ((q >> q2) & 1){
                    for (int q3 = 0; q3 < m; q3++){
                        s[q2][q3] = '$';
                    }
                }
            }
            for (int q2 = 0; q2 < m; q2++){
                if ((q1 >> q2) & 1){
                    for (int q3 = 0; q3 < n; q3++){
                        s[q3][q2] = '$';
                    }
                }
            }
            int quan = 0;
            for (int q2 = 0; q2 < n; q2++){
                for (int q3 = 0; q3 < m; q3++){
                    quan += (s[q2][q3] == '#');
                }
            }
            ans += (quan == k);
        }
    }
    cout << ans << endl;
    return 0;
}


Compiler output:
a.cc:56:11: error: redefinition of 'const long long int INF'
   56 | const int INF = 1000000001;
      |           ^~~
a.cc:5:11: note: 'const long long int INF' previously defined here
    5 | const int INF = 1000000001;
      |           ^~~
a.cc:57:19: error: redefinition of 'const long double E'
   57 | const long double E = 0.00000001;
      |                   ^
a.cc:6:19: note: 'const long double E' previously defined here
    6 | const long double E = 0.00000001;
      |                   ^
a.cc:61:8: error: redefinition of 'int main()'
   61 | signed main(){
      |        ^~~~
a.cc:10:8: note: 'int main()' previously defined here
   10 | signed main(){
      |        ^~~~