#include #include using namespace std; typedef vector vec; typedef vector mat; bool check(mat A, vec b){ const int M = (int)A.size(); const int N = (int)A[0].size(); vector used(M, false); for(int j=0;j D, vector W){ mat A(N, vec(N, 0)); for(int i=0;i> N; vector D(N), W(N); for(int i=0;i> D[i]; } for(int i=0;i> W[i]; } cout << solve(N, D, W) << endl; return 0; }