当前位置:网站首页>Permutation and combination function
Permutation and combination function
2022-07-06 08:11:00 【. dye】
array
ll A(ll n,ll m)
{ ll co=1; if(m==0){return co;}
for(ll i=m+1;i<=n;i++){
co*=i;
}
return co;
}
Combine
ll C[100][100];
void C(int n)// ceiling
{
for(int i = 0; i <n+1; ++i) {
for(int j = 0; j <= i; ++j) {
if(!j) C[i][j] = 1;
else C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % ((ll)(1e9 + 7));
}
}
}
After entering the upper limit
Usage method 15 Choose from 6 individual Namely C[15][6];
边栏推荐
- [Yugong series] creation of 009 unity object of U3D full stack class in February 2022
- Use br to back up tidb cluster data to S3 compatible storage
- Use Alibaba icon in uniapp
- 二叉树创建 & 遍历
- Qualitative risk analysis of Oracle project management system
- Artcube information of "designer universe": Guangzhou implements the community designer system to achieve "great improvement" of urban quality | national economic and Information Center
- Introduction to number theory (greatest common divisor, prime sieve, inverse element)
- ESP系列引脚说明图汇总
- Interview Reply of Zhuhai Jinshan
- [redis] Introduction to NoSQL database and redis
猜你喜欢
[redis] Introduction to NoSQL database and redis
[research materials] 2021 Research Report on China's smart medical industry - Download attached
Pangolin Library: control panel, control components, shortcut key settings
hcip--mpls
Use Alibaba icon in uniapp
How to use information mechanism to realize process mutual exclusion, process synchronization and precursor relationship
National economic information center "APEC industry +": economic data released at the night of the Spring Festival | observation of stable strategy industry fund
NFT smart contract release, blind box, public offering technology practice -- contract
The Vice Minister of the Ministry of industry and information technology of "APEC industry +" of the national economic and information technology center led a team to Sichuan to investigate the operat
面向个性化需求的在线云数据库混合调优系统 | SIGMOD 2022入选论文解读
随机推荐
将 NFT 设置为 ENS 个人资料头像的分步指南
远程存储访问授权
CAD ARX gets the current viewport settings
珠海金山面试复盘
A Closer Look at How Fine-tuning Changes BERT
Type of data in energy dashboard
你想知道的ArrayList知识都在这
C language custom type: struct
[t31zl intelligent video application processor data]
Notes on software development
[research materials] 2021 China online high growth white paper - Download attached
【T31ZL智能视频应用处理器资料】
shu mei pai
Easy to use tcp-udp_ Debug tool download and use
Esrally domestic installation and use pit avoidance Guide - the latest in the whole network
[Yugong series] February 2022 U3D full stack class 011 unity section 1 mind map
"Designer universe" Guangdong responds to the opinions of the national development and Reform Commission. Primary school students incarnate as small community designers | national economic and Informa
Asia Pacific Financial Media | "APEC industry +" Western Silicon Valley invests 2trillion yuan in Chengdu Chongqing economic circle to catch up with Shanghai | stable strategy industry fund observatio
数据治理:主数据的3特征、4超越和3二八原则
Migrate data from SQL files to tidb