Skip to content

[다이나믹] BOJ#10844 - 쉬운 계단 수 #4

Description

@ye-yo

⚠️ 나의 풀이

그림을 그려서 규칙을 찾아보려고 했으나 실패

❗️ 오답 원인 분석

  • 규칙을 찾아보려고 노력하기

🔑 풀이 핵심

  • 2차원 배열로 표현하기
    : dp[1][0]~dp[1][9] 는 1의 자리에 해당 숫자가 올 수 있는지
    dp[2][0] ~ dp[2][9] 는 2번째를 i 숫자로 가지는 경우의 수
    dp[2][1]dp[1][0]dp[1][2]가 1을 2번째 숫자로 가질 수 있음

도출된 식 : dp[i][j] = dp[i-1][j-1] + d[[i-1][j+1];

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions