最多买几件
2015-11-08 13:26
183 查看
Limit: 1 Sec Memory Limit: 128 MB
Submit: 11 Solved: 2
[Submit][Status][Web
Board] [Edit] [TestData]
As you know, Gardon trid hard for his love-letter, and now he's spending too much time on choosing flowers for Angel.
When Gardon entered the flower shop, he was frightened and dazed by thousands kinds of flowers.
"How can I choose!" Gardon shouted out.
Finally, Gardon-- a no-EQ man decided to buy flowers as many as possible.
Can you compute how many flowers Gardon can buy at most?
Input have serveral test cases. Each case has two lines.
The first line contains two integers: N and M. M means how much money Gardon have.
N integers following, means the prices of differnt flowers.
For each case, print how many flowers Gardon can buy at most.
You may firmly assume the number of each kind of flower is enough.
Xwxcy
Submit: 11 Solved: 2
[Submit][Status][Web
Board] [Edit] [TestData]
Description
As you know, Gardon trid hard for his love-letter, and now he's spending too much time on choosing flowers for Angel.When Gardon entered the flower shop, he was frightened and dazed by thousands kinds of flowers.
"How can I choose!" Gardon shouted out.
Finally, Gardon-- a no-EQ man decided to buy flowers as many as possible.
Can you compute how many flowers Gardon can buy at most?
Input
Input have serveral test cases. Each case has two lines.The first line contains two integers: N and M. M means how much money Gardon have.
N integers following, means the prices of differnt flowers.
Output
For each case, print how many flowers Gardon can buy at most.You may firmly assume the number of each kind of flower is enough.
Sample Input
2 5 2 3
Sample Output
2
HINT
Source
Xwxcy
相关文章推荐
- Android换肤系列 Resources
- Matlab中的多类别分类
- Android Design Support Library 八个强大功能的控件
- 驱动开发(6)NT驱动的基本结构
- [Win32] ShellHook的实现
- Android性能测试之耗电量测试
- Unity Shader Rendering Mode
- Standard shader 和 Standard (Specular setup) Shader
- 使用std::cout不能输出显示
- 关于HTML你可能不知道的一些知识点
- git命令图解
- 蓝桥杯练手之 大小之差
- Hdu 5240 Exam【贪心】
- DOM选择器
- 开博了
- 【C/C++学院】0826-文件重定向/键盘输入流/屏幕输出流/字符串输入输出/文件读写简单操作/字符文件读写二进制与文本差别/get与getline挖掘数据/二进制与文本差别/随机位置/多线程初级
- require.js 入门学习
- 驱动开发(5)内核中的字符串
- thinkphp新增
- LVS集群配置(DR模式)