#include using namespace std; const int MAX = 50; int N, M, A[MAX], B[MAX]; vector adj[MAX]; bool visited[MAX]; bool dfs(int a){ visited[a] = true; for(int b: adj[a]){ if(B[b] == -1 || !visited[B[b]] && dfs(B[b])){ A[a] = b; B[b] = a; return true; } } return false; } int main(void) { cin.tie(0); ios::sync_with_stdio(false); cin >> N; for(int i=0;i> M; for(int j=0;j