题目意思
题目给是一个perfect sequence的定义,即给定一个参数p,要求给定的数字中选择几个数字,组成一个满足最大项不大于最小项乘参数的数列。
即:
Given a sequence of positive integers and another positive integer p. The sequence is said to be a perfect sequence if M≤m×p where M and m are the maximum and minimum numbers in the sequence, respectively.
Now given a sequence and a parameter p, you are supposed to find from the sequence as many numbers as possible to form a perfect subsequence.
问题点
最小项是根据选定的数字变化的!
所以考虑的思路:先排序,再要要求选数字。