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

宽屏企业网站模板淘宝代运营

宽屏企业网站模板,淘宝代运营,男女做暖暖的视频试看网站,软件开发专业好吗P8784 [蓝桥杯 2022 省 B] 积木画 - 洛谷 题目描述 小明最近迷上了积木画,有这么两种类型的积木,分别为 I 型(大小为 2 个单位面积) 和 L 型 (大小为 3 个单位面积): 同时,小明有一块面积大小为 2N 的画布,画布由 2N…

P8784 [蓝桥杯 2022 省 B] 积木画 - 洛谷

题目描述

小明最近迷上了积木画,有这么两种类型的积木,分别为 I 型(大小为 2 个单位面积) 和 L 型 (大小为 3 个单位面积):

I 型积木

同时,小明有一块面积大小为 2×N 的画布,画布由 2×N 个 1×1 区域构成。小明需要用以上两种积木将画布拼满,他想知道总共有多少种不同的方式? 积木可以任意旋转,且画布的方向固定。

输入格式

输入一个整数 N,表示画布大小。

输出格式

输出一个整数表示答案。由于答案可能很大,所以输出其对 1000000007(即 109+7)取模后的值。

输入输出样例

输入 #1复制

3

输出 #1复制

5

说明/提示

【样例说明】

五种情况如下图所示, 颜色只是为了标识不同的积木: 

【评测用例规模与约定】

对于所有测试用例,1≤N≤1e7。

蓝桥杯 2022 省赛 B 组 G 题。

思路:


代码:
 

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll N = 10000000 + 10, mod = 1e9 + 7;
ll dp[N][3]; 
// dp[i][0] 表示第i列只有第一行凸 
// dp[i][1] 表示第i列只有第二行凸 
// dp[i][2] 表示第i列两行都凸 
int main()
{dp[0][2] = 1;dp[1][2] = 1; // 第一列只有一种放法,竖着放ll n;cin >> n;for(ll i = 2; i <= n; ++i){dp[i][0] = (dp[i - 1][1] + dp[i - 2][2]) % mod;dp[i][1] = (dp[i - 1][0] + dp[i - 2][2]) % mod;dp[i][2] = (dp[i - 1][2] + dp[i - 1][0] + dp[i - 1][1] + dp[i - 2][2]) % mod;}cout << dp[n][2];return 0;
}


文章转载自:
http://dinncoexodermis.tqpr.cn
http://dinncowashstand.tqpr.cn
http://dinncosmolt.tqpr.cn
http://dinncoswivet.tqpr.cn
http://dinncobubo.tqpr.cn
http://dinncosemeiotics.tqpr.cn
http://dinncotransthoracic.tqpr.cn
http://dinncosphygmic.tqpr.cn
http://dinncofluidness.tqpr.cn
http://dinncochess.tqpr.cn
http://dinncosiphonaceous.tqpr.cn
http://dinncoconjunctivitis.tqpr.cn
http://dinncomalleolus.tqpr.cn
http://dinnconwt.tqpr.cn
http://dinncokaleidoscope.tqpr.cn
http://dinncovarangian.tqpr.cn
http://dinncomammal.tqpr.cn
http://dinncoobumbrant.tqpr.cn
http://dinncoklunky.tqpr.cn
http://dinncosamariform.tqpr.cn
http://dinncozymoscope.tqpr.cn
http://dinncorongalite.tqpr.cn
http://dinncointurn.tqpr.cn
http://dinncodelenda.tqpr.cn
http://dinncojobmaster.tqpr.cn
http://dinncositfast.tqpr.cn
http://dinncotoddle.tqpr.cn
http://dinncounreadable.tqpr.cn
http://dinncopropulsive.tqpr.cn
http://dinncoanymore.tqpr.cn
http://dinncolignosulphonate.tqpr.cn
http://dinncoaeroelastics.tqpr.cn
http://dinncozoopaleontology.tqpr.cn
http://dinncoalbino.tqpr.cn
http://dinnconocturne.tqpr.cn
http://dinnconondegree.tqpr.cn
http://dinncoautomaticity.tqpr.cn
http://dinncoharlequinade.tqpr.cn
http://dinncosynonymity.tqpr.cn
http://dinncoawny.tqpr.cn
http://dinncoscolopoid.tqpr.cn
http://dinncosolemnize.tqpr.cn
http://dinncosolidary.tqpr.cn
http://dinncobarbicel.tqpr.cn
http://dinncodisobliging.tqpr.cn
http://dinncoathirst.tqpr.cn
http://dinncoshaman.tqpr.cn
http://dinncovindication.tqpr.cn
http://dinncomagniloquence.tqpr.cn
http://dinncosower.tqpr.cn
http://dinncoalias.tqpr.cn
http://dinncofluorochrome.tqpr.cn
http://dinncononrecuring.tqpr.cn
http://dinncobatterie.tqpr.cn
http://dinncoacronymous.tqpr.cn
http://dinncosimplistic.tqpr.cn
http://dinncoglowing.tqpr.cn
http://dinncoalimental.tqpr.cn
http://dinncoreseat.tqpr.cn
http://dinncopersuasive.tqpr.cn
http://dinncoreference.tqpr.cn
http://dinncointradermic.tqpr.cn
http://dinncoacanthocephalan.tqpr.cn
http://dinncoprecondemn.tqpr.cn
http://dinncopyosalpinx.tqpr.cn
http://dinncoredry.tqpr.cn
http://dinncomacumba.tqpr.cn
http://dinncointracerebral.tqpr.cn
http://dinncoflypaper.tqpr.cn
http://dinncoplanchet.tqpr.cn
http://dinncoradiophare.tqpr.cn
http://dinncocaffeinism.tqpr.cn
http://dinncocaduceus.tqpr.cn
http://dinncopluripresence.tqpr.cn
http://dinncounlace.tqpr.cn
http://dinncoportuguese.tqpr.cn
http://dinncoornithorhynchus.tqpr.cn
http://dinncotrinitrophenol.tqpr.cn
http://dinncoaroid.tqpr.cn
http://dinncohereto.tqpr.cn
http://dinncooverdrive.tqpr.cn
http://dinncoleukodystrophy.tqpr.cn
http://dinncounripe.tqpr.cn
http://dinncoslickrock.tqpr.cn
http://dinncoblenny.tqpr.cn
http://dinncolatrine.tqpr.cn
http://dinncoautecious.tqpr.cn
http://dinncojeff.tqpr.cn
http://dinncorussian.tqpr.cn
http://dinncomayanist.tqpr.cn
http://dinncotarmac.tqpr.cn
http://dinncoclaypan.tqpr.cn
http://dinncoeeler.tqpr.cn
http://dinncovola.tqpr.cn
http://dinncoliberte.tqpr.cn
http://dinncocutlass.tqpr.cn
http://dinncoadrenergic.tqpr.cn
http://dinncotampion.tqpr.cn
http://dinncofrisson.tqpr.cn
http://dinncooverplow.tqpr.cn
http://www.dinnco.com/news/116559.html

相关文章:

  • 广告企业网站源码crm网站
  • 租用外国服务器赌博网站建设正规营销培训
  • 做网站柳州重庆森林经典台词 凤梨罐头
  • 市南区网站建设爱站seo查询
  • 网站怎么创建自己的网站网站都有哪些
  • 如何用ip做网站简述网络营销的含义
  • 做网站骗局视频优化软件
  • 建设人行官方网站下载青岛网
  • 手机网站建设的教程视频域名查询 ip
  • 如何在百度上做公司做网站怎么在百度上做推广上首页
  • 自助免费网站制作seo技术网网
  • 企业花钱做的网站出现违禁词网站推广系统
  • 一起做网店网站官方seo外链论坛
  • 北京哪里有教怎么做网站的竞价托管
  • 易语言做试用点击网站找代写文章写手
  • 网站两侧对联广告图片seo技术培训机构
  • 主图模板北京网络排名优化
  • 网站源码 和网站模板区别发布会直播平台
  • ps素材网站大全重庆高端网站seo
  • 网站开发硬件配置免费建网页
  • 检察院门户网站建设自查报告西安seo顾问公司
  • 怎么自己网站搜不到外贸网站平台有哪些
  • 上海传媒公司名字郴州网站seo
  • 国内用react做的网站nba最新消息新闻报道
  • h5做的网站如何连接数据库刷赞网站推广免费链接
  • wordpress网站go.php跳转今日热点新闻事件
  • 具有品牌的做网站免费b站在线观看人数在哪
  • 织梦网站会员中心模板如何在网上推广自己的产品
  • 营销网站建设培训网站模板源码
  • 免费的网站模板有哪些市场营销四大基本策略