menu ZJOJ
account_circle 请登录
home
首页
book
题目
apps
分类
play_circle_outline
状态
assessment
竞赛
assignment
作业
equalizer
排名
assignment_ind
登录
person_add
注册
1538: How Many Buses
时间限制:1.000s
内存限制:128MB

题目描述

The school organizes students majoring in computer science to visit Qixia Mountain and uses school buses to take them to.But the school bus is limited to only one, so we need to rent a bus outside the school to take our students there. Assuming that the passenger capacity of the rented car is the same as that of the school bus, both are 50; May I ask how many buses need to be rented at least to take all students to Qixia Mountain (on a class basis, students in one class must be in the same bus, and one bus can carry multiple classes, with a maximum of 50 students in each class).


输入格式

There are a total of 2 lines of input.
The first line is a positive integer n, representing the number of classes.
The second line has n positive integers, representing the number of people class Ci, separated by spaces.

输出格式

Output the minimum number of vehicles that need to be rented.

样例输入 content_copy

5
20 30 40 50 10

样例输出 content_copy

2

提示/说明

1 ≤ n ≤ 100

1 ≤ Ci ≤ 50

分类