#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; int main(){ ll N, K, cnt=0, ans=0, tot=0; cin >> N >> K; N *= 2; vector v1, v2; vector S(N); vector> C(N, vector(N)); for (int i=0; i> S[i]; for (auto c : S[i]) if (c == '#') cnt++; } for (int i=0; i> C[i][j]; v1.push_back(C[i][j]); } for (int j=0; j()); sort(v2.begin(), v2.end(), greater()); for (int i=0; i