当前位置:网站首页>(practice C language every day) matrix
(practice C language every day) matrix
2022-06-29 05:07:00 【Yi Xiaoxia】
matrix
hold 1 ∼ 2020 Put it in 2 × 1010 In the matrix of .
Ask the right to be bigger than the left in the same row , The lower one in the same column is larger than the one at the top . How many options are there ?
The answer is big , You just need to give the number of alternatives divided by 2020 The remainder of .
The following program realizes this function , Please fill in the blanks :
#include <stdio.h>
int DP[1011][1011];
int main()
{
int i, j;
DP[1][0] = 1;
for (i = 1; i <= 1010; i++)
DP[i][0] = 1;
for (i = 1; i <= 1010; i++)
{
for (j = 1; j <= i; j++)
{
if (i == j)
DP[i][j] = DP[i][j - 1];
else
DP[i][j] = (DP[i - 1][j] + DP[i][j - 1]) % 2020;
}
}
printf("%d", DP[1010][1010]);
return 0;
}边栏推荐
- Domain name hack
- EEG signal processing - wavelet transform series
- JVM内存调优方式
- 《软件体系结构》期末复习总结
- How to use the select statement of MySQL
- ROS URDF model is parsed into KDL tree
- An efficient flutter hybrid stack management scheme with zero intrusion, you deserve it!
- be based on. NETCORE development blog project starblog - (13) add friendship link function
- Research Report on the overall scale, major manufacturers, major regions, product and application segmentation of GSM and GPRS modules in the global market in 2022
- STI, one controller
猜你喜欢
![[结构力学] 结点承载下影响线与直接承载下影响线不同的原因](/img/a6/fce0bb29cc5c84bc0ef20501617e06.png)
[结构力学] 结点承载下影响线与直接承载下影响线不同的原因

Research on heuristic intelligent task scheduling

What are the basic usage methods of MySQL

Facade pattern

《软件体系结构》期末复习总结

How to test electronic components with a multimeter

Alibaba microservice component Sentinel

Tcapulusdb Jun · industry news collection (III)

Blip: conduct multimodal pre training with cleaner and more diverse data, and the performance exceeds clip! Open source code

How to use thread stack location
随机推荐
软件体系结构实验汇总
How to quickly change the database name in MySQL
仿真與燒錄程序有哪幾種方式?(包含常用工具與使用方式)
Continue yesterday's plan: February 16, 2022
20 years Qinhuangdao D - exam results (dichotomy + thinking, with error prone data)
Research Report on the overall scale, major manufacturers, major regions, product and application segmentation of the gsm-gprs-edge module of the Internet of things in the global market in 2022
Complete collection of necessary documents for project management: you can't write these 14 project documents yet?
系统分析师备考经验分享:分阶段、分重点
Hantai oscilloscope software | Hantai oscilloscope upper computer software ns-scope, add measurement data arbitrarily
Robot reinforcement learning -- first person vs third person
The subnet of the pool cannot be overlapped with that of other pools.
How to choose congestion model and anemia model
How to display all MySQL databases
BERT和ViT简介
IDENTITY
Blip: conduct multimodal pre training with cleaner and more diverse data, and the performance exceeds clip! Open source code
Introduction to Bert and Vit
5000+ word interpretation | Product Manager: how to do a good job in component selection?
《软件体系结构》期末复习总结
Flyweight pattern