Skip to content

Conversation

@oncsr
Copy link
Contributor

@oncsr oncsr commented Nov 17, 2025

🧷 문제 링크

https://www.acmicpc.net/problem/18291

🧭 풀이 시간

5분

👀 체감 난이도

✏️ 문제 설명

징검다리 N개가 일렬로 놓여있다.
각 징검다리에서 임의의 길이만큼 다음 징검다리로 점프할 수 있다.
1에서 출발하여 정확히 N에 도착하는 경우의 수를 구해보자.

🔍 풀이 방법

1에서 출발하여 x에 도착하는 경우의 수를 f(x)라고 하면,
f(x) = f(1) + ... + f(x-1)이다.
구해보면 f(1) = 1이고 x = 2이상의 f(x)에 대해서는 2^(x-2)가 된다.
N이 커서 분할 정복 거듭제곱으로 구해줬다.

⏳ 회고

@oncsr oncsr added the success 👍 해설을 보지 않고 풀었을 때 label Nov 17, 2025
@oncsr oncsr merged commit f5b8a7a into main Nov 18, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

success 👍 해설을 보지 않고 풀었을 때

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants