You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This discussion was converted from issue #26 on September 15, 2026 10:45.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Problem link
https://atcoder.jp/contests/abc115/tasks/abc115_d
Problem Summary
버거를 일정 규칙으로 쌓을 수 있다.
해당 레벨의 버거의 x층 까지 중에 패티가 몇 개인지 구하는 문제.
일정 규칙:
Solution
분할 정복으로 레벨 L의 버거의 패티 수를 빨리 구할 수 있다.
번 + 레벨 L-1 버거 + 패티 + 레벨 L-1 버거 + 번
중간의 패티를 기점으로 반을 나눌 수 있고,
x가 레벨 L-1 버거의 층수 + 1 보다 작으면 레벨 L-1 버거의 패티의 개수를 구하는 식으로 재귀적으로 나눠나갈 수 있다.
대신 특정 레벨의 전체 버거 층 수 및 패티의 총 개수를 빨리 구하기 위해 먼저 전처리로 전부 구해놓았다.
Source Code
All reactions