/* * POJ_2249.cpp * * Created on: 2013年10月8日 * Author: Administrator */ #include <iostream> #include <cstdio> using namespace std; typedef long long int64; int64 work(int64 n , int64 k){ if(k > n/2){ k = n-k; } int64 a = 1; int64 b = 1; int…
Binomial Showdown Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 18457 Accepted: 5633 Description In how many ways can you choose k elements out of n elements, not taking order into account? Write a program to compute this number. In…
题目链接: http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1453 题意: 中文题诶~ 思路: 因为最后一个球总是在编号比他大的球拿完之前拿完, 所以可以先把每种编号的求都拿出一个来, 按照 1, 2, .... n 排列. 然后再把 xi 个 i 号球插入这里的 i 号球之前即可. 然后直接用排列组合计数即可. 代码: #include <iostream> #define ll long long using n…