CF609A USB Flash Drives

题目描述

Sean正在把一个大文件考到n个U盘里。这个文件足有m MB那么大。第i个U盘的容量是a[i]。 假设Sean能把文件分装到多个U盘中,请求出他最少需要用多少个U盘来考这个文件。

输入格式

第一行包括一个整数n(1

输出格式

输出至少要多少U盘。 翻译提供者:sunhaina061031

说明/提示

In the first example Sean needs only two USB flash drives — the first and the third. In the second example Sean needs all three USB flash drives. In the third example Sean needs only one USB flash drive and he can use any available USB flash drive — the first or the second.