Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

Problem hidden on 2014-02-14 21:24:46 by Mitch Schwartz ?

QTGIFT2 - Valentine knapsack

no tags 

Today is Valentine, and DB has give very much chocolate from his schoolmate. He is so happy, but his bag is not enough big to take all the chocolate bars to home. So he decides that he will take the maximum weight of chocolate as possible.

Please help him find the best way to select chocolate bars. Note that his bag can contains at most c(g) chocolate and he mustn’t crack any chocolate bar because it will make his bag dirty.

Input :

            - First line contains two positive integer : n and c, the number of chocolate bars and the maximum weight of chocolate his bag can contains.

            - Second line contains n positive integer, the i-th number denotes the weight of the i-th chocolate bar.

Output :

            - First line : two numbers, x and k, is the proposed maximum weight he can take and the number of chocolate bars he need to select.

            - Second line : k numbers, are indexes of the chocolate bars he need to select.

Limits :

-          1 ≤ n ≤ 105

-          1 ≤ c ≤ 109

-          1 ≤ w[i] ≤ 104

Scoring :

            There are 30 test cases. With any test case, let xmax is the best result and x is your program’s result, your score will calculate by function : max(0, 10 – [(xmax – x) / log10xmax]), where [a] denotes the smallest integer that not less than a.

Sample :

Input :

6 100

26 15 69 24 45 90

Output :

95 2

1 3

 

 

In above test case :

 

- If your program output :

95 3

1 5 4

You will get 10 points.

 

- If your program output :

90 1

6

You will get max(0, 10 – (95 – 90) / log1095) = 7 points.

 

- If your program output :

95 2

1 2

You will get… 0 point !


hide comments
Mitch Schwartz: 2014-02-21 14:16:46

1) Suggest changing "maximum weight he can take" -> "proposed maximum weight he can take".
2) Scoring doesn't seem reasonable to me. For larger x_max, you need to get extremely close to optimal (in terms of relative error) to have any points, and then it's not fine-grained. This really doesn't make sense for this type of problem.
3) Please give some assurance that x_max is correctly calculated for each test case; I guess it should require a computation running on your computer for quite a long time. If this is not the case, that could indicate a mistake or poor design.
4) Problem should be made untestable if the judge is not completed. Even better would be not to publish until the problem is ready for submissions. And anyway, since there are so many issues, I've hidden the problem. You may leave a comment for further discussion, or if you want to continue by email, let me know.


Added by:Coder nhà mình
Date:2014-02-14
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64