Sign In

[BOJ :4779] 칸토어 집합

K
Koa
1. DP[0] = "-"

2. DP[n] = DP[n - 1] + (3 ^ (n - 1) 개의 공백) + DP[n - 1]
최대 N은 12이기 때문에 최대 문자열의 길이는 3^12 = 531,441이다.
따라서, 직접 문자열을 저장만 잘 반복없이 한다면 충분히 다 담아낼 수 있다.
Ko
Subscribe to 'koa'
Subscribe to my site to be the first to receive notifications and emails about the latest updates, including new posts.
Join Slashpage and subscribe to 'koa'!
Subscribe
👍