CodeChef Contest - WICP2002

I have provided the solution and it works for the custom input. The custom input is same as the test cases shown in problem statement. However when the solution is submitted, the output seen is “Wrong Solution”. What is the failing test case? Please reply ASAP.

This is a running contest. Try it on your own or ask after the contest ended.

I understand it is a running contest. But atleast the input passed to the program should be visible, so that the correct solution can be uploaded. Hiding the input test cases is not helpful.

1 Like

but the submision time for second question is over

Codechef decided to not give out the test cases for any problem.
Maybe you post your code here than we can look into it if there are issues. I would try something with binary search for correct value of M to maximize S with respect to Th.

Ok, it looked like submissions were still possible at the time of the post. But maybe this was because of the odd problem sorting in the problem list. I thought it was the latest problem at the point the question was asked (it appeared last in my problem list).

it was total bruteforce ,we just have to initialize M with max value in array a