Language: C++

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

int h, w, i, j, y, x, k, ans;
char mat[10][10];
int main()
{
    cin >> h >> w >> k;
    for (i = 0; i < h; ++i)
        cin >> mat[i];

    for (i = 0; i < (1 << h); ++i) {
        for (j = 0; j < (1 << w); ++j) {
            int cnt = 0;
            for (y = 0; y < h; ++y) {
                if ((1 << y) & i)
                    continue;

                for (x = 0; x < w; ++x) {
                    if ((1 << x) & j)
                        continue;

                    if (mat[y][x] == '#')
                        cnt++;
                }
            }
            if (cnt == k)
                ans++;
        }
    }
    cout << ans << '\n';
}
cses subsets
#include <bits/stdc++.h>
using namespace std;

int h, w, i, j, y, x, k, ans;
char mat[10][10];

int count()
{
    int cnt = 0;
    for (y = 0; y < h; ++y) {
        if ((1 << y) & i)
            continue;

        for (x = 0; x < w; ++x) {
            if ((1 << x) & j)
                continue;

            if (mat[y][x] == '#')
                cnt++;
        }
    }
    return cnt;
}

int main()
{
    cin >> h >> w >> k;
    for (i = 0; i < h; ++i)
        cin >> mat[i];

    for (i = 0; i < (1 << h); ++i) {
        for (j = 0; j < (1 << w); ++j) {
            if (count() == k)
                ans++;
        }
    }
    cout << ans << '\n';
}

Compiler output:
a.cc:33:1: error: 'cses' does not name a type
   33 | cses subsets
      | ^~~~
a.cc:37:5: error: redefinition of 'int h'
   37 | int h, w, i, j, y, x, k, ans;
      |     ^
a.cc:4:5: note: 'int h' previously declared here
    4 | int h, w, i, j, y, x, k, ans;
      |     ^
a.cc:37:8: error: redefinition of 'int w'
   37 | int h, w, i, j, y, x, k, ans;
      |        ^
a.cc:4:8: note: 'int w' previously declared here
    4 | int h, w, i, j, y, x, k, ans;
      |        ^
a.cc:37:11: error: redefinition of 'int i'
   37 | int h, w, i, j, y, x, k, ans;
      |           ^
a.cc:4:11: note: 'int i' previously declared here
    4 | int h, w, i, j, y, x, k, ans;
      |           ^
a.cc:37:14: error: redefinition of 'int j'
   37 | int h, w, i, j, y, x, k, ans;
      |              ^
a.cc:4:14: note: 'int j' previously declared here
    4 | int h, w, i, j, y, x, k, ans;
      |              ^
a.cc:37:17: error: redefinition of 'int y'
   37 | int h, w, i, j, y, x, k, ans;
      |                 ^
a.cc:4:17: note: 'int y' previously declared here
    4 | int h, w, i, j, y, x, k, ans;
      |                 ^
a.cc:37:20: error: redefinition of 'int x'
   37 | int h, w, i, j, y, x, k, ans;
      |                    ^
a.cc:4:20: note: 'int x' previously declared here
    4 | int h, w, i, j, y, x, k, ans;
      |                    ^
a.cc:37:23: error: redefinition of 'int k'
   37 | int h, w, i, j, y, x, k, ans;
      |                       ^
a.cc:4:23: note: 'int k' previously declared here
    4 | int h, w, i, j, y, x, k, ans;
      |                       ^
a.cc:37:26: error: redefinition of 'int ans'
   37 | int h, w, i, j, y, x, k, ans;
      |                          ^~~
a.cc:4:26: note: 'int ans' previously declared here
    4 | int h, w, i, j, y, x, k, ans;
      |                          ^~~
a.cc:38:6: error: redefinition of 'char mat [10][10]'
   38 | char mat[10][10];
      |      ^~~
a.cc:5:6: note: 'char mat [10][10]' previously declared here
    5 | char mat[10][10];
      |      ^~~
a.cc:58:5: error: redefinition of 'int main()'
   58 | int main()
      |     ^~~~
a.cc:6:5: note: 'int main()' previously defined here
    6 | int main()
      |     ^~~~