Given N points and some integer K. Your task is to find the largest set which is correlative to K. Assume only one largest exists. N and K will be in first line. N lines will follow, each one with a single integer, representing the location of one of the points. print the size of the largest set of points which is correlative to K, in the first line of the input. Remaining lines will contain the points of the set, one per line in increasing order. input 5 2 1 2 3 4 5 output 3 1 3 5
Answers
Answered by
0
Answer:
Explanation: sorry, I don't know this answer
Similar questions