Preface
"Huawei OD Written Exam Questions python" This column contains the Huawei OD Computer Exam Questions. It will be updated in real time to accept feedback from netizens. It will update you with the latest Huawei Deco OD Exam Questions and provide you with a question bank for learning and practice. You can subscribe to this column Send a private message to the communication group
■ Title description
[Assembling equipment for maximum reliability]
A device consists of N types of components (only one component of each type is required, and the type number ranges from 0 to N-1),
Each component has a reliability attribute. The higher the reliability, the more expensive the component.
The reliability of the equipment is determined by the least reliable component among all the components that make up the equipment.
Given a budget S, purchase N types of components (one of each type of component needs to be purchased). Please give the maximum reliability of the device that can be composed without exceeding the budget.
Enter description
SN // S total budget, N types of components
total //The total number of components, each type of components can have multiple types;
After that, there are total rows of data for specific devices.
type reliability price // type is an integer type, representing the type number of the component from 0 ~ N-1;
reliability is an integer type, representing the reliability of the component; price is an integer type, representing the price of the component
Output description
Maximum reliability of equipment that fits your budget,