Collecting Game
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
Background
Special for beginners, ^_^
Description
给你一个由 个正整数组成的数组 和一个分数。如果你的分数大于或等于 ,那么你可以将分数增加 ,并从数组中删除 。
对于每个索引 ,如果您删除了 ,并将分数设置为 ,则输出您可以删除的额外数组元素的最大数量。请注意,移除 不应计入答案中。
Format
Input
第一行包含一个整数 () - 数组的长度。
第二行包含 个整数 () - 数组的元素。
Output
输出 个整数,其中第 个整数表示如果从数组中删除 并将分数设置为 后,可以删除的额外数组元素的最大数量。
Samples
5
20 5 1 4 2
4 3 0 3 1
Limitation
1s, 1024KiB for each test case.
SDNU_ACM_ICPC_2024_WEEKLY_PRACTICE_4th
- Status
- Done
- Rule
- ACM/ICPC
- Problem
- 12
- Start at
- 2024-11-17 18:00
- End at
- 2024-11-17 22:00
- Duration
- 4 hour(s)
- Host
- Partic.
- 38