Problem L
Description
,输出铺放方案的总数.
例如n=3时,为2× 3方格,骨牌的铺放方案有三种,如下图:
L" title="Problem L">
#include
#define maxn 55
using namespace std;
long long ans[maxn],n;
void solve()
{
ans[1]=1;
ans[2]=2;
for(int
i=3;i<=50;i++)
ans[i]=ans[i-1]+ans[i-2];
}
int main()
{
//freopen("in.txt","r",stdin);
solve();
while(~scanf("%lld",&n))
printf("%lld\n",ans[n]);
return
0;
}
Problem L的更多相关文章
- The Ninth Hunan Collegiate Programming Contest (2013) Problem L
Problem L Last Blood In many programming contests, special prizes are given to teams who solved a pa ...
- Gym 102056L - Eventual … Journey - [分类讨论][The 2018 ICPC Asia-East Continent Final Problem L]
题目链接:https://codeforces.com/gym/102056/problem/L LCR is really an incredible being. Thinking so, sit ...
- 2013-2014 ACM-ICPC, NEERC, Southern Subregional Contest Problem L. Stock Trading Robot 水题
Problem L. Stock Trading Robot 题目连接: http://www.codeforces.com/gym/100253 Description CyberTrader is ...
- XVII Open Cup named after E.V. Pankratiev Stage 14, Grand Prix of Tatarstan, Sunday, April 2, 2017 Problem L. Canonical duel
题目:Problem L. Canonical duelInput file: standard inputOutput file: standard outputTime limit: 2 seco ...
- 2018 Multi-University Training Contest 4 Problem L. Graph Theory Homework 【YY】
传送门:http://acm.hdu.edu.cn/showproblem.php?pid=6343 Problem L. Graph Theory Homework Time Limit: 2000 ...
- HDU 6343.Problem L. Graph Theory Homework-数学 (2018 Multi-University Training Contest 4 1012)
6343.Problem L. Graph Theory Homework 官方题解: 一篇写的很好的博客: HDU 6343 - Problem L. Graph Theory Homework - ...
- HDU 6330.Problem L. Visual Cube-模拟到上天-输出立方体 (2018 Multi-University Training Contest 3 1012)
6330.Problem L. Visual Cube 这个题就是输出立方体.当时写完怎么都不过,后来输出b<c的情况,发现这里写挫了,判断失误.加了点东西就过了,mdzz... 代码: //1 ...
- 华农oj Problem L: CreatorX背英语【STL】
Problem L: CreatorX背英语 Time Limit: 1 Sec Memory Limit: 64 MB Submit: 53 Solved: 36 [Submit][Status][ ...
- Problem L: 搜索基础之马走日
Problem L: 搜索基础之马走日 Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 134 Solved: 91[Submit][Status][W ...
随机推荐
- Cross the GreateWall方案
涉及Client端和Server端 服务端:SS搭建 注意:以Ubuntu环境为例 Step1:添加GPG Public key wget -O- http://shadowsocks.org/deb ...
- Writing Science 笔记 6.19
1.练习由三个部分组成:写短文,反复修改:分析别人的文章是怎么写的:练习句子结构,如何用词. 2.写作的目的不在于发表而在于能够给人以灵感从而使文章得到更多的引用. 3.写得清楚,你必须清楚地思考,无 ...
- ExtJS配置与入门项目创建
Sencha Cmd下载:http://cdn.sencha.com/cmd/6.5.2/jre/SenchaCmd-6.5.2-windows-64bit.zip ExtJS-6.2.0下载:htt ...
- 自测-5 Shuffling Machine
Shuffling is a procedure used to randomize a deck of playing cards. Because standard shuffling techn ...
- C#取得站点跟目录
string strServer = "http://" + Request.ServerVariables["SERVER_NAME"].ToString() ...
- Ubuntu16.04 install eclipse-jee-oxygen-R-linux-gtk-x86_64
下面如何在Ubuntu16.04 下面怎么下载Java EE并创建在桌面快捷上下载Java EE:eclipse下载Java EE官网:http://www.eclipse.org/downloads ...
- jvm系列(十):如何优化Java GC「译」
本文由CrowHawk翻译,是Java GC调优的经典佳作. 本文翻译自Sangmin Lee发表在Cubrid上的"Become a Java GC Expert"系列文章的第三 ...
- 一步一个坑 - WinDbg调试.NET程序
引言 第一次用WinDbg来排查问题,花了很多时间踩坑,记录一下希望对后面的同学有些帮助. 客户现场软件出现偶发性的界面卡死现象一直找不出原因,就想着让客户用任务管理器生成了一个dump文件发给我,我 ...
- 解决Jqyery的Trigger事件中两个按钮相互触发至死循环问题
今天做项目,其中有个功能需要两个图表的联动,用到两个按钮,这两个按钮分别控制两个图表,第一次直接在btn1的单击事件中使用了$("btn2").trigger("clic ...
- scala 读取文件遇到encode问题(Mac -> remote Linux)
Source.fromFile(fileName)(enc: Encode),如果遇到错误: java.nio.charset.MalformedInputException: Input lengt ...