Найти минимальное количество точек [закрыто] ⇐ C++
-
Anonymous
Найти минимальное количество точек [закрыто]
You are the coach of a basketball team with a maximum total player capacity of K. You have a list of player types of size N, where each player of one type contributes a certain number of points to the team's overall points, and the number of players of each type is given.
Your task is to form a lineup with maximum points as possible. You can choose any combination of player types to include in the lineup, as long as the total number of players does not exceed the team's player capacity limit.
Return the Maximum total points that can be achieved with the chosen lineup.
Input Format
• The first line of input takes a Two integers N and K where they denote number of types of players and maximum total player capacity of your team respectively.
• The next following N lines (each representing a type) contain a pair of numbers (A,B,) where A, denotes number of players and B, denotes maximum scoring ability of that player.
Constraints
1
Источник: https://stackoverflow.com/questions/780 ... r-of-point
You are the coach of a basketball team with a maximum total player capacity of K. You have a list of player types of size N, where each player of one type contributes a certain number of points to the team's overall points, and the number of players of each type is given.
Your task is to form a lineup with maximum points as possible. You can choose any combination of player types to include in the lineup, as long as the total number of players does not exceed the team's player capacity limit.
Return the Maximum total points that can be achieved with the chosen lineup.
Input Format
• The first line of input takes a Two integers N and K where they denote number of types of players and maximum total player capacity of your team respectively.
• The next following N lines (each representing a type) contain a pair of numbers (A,B,) where A, denotes number of players and B, denotes maximum scoring ability of that player.
Constraints
1
Источник: https://stackoverflow.com/questions/780 ... r-of-point
Мобильная версия