首页 > 其他分享 >CodeForces - 630F Selection of Personnel (组合数学)

CodeForces - 630F Selection of Personnel (组合数学)

时间:2023-05-08 21:32:38浏览次数:54  
标签:Selection group Personnel ll 630F long include define



Time Limit: 500MS

 

Memory Limit: 65536KB

 

64bit IO Format: %I64d & %I64u

CodeForces - 630F


Selection of Personnel



Submit Status




Description




One company of IT City decided to create a group of innovative developments consisting from 5 to 7 people and hire new employees for it. After placing an advertisment the company received n






Input




The only line of the input contains one integer n (7 ≤ n ≤ 777) — the number of potential employees that sent resumes.






Output




Output one integer — the number of different variants of group composition.






Sample Input





Input



7





Output



29





Source



Experimental Educational Round: VolBIT Formulas Blitz




#include<stdio.h>
#include<math.h>
#include<string.h>
#include<algorithm>
#define INF 0x3f3f3f3f
#define ll long long
#define N 10010
#define M 1000000007
using namespace std;
ll C(ll n,ll x)
{
	ll i,j,s=1;
	for(i=n,j=1;i>n-x;i--,j++)
		s*=i,s/=j;
	return s;
}
int main()
{
	int n;
	while(scanf("%d",&n)!=EOF)
	{
		ll sum=C(n,5)+C(n,6)+C(n,7);
		printf("%lld\n",sum);
	}
	return 0;
}





标签:Selection,group,Personnel,ll,630F,long,include,define
From: https://blog.51cto.com/u_16079508/6256250

相关文章

  • Getselection能不能接受keyword?
    这个玩意绝对是个坑,CAD对Getselection的支持并不充分,需要通过keywordinput事件来弄,比较麻烦,而且很容易出问题。所以我的做法是,不使用,哈哈!下面这个是kean的代码:[CommandMethod("SELKW")]publicvoidGetSelectionWithKeywords(){Documentdoc=AcadApp.......
  • sklearn模块中的preprocessing、model_selection、feature_selection
    sklearn模块中的preprocessing、model_selection、feature_selection1.preprocessing1.1.LabelEncoder()可以给标签分配一个可数的连续编号fromsklearn.preprocessingimportLabelEncoderlabel=LabelEncoder()label.fit(['grade1','grade3','grade1......
  • odoo中打印模板处理selection字段
    在odoo中处理selection字段,通常情况下,如果拿到的是key,还要再翻译成value.这里可以用fields_get()这个函数,来实现这个问题${dict(item.fields_get(allfields=['type_id'])['type_id']['selection']).get(item.type_id)} 这里的item是数据集‘type_id’selection的字段......
  • 关于浏览器的Selection对象,以及window.getSelection()的API用法
    Selection 对象就是用户选择的文本范围或插入符号的位置。它代表页面中的文本选区,可能横跨多个元素。文本选区由用户拖拽鼠标经过文字而产生。具有以下属性和方法。 1、anchorNode只读属性,返回选区开始位置所属的节点。用户可能从左往右框选,也可能从右往左框选。但是锚点......
  • FIT5201 Complexity and Model Selection
    Assignment1,FIT5201,S120231ModelComplexityandModelSelectionInthissection,youstudytheeffectofmodelcomplexityonthetrainingandtestingerror.Youalsodemonstrateyourprogrammingskillsbydevelopingaregressionalgorithmandacross......
  • sklearn.model_selection.train_test_split
    参考:sklearn.model_selection.train_test_split(*arrays,test_size=None,train_size=None,random_state=None,shuffle=True,stratify=None)目的:将数组或矩阵分割为随......
  • DHCP Subnet Selection Options
    Appliesto:WindowsServer2022,WindowsServer2019,WindowsServer2016YoucanusethistopicforinformationaboutnewDHCPsubnetselectionoptions.DHC......
  • 【工具使用】IDEA Spring源码报Unable to find method ‘org.gradle.api.artifacts.re
    1 前言IDEA拉Spring源码,源码是Gradle管理依赖的,但是报错Unabletofindmethod'org.gradle.api.artifacts.result.ComponentSelectionReas我的IDEA有2019、2021的2 ......
  • ElementUI中el-table-column的type为selection时选择框旁边有个点
    场景使用el-table的多选框时,el-table-column的type为selection时,显示为勾选框。但是会在勾选框旁边显示一个实心的小点。 注:霸道的程序猿获取编程相关电子书、教程推送与......
  • 【五期李伟平】CCF-A(ICML'21)Privacy-Preserving Feature Selection with Secure Multi
    Li,X.,R.Dowsley,andMDCock."Privacy-PreservingFeatureSelectionwithSecureMultipartyComputation.",10.48550/arXiv.2102.03517.2021.  当前PPML......