当前位置:网站首页>Template_ Calculate number of combinations
Template_ Calculate number of combinations
2022-06-10 22:44:00 【This question AC sleep again】
//
#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
LL C( LL n,LL m )
{
if( n<m ) return 0;
if( n==m || m==0 ) return 1;
LL ans,i; n=n-m+1;
for( ans=i=1;i<=m;i++ )
{
ans*=n++; ans/=i; // Anti overflow
}
return ans;
}
int main()
{
LL n,m;
while( cin>>n>>m )
{
cout<<C( n,m )<<endl;
}
return 0;
}边栏推荐
- 按位操作符和移位操作符
- [tcapulusdb knowledge base] tcapulusdb transaction management introduction
- 【TcaplusDB知识库】TcaplusDB TcapDB扩缩容介绍
- What should I do if the mobile phone number cannot be updated
- Interpretation of dataset class of mmdetection
- TcaplusDB君 · 行业新闻汇编(一)
- MySQL master-slave replication solves read-write separation
- 【Debug】could not find ref wiht poc XXX解决
- Web3生态去中心化金融平台——Sealem Finance
- How to do well in the top-level design of informatization in the process of informatization upgrading of traditional enterprises
猜你喜欢

Web3 ecological decentralized financial platform sealem Finance
![[debug] could not find ref wiht POC XXX](/img/01/5fdbd3e9902458be754280464bd923.png)
[debug] could not find ref wiht POC XXX

Opencv_ 100 questions_ Chapter IV (16-20)

dc_labs--lab1的学习与总结
![[XPath] use following sibling to obtain the following peer nodes](/img/f6/a30bdde45b3dcbf1fec796e4a48b23.png)
[XPath] use following sibling to obtain the following peer nodes

Tcapulusdb Jun · industry news collection (VI)

Model construction of mmdetection

MySQL master-slave replication solves read-write separation

【TcaplusDB知识库】TcaplusDB进程启动介绍

TcaplusDB君 · 行业新闻汇编(四)
随机推荐
MySQL master-slave replication solves read-write separation
Pytorch installation is super simple
中小型会议如何进行数字化升级?
CCF CSP 202109-1 array derivation
Redis从入门到入土
记录(三)
CCF CSP 202109-2 non zero segment division [100 points]
Sealem Finance打造Web3去中心化金融平台基础设施
【TcaplusDB知识库】TcaplusDB shard搬迁介绍
JVM运行时数据区
Sealem finance builds Web3 decentralized financial platform infrastructure
Visio 转为高质量PDF
Implementation of simply untyped lambda calculus
JVM runtime data area
[applet] vant sliding cell adds the function of clicking other positions to close automatically
[MySQL] summary of common data types
【TcaplusDB知识库】TcaplusDB进程启动介绍
Opencv_ 100 questions_ Chapter IV (16-20)
【Xpath】使用following-sibling获取后面的同级节点
Innovation and exploration are added layer by layer, and the field model of intelligent process mining tends to be mature