[백준 2188] 축사 배정 #100
ghdcksgml1
started this conversation in
1일 1알고리즘
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
아이디어
이분매칭 기본 활용 문제입니다.
이분매칭은 a -> X, a -> Y , b -> X , b -> Z , c -> Y 같은 여러 간선 정보가 있을때
a,b,c를 최대로 매칭시킬 수 있는 경우는 a->X , b->Z, c->Y 이다.
이렇게 1:1 간선을 최대로 매칭시켜주는 알고리즘이 이분매칭이다.
이분 매칭을 구현하기 위해서 dfs를 이용한다.
시간복잡도
O(VE2)
소스코드
Beta Was this translation helpful? Give feedback.
All reactions