Consider the Question:DTCT 2015-VIRAT.
Here are two solutions:

  1. Accepted Solution
  2. Wrong Answer Solution

Consider the Input as:
-5 -3 -4 -2 9 8 -4 -9 2


Solution 1[Accepted Solution] = -1296

Solution 2[Wrong Answer Solution] = -311040

Calculating Manually

{-5*-3*-498*-4*-9*2}= -31104

So Solution 2 should be correct and Solution 1 should be marked as Wrong Answer, but the JUDGE IS WRONG!

yes something is fishy around here…i checked two of the accepted solutions one you mentioned and one here


both gave different outputs how can two accepted solutions give different outputs? admins need to check.

@wormx yup, the test cases are very weak may be. The solution you are taking about is mine, and it takes the minimum of all the possible subsets. The best way to solve this problem. Best because you are checking every single possibility and then selecting your answer.