QOJ.ac

QOJ

Límite de tiempo: 1 s Límite de memoria: 32 MB Puntuación total: 10

#11174. 表格 [B]

Estadísticas

Byteman 是一名木匠。他刚刚接到了一份制作 $ s $ 张松木桌子的订单。虽然他的车间里有充足的松木板,但他刚好用完了螺丝。因此,他需要前往仓库带回一些装有螺丝的盒子。为了有足够的螺丝来制作这些桌子,他最少需要带回多少个盒子?

输入格式

标准输入的第一行包含三个整数 $ n $、$ k $ 和 $ s $($1 \le n, k, s \le 1\,000$),它们之间用空格分隔。这些数字分别代表 Byteman 仓库中螺丝盒子的数量、制作一张桌子所需的螺丝数量,以及 Byteman 需要制作的桌子数量。第二行包含 $ n $ 个(不一定不同)整数 $ a_{i} $($1 \le a_{i} \le 1\,000$),它们之间用空格分隔,其中 $ a_{i} $ 表示仓库中第 $ i $ 个盒子里的螺丝数量。

输出格式

标准输出仅包含一行,即一个整数,表示 Byteman 为了制作 $ s $ 张桌子,最少需要从仓库带回的螺丝盒子数量。你可以假设仓库中的螺丝总量足以制作所有桌子。

样例

输入 1

5 6 3
3 9 5 7 3

输出 1

3

说明 1

为了制作三张桌子,每张桌子需要六个螺丝,Byteman 必须从仓库带回三个装有螺丝的盒子。这些盒子可以是装有 3、7 和 9 个螺丝的盒子,也可以是装有 9、5 和 7 个螺丝的盒子。

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.