Skip to content

[BOJ 4811] 알약 - #257

Merged
sh0723 merged 2 commits into
mainfrom
solve-boj4811
Sep 22, 2026
Merged

sh0723 merged 2 commits into
mainfrom
solve-boj4811

Conversation

@sh0723

@sh0723 sh0723 commented Sep 22, 2026

Copy link
Copy Markdown
Owner

풀이 요약

  • 완전한 알약과 반쪽 알약의 개수를 상태로 두고, 각 상태에서 만들 수 있는 문자열 수를 DFS와 메모이제이션으로 계산합니다.
  • 완전한 알약이 남아 있으면 W를 선택해 반쪽 알약을 하나 늘리고, 반쪽 알약이 남아 있으면 H를 선택하는 두 경우를 더합니다.
  • 상태 수가 O(N^2)이므로 테스트 케이스마다 중복 계산을 줄여 효율적으로 답을 구합니다.

Link

https://velog.io/@sh0723/PS-%EB%B0%B1%EC%A4%80-4811%EB%B2%88-%EC%95%8C%EC%95%BD

문제

  • BOJ 4811
  • 제목: 알약

Closes #256

@sh0723
sh0723 merged commit 6fecd06 into main Sep 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BOJ 4811] 알약

1 participant