알고리즘/BOJ

백준 15361번 Izbori

꾸준함. 2019. 5. 3. 23:41

문제 링크입니다: https://www.acmicpc.net/problem/15361

 

15361번: Izbori

In a land with developed democracy far, far away, presidential elections for the football association are taking place. This land consists of N counties, and each county has its own football association. There are M presidential candidates labeled with 1,

www.acmicpc.net

비트마스킹을 이용한 백트래킹 문제였습니다.

현재 뽑히는 사람이 K가 아니라면 비트마스킹을 이용하여 한명한명 기권시켜보며 최소 몇명을 기권시켜야 K가 뽑히는지 파악해야합니다.

비트마스킹 개념만 안다면 코드를 해석하는데 어려움은 없을 것이라고 생각합니다.

 

 

 

개발환경:Visual Studio 2017

 

지적, 조언, 질문 환영입니다! 댓글 남겨주세요~

반응형

'알고리즘 > BOJ' 카테고리의 다른 글

백준 12904번 A와 B  (0) 2019.05.06
백준 8982번 수족관 1  (3) 2019.05.06
백준 15360번 Rasvjeta  (2) 2019.05.03
백준 4574번 스도미노쿠  (0) 2019.05.03
백준 3568번 iSharp  (0) 2019.05.02