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 ...
随机推荐
- uva1267 Network
https://vjudge.net/problem/UVA-1267 题意: 有一棵树,上面有一个放着水源的点s,给出一个数k,这个水源可以覆盖路径长度到s不超过k的叶子节点.现在需要把所有的叶子节 ...
- CentOS 引导 Win10 启动项
因为无聊,所以想尝试一下双系统,所以在win10的基础之上,装了一个Linux系统,之前装过Ubuntu,几乎都是自动完成的无任何压力.但是想着Ubuntu好像更新换代有点快,所以换了个能用比较久的C ...
- matplotlib学习之绘图基础
matplotlib:http://www.cnblogs.com/jasonhaven/p/7609059.html 1.基本图形 散点图:显示两组数据的值,每个点的坐标位置由变量的值决定,头一组不 ...
- Mybatis Dynamic Query 2.0.2
项目地址:https://github.com/wz2cool/mybatis-dynamic-query 文档地址:https://wz2cool.gitbooks.io/mybatis-dynam ...
- Cow Sorting hdu 2838
Cow Sorting Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total ...
- JavaWeb(二)会话管理之细说cookie与session
前言 前面花了几篇博客介绍了Servlet,讲的非常的详细.这一篇给大家介绍一下cookie和session. 一.会话概述 1.1.什么是会话? 会话可简单理解为:用户开一个浏览器,点击多个超链接, ...
- .Neter玩转Linux系列之六:Linux下MySQL的安装、配置、使用
一.Linux安装MySQL (1)下载安装包:https://dev.mysql.com/downloads/mysql/ (2)解压并安装 命令:tar zxvf 文件名 解压完成之后,重名一下文 ...
- 应试记录2(没有转载标注,NOIP2016复赛过后自动删除)
#include<stdio.h> #include<string.h> int main() { ]; memset(a, , sizeof(a)); ;i<=;i++ ...
- Linux下安装jdk8的详细步骤
一.登录Linux,切换到root用户 sudo su 二.在usr目录下建立java安装目录 cd /usr mkdir java 三.下载jdk 登录网址:http://www.oracle.co ...
- webpack2使用ch1-目录说明
1 目录解释 webpack.config.js:配置文件,配置文件可以改成其他名,但package.json --config文件名称也要对应修改 2 webpack.config.js //we ...