当前位置:网站首页>信息学奥赛一本通 1312:【例3.4】昆虫繁殖
信息学奥赛一本通 1312:【例3.4】昆虫繁殖
2022-08-04 04:24:00 【早睡身体好hh】
题目链接:http://ybt.ssoier.cn:8088/problem_show.php?pid=1312

#include <iostream>
using namespace std;
typedef long long ll;
const int N = 60;
ll cheng[N], luan[N];
int main()
{
int x, y, z;
cin >> x >> y >> z;
z++;
for (int i = 1; i <= x; i++)
{
cheng[i] = 1;
luan[i] = 0;
}
for (int i = x + 1; i <= z; i++)
{
luan[i] = cheng[i - x] * y;
cheng[i] = cheng[i - 1] + luan[i - 2];
}
cout << cheng[z] << endl;
return 0;
}
边栏推荐
- drools从下载到postman请求成功
- 基于 SSE 实现服务端消息主动推送解决方案
- Take care of JVM performance optimization (own note version)
- 技术解析|如何将 Pulsar 数据快速且无缝接入 Apache Doris
- 备份工具pg_dump的使用《postgres》
- 2022软件测试面试题 最新字节跳动50道真题面试题 刷完已拿下15k 附讲解+答疑
- PL/SQL Some Advanced Fundamental
- 8. Haproxy builds a web cluster
- 十一种概率分布
- 7-1 LVS+NAT load balancing cluster, NAT mode deployment
猜你喜欢
随机推荐
Introduction to mq application scenarios
7-1 LVS+NAT load balancing cluster, NAT mode deployment
drools from download to postman request success
For Qixi Festival, I made a confession envelope with code
本周四晚19:00知识赋能第4期直播丨OpenHarmony智能家居项目之设备控制实现
图像处理之Bolb分析(一)
How to keep the source code confidential in the development under the burning scenario
打造一份优雅的简历
SVM介绍以及实战
RSS订阅微信公众号初探-feed43
Take care of JVM performance optimization (own note version)
How to open a CITIC Securities online account?is it safe?
劝退背后。
数据治理平台项目总结和分析
2.15 keil使用电脑端时间日期
数据集类型转换—TFRecords文件
烧录场景下开发如何进行源代码保密工作
MRS: Introduction to the use of Alluxio
4-way two-way HDMI integrated business high-definition video optical transceiver 8-way HDMI high-definition video optical transceiver
TL431的基本特性以及振荡电路









