CF507A Amr and Music

题目描述

给定$n$个物品,装进一个容量为$k$的背包,每个物品的价值为$1$,重量为$c[i]$。 求一种选物品的方案,要求所获得的价值最大(可以不装满背包),要求输出选的物品的编号(任意顺序,本题```SPJ```)

输入格式

第一行两个整数$n$,$k$。 第二行$n$个整数,表示每个物品的重量

输出格式

输出共两行。 第一行为所选的物品数量。 第二行为所选的物品的编号(任意排列,本题```Special Judge```)

说明/提示

In the first test Amr can learn all $ 4 $ instruments. In the second test other possible solutions are: $ {2,3,5} $ or $ {3,4,5} $ . In the third test Amr doesn't have enough time to learn the only presented instrument.