经典简约
清爽简洁,回归本真
液态水晶
毛玻璃+霓虹光带
赛博朋克
霓虹故障艺术风
🚫
违规操作检测
禁止使用右键菜单
⚠️ 此操作已被系统记录
1

Tri Tiling

📝 题解 🔵 仅限 C++
题目描述
<img src=http://acm.student.cs.uwaterloo.ca/~acm00/050924/domino.jpg> <p>In how many ways can you tile a 3x<em>n</em> rectangle with 2x1 dominoes?</p> <p>Here is a sample tiling of a 3x12 rectangle.</p> <p>&nbsp;</p> <center> <img src="http://acm.student.cs.uwaterloo.ca/%7Eacm00/050924/D.gif" alt="" /> </center> <p>Input consists of several test cases followed by a line containing <i>-1</i>. Each test case is a line containing an integer <em>0 &le; n &le; 30</em>. For each test case, output one integer number giving the number of possible tilings.</p>
输入格式
输出格式
样例
样例输入 1
2 8 12 -1
样例输出 1
3 153 2131
提交代码
请先登录后提交

🤖 AI 解题助手

DeepSeek
就绪
👋 你好!我是 AI 解题助手。
我已阅读了这道题,可以帮你分析思路、提供代码示例。
⚠️ 请先登录后使用