Skip to content

Latest commit

ย 

History

History

P11727

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
ย 
ย 
ย 
ย 

[baekjoon-11727] 2ร—n ํƒ€์ผ๋ง 2

image

์ ํ™”์‹

dp[1] = 1
dp[2] = 2
dp[n] = dp[n-1] + (dp[n-2] * 2)

2xn ํƒ€์ผ๋ง ๋ฌธ์ œ์— 2x2 ํƒ€์ผ์ด ์ƒ๊ฒผ์œผ๋ฏ€๋กœ, 2x(n-2) ํฌ๊ธฐ์˜ ์ง์‚ฌ๊ฐํ˜•์œผ๋กœ ์ž˜๋ž์„ ๋•Œ ๊ฒฝ์šฐ์˜ ์ˆ˜๊ฐ€ ํ•˜๋‚˜ ๋” ์ƒ๊ธด๋‹ค. ๊ทธ๋ž˜์„œ 2๋ฅผ ๊ณฑํ•ด์ค€๋‹ค.