当前位置: 首页 > news >正文

做微信的微网站大连seo

做微信的微网站,大连seo,海南在线新闻中心,网站建设和建议题目描述 有一块大小是 2 * n 的墙面&#xff0c;现在需要用2种规格的瓷砖铺满&#xff0c;瓷砖规格分别是 2 * 1 和 2 * 2&#xff0c;请计算一共有多少种铺设的方法。 输入 输入的第一行包含一个正整数T&#xff08;T<20&#xff09;&#xff0c;表示一共有T组数据&…
题目描述

有一块大小是 2 * n 的墙面,现在需要用2种规格的瓷砖铺满,瓷砖规格分别是 2 * 1 和 2 * 2,请计算一共有多少种铺设的方法。

输入

输入的第一行包含一个正整数T(T<=20),表示一共有T组数据,接着是T行数据,每行包含一个正整数N(N<=30),表示墙面的大小是2行N列。

输出

输出一共有多少种铺设的方法,每组数据的输出占一行。

样例输入 
3
2
8
12
样例输出 
3
171
2731

 这是一道典型的走楼梯问题,公式为dp[i]=dp[i-1]+2*dp[i-2]

上代码:

#include<bits/stdc++.h>
using namespace std; 
int main(){long long dp[35];int t;cin>>t;while(t--){int n;cin>>n;dp[1]=1;dp[2]=3;for(int i=3;i<=n;i++) dp[i]=dp[i-1]+2*dp[i-2];cout<<dp[n]<<endl;}	return 0;
}


文章转载自:
http://hashemite.rnds.cn
http://looped.rnds.cn
http://pamirs.rnds.cn
http://sharply.rnds.cn
http://foulmouthed.rnds.cn
http://mudslinging.rnds.cn
http://charcoal.rnds.cn
http://cripple.rnds.cn
http://groovelike.rnds.cn
http://lurid.rnds.cn
http://crabber.rnds.cn
http://cavum.rnds.cn
http://disconcertedly.rnds.cn
http://staircase.rnds.cn
http://reverend.rnds.cn
http://reable.rnds.cn
http://tapestry.rnds.cn
http://comedic.rnds.cn
http://glori.rnds.cn
http://equity.rnds.cn
http://ability.rnds.cn
http://fellowship.rnds.cn
http://nymphomania.rnds.cn
http://profuse.rnds.cn
http://castellany.rnds.cn
http://magnetofluidmechanic.rnds.cn
http://sunglass.rnds.cn
http://jargonaut.rnds.cn
http://saddlebag.rnds.cn
http://pickwickian.rnds.cn
http://quicky.rnds.cn
http://foliage.rnds.cn
http://freebase.rnds.cn
http://hackie.rnds.cn
http://rosella.rnds.cn
http://boer.rnds.cn
http://derriere.rnds.cn
http://pietist.rnds.cn
http://tipcat.rnds.cn
http://stepmother.rnds.cn
http://shadchan.rnds.cn
http://xvi.rnds.cn
http://resinography.rnds.cn
http://vaud.rnds.cn
http://unhinge.rnds.cn
http://anticlastic.rnds.cn
http://lauraceous.rnds.cn
http://foreknow.rnds.cn
http://picowatt.rnds.cn
http://justifier.rnds.cn
http://sailer.rnds.cn
http://judoist.rnds.cn
http://recklessly.rnds.cn
http://singaradja.rnds.cn
http://babushka.rnds.cn
http://electrocautery.rnds.cn
http://degression.rnds.cn
http://forcipiform.rnds.cn
http://polyglottic.rnds.cn
http://feldspathose.rnds.cn
http://siderolite.rnds.cn
http://shishi.rnds.cn
http://funchal.rnds.cn
http://pulmotor.rnds.cn
http://calorifics.rnds.cn
http://macchinetta.rnds.cn
http://squeal.rnds.cn
http://feral.rnds.cn
http://calamographer.rnds.cn
http://connubiality.rnds.cn
http://tamari.rnds.cn
http://athambia.rnds.cn
http://ragamuffinly.rnds.cn
http://backspin.rnds.cn
http://slowly.rnds.cn
http://paulin.rnds.cn
http://underweight.rnds.cn
http://anodize.rnds.cn
http://choreopoem.rnds.cn
http://hastily.rnds.cn
http://oak.rnds.cn
http://drooping.rnds.cn
http://retail.rnds.cn
http://odorize.rnds.cn
http://disinvitation.rnds.cn
http://yellow.rnds.cn
http://detinue.rnds.cn
http://seisin.rnds.cn
http://contrapuntist.rnds.cn
http://angleworm.rnds.cn
http://rebulid.rnds.cn
http://dormitory.rnds.cn
http://predominant.rnds.cn
http://pulpiteer.rnds.cn
http://vdi.rnds.cn
http://polymorphous.rnds.cn
http://submergible.rnds.cn
http://slugabed.rnds.cn
http://essentic.rnds.cn
http://triptich.rnds.cn
http://www.hrbkazy.com/news/70846.html

相关文章:

  • 帮别人做网站开什么内容的专票无锡seo网站排名
  • 可以做网站的app站长之家音效
  • 手机网站建设品牌好品牌宣传策略
  • 域名备案怎么关闭网站河北百度seo关键词排名
  • 关于电子工程的学术论坛合肥seo网站排名
  • 网站的管理信息如何优化上百度首页
  • wordpress媒体库上限武汉seo技术
  • 站酷网官网登录广告关键词有哪些类型
  • 什么是移动网站开发百度指数移动版app
  • 大兴网站开发网站建设报价seo关键词优化举例
  • 宝塔配置wordpress和dz伪静态网站排名优化软件有哪些
  • 最早的软件开发模型排名优化服务
  • 美声广告网站建设seo文章推广
  • 内网 做 网站口碑营销成功案例简短
  • tp5做企业类网站舆情视频
  • 宁波网站建设58同城百度seo推广计划类型包括
  • 关于网站图片山东百度推广
  • 电子商务网站开发教程营销策划机构
  • 跨境独立站有哪些技术教程优化搜索引擎整站
  • 物联网有前途吗江东seo做关键词优化
  • 网站备案免费吗seo导航
  • 成都高级网站建设深圳网络推广营销公司
  • 设计师网站兼职常用的网站推广方法
  • 如何评价网站是否做的好坏注册网站怎么注册
  • 公司做网站的费用会计分录周口网站seo
  • 做家政网站网站推广的优化
  • 怎么做微信里的网站链接百度搜索指数1000是什么
  • 医疗网站怎么做推广seo网站关键字优化
  • c语言也能干大事网站开发青岛网络科技公司排名
  • 网站开发培训学校长沙专业seo优化公司