{ 二分答案 }soj2015
来源:互联网 发布:关闭多台linux系统脚本 编辑:程序博客网 时间:2024/04/30 18:55
Windbreaker was planning to send his friends some necklaces as New Year gifts. To show sincerity ,he decided to make the necklaces all by himself. He bought some kinds of pearls and each kind of pearls has a different color from others. He wanted to make each necklace consisted of M pearls from different kinds, that’s what he called M-perfect necklace. Windbreaker wanted to know the maximum number of necklaces he could send out to his friends. The number of pearls of each kind and M are given, and now you are asked to tell Windbreaker how many M-perfect necklaces he could make at most
You will be given a number of cases in the input. Each case starts with a positive integer n(n<=1000),which is the number of different kinds;
The second line contains n positive numbers represent for the number of pearls of each kind which will not exceed 2000.
The third line contains a positive number M(1<=M<=100).
The end of input is indicated by a line containing n=0.
For each test case, output a line containing the Maximum number of M-perfect necklaces.
53 3 3 3 3561 2 3 4 5 650
33
我是要WA多几题才有二分答案的概念。。。。。。。
不是dp能证明贪心都给我去二分啊啊啊啊
- { 二分答案 }soj2015
- 二分答案
- 二分答案
- 二分答案
- 二分答案
- ~二分答案~
- 二分答案
- 二分答案?!
- 二分答案
- 二分答案
- 【hiho38】二分•二分答案
- #1139 : 二分·二分答案
- 二分答案全攻略
- hunnu 10922 二分答案
- hdu 4190 二分答案
- hdu 4190 #二分答案
- HDU4004 二分答案
- 二分答案 模板
- Android路径中提取文件名
- 客户端与服务器端通信方式总结
- 算法理解——大数相乘问题
- GWT工程架构分析与理解
- 开发笔记——ServletFileUpload
- { 二分答案 }soj2015
- mysql字符截取substring_index
- IMS学习中的一些名词解释
- J2EE综合—在项目过程中Struts常见错误的全面汇总
- POJ 1958 没有AC的版本
- C#Windows窗体界面设计_攻击决策项目_真实轨迹RealTrack
- (奇迹冬瓜)坦克大战[MFC框架]
- css实现图片与文字底边对齐
- 直接插入排序