Language: C++

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
 
typedef long long ll;
typedef long double ld;
typedef double db; //
typedef string str; //
//
typedef pair<int,int> pi;
typedef pair<ll,ll> pl; //
typedef pair<db,db> pd; //
//
typedef vector<int> vi; 
typedef vector<ll> vl; //
typedef vector<db> vd; //
typedef vector<str> vs; //
typedef vector<pi> vpi;
typedef vector<pl> vpl; //
typedef vector<pd> vpd; //
 
typedef tree<pi, null_type, less<pi>, rb_tree_tag, tree_order_statistics_node_update> indexed_set;
 
#define mp make_pair
#define f first
#define s second
#define sz(x) (int)x.size()
#define all(x) begin(x), end(x)
#define rall(x) (x).rbegin(), (x).rend() //
#define rsz resize
#define ins insert //
#define ft front() //
#define bk back()
#define pf push_front //
#define pb push_back
#define eb emplace_back //
#define lb lower_bound //
#define ub upper_bound //
 
#define for(i,a,b) for (int i = (a); i < (b); ++i)
#define f0r(i,a) for(i,0,a)
#define rof(i,a,b) for (int i = (b)-1; i >= (a); --i)
#define r0f(i,a) rof(i,0,a)
#define trav(a,x) for (auto& a: x)
 
const int mod = 1e9+7; // 998244353;
const int mx = 2e5+5; //
const ll inf = 1e18; //
const ld pi = acos((ld)-1);
const int xd[4] = {1,0,-1,0}, yd[4] = {0,1,0,-1}; //
mt19937 rng((uint32_t)chrono::steady_clock::now().time_since_epoch().count()); //
//
template<class t> bool ckmin(t& a, const t& b) { 
	return b < a ? a = b, 1 : 0; }
template<class t> bool ckmax(t& a, const t& b) { //
	return a < b ? a = b, 1 : 0; } //
constexpr int pct(int x) { return __builtin_popcount(x); } //
constexpr int bits(int x) { return 31-__builtin_clz(x); } // floor(log2(x)) //
constexpr int cdiv(int a, int b) { return a/b+!(a<0||a%b == 0); } // division of a by b rounded up, assumes b > 0 //
// ignore
int fsttrue(function<bool(int)> f, int lo, int hi) {
	hi ++; assert(lo <= hi); // assuming f is increasing
	while (lo < hi) { // find first index such that f is true 
		int mid = (lo+hi)/2; 
		f(mid) ? hi = mid : lo = mid+1; 
	} 
	return lo;
}
template<class t> void remdup(vector<t>& v) { 
	sort(all(v)); v.erase(unique(all(v)),end(v)); }
struct custom_hash {
    static uint64_t splitmix64(uint64_t x) {
        // http://xorshift.di.unimi.it/splitmix64.c
        x += 0x9e3779b97f4a7c15;
        x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
        x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
        return x ^ (x >> 31);
    }
 
    size_t operator()(uint64_t x) const {
        static const uint64_t fixed_random = chrono::steady_clock::now().time_since_epoch().count();
        return splitmix64(x + fixed_random);
    }
};
// ignore
//
int main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	int h, w, k;
	cin >> h >> w >> k;
	int cnt = 0;
	char grid[h][w];
	f0r(a, h){
		string s;
		cin >> s;
		strcpy(grid[a], s.c_str());
	}
	f0r(a, (1 << h)){
		f0r(b, (1 << w)){
			int c = 0;
			f0r(i, h){
				f0r(j, w){
					if(grid[i][j] == '#' && !(a & (1 << i) || b & (1 << j)))
						c++;
				}
			}
			if(c == K)
				cnt++;
		}
	}
	cout << cnt << endl;
}

Compiler output:
a.cc:50:10: error: 'const ld pi' redeclared as different kind of entity
   50 | const ld pi = acos((ld)-1);
      |          ^~
a.cc:11:23: note: previous declaration 'typedef struct std::pair<int, int> pi'
   11 | typedef pair<int,int> pi;
      |                       ^~
a.cc: In function 'int main()':
a.cc:109:33: error: 'K' was not declared in this scope
  109 |                         if(c == K)
      |                                 ^