#QHD0000018. Đếm tháp (Counting Towers)
Đếm tháp (Counting Towers)
Counting Towers
Source: CSES
Version: Phuoc Hung OJ Extended
Problem Statement
This package preserves the original task mechanism. Xét tháp rộng và cao được chia thành các khối chữ nhật nguyên ô theo quy tắc của bài Counting Towers. Hãy đếm số cách xây tháp.
Input
Dòng duy nhất chứa .
Output
In số cách modulo .
Subtasks
- Subtask 1 — 20 points: small data.
- Subtask 2 — 30 points: medium data.
- Subtask 3 — 50 points: full PHOJ package limits.
Examples
Input
3
Output
34
Explanation
The output follows directly from the rules above.