Computer Science, asked by prathmiyer18, 4 months ago

Problem Statement:
Mckay has planned n number of trips in Australia
to see different destinations, goal is to cover max
destinations in Australia. It takes k; days for i-th trip.
Mckay has given m days for his trips. How many
trips he can complete.
Input Format:
The first line contains twa numbers n, m (15 n5100,
osms 10 000), the number of trips and number of
days dedicated to all trips by Mckay, respectively,
The second line contains n integers ki(13 ki<100),
representing number of days required to complete
the i-th trip.
Output Format:
In the first line output one integer mrepresenting
the maximum number of trips Mckay can
complete.
In the second line output m space-separated
integers: the indices of trips to be completed. You
may output indices in any order.
If there are multiple optimal solutions output any. It
is not necessary to use all days to complete trips.
Input:​

Answers

Answered by vinaynani974gmailcom
0

Answer:

Sorry, i didn't understood your question

Similar questions