首页 > TAG信息列表 > 凑齐
Coins POJ - 1742
People in Silverland use coins.They have coins of value A1,A2,A3...An Silverland dollar.One day Tony opened his money-box and found there were some coins.He decided to buy a very nice watch in a nearby shop. He wanted to pay the exact price(without changeCoins POJ - 1742
People in Silverland use coins.They have coins of value A1,A2,A3...An Silverland dollar.One day Tony opened his money-box and found there were some coins.He decided to buy a very nice watch in a nearby shop. He wanted to pay the exact price(without change幽魂形态(组合数)
题目描述: 题目的大概意思是说有N个人,每个人有B把(不同)锁,从中任意选K个人,一定可以凑齐A把锁,任意比K小的人数,都不能凑齐,求A和B的最小值 输入输出样例 输入N、K,输出最小的A和K (mod 109+7) solution 考虑每k-1个人,都无法凑齐锁,所以这k-1个人至少少了一把锁,因为要求A,B最小,可以认为任意