test cases for CHSIGN of May Challenge 2018 Division 2

I try to solve this question ,even i have created a solution for this problem.But unfortunately none of the test cases pass.but my basic test cases were able to pass.Can anyone suggest me some test cases .Where my code fails.According to me my code is correct.Please help me!

my code of this solution is here https://www.codechef.com/viewsolution/18506042

can You provide your code please…??

2

9

3 5 1 4 3 8 4 7 3

13

3 2 3 1 5 4 6 5 7 6 7 6 7

1 Like

-3 5 1 4 -3 8 -4 7 3

3 -2 3 1 5 4 6 -5 7 6 7 -6 7

yeah forgot to mention my code link .Now i have added that @l_returns

i got where i have done wrong.Thanks to your second test case .

welcome… :slight_smile:

Don’t know if this is the right place to ask or not, but I almost solved this problem I knew it was dp and and I had even thought of all possible case. I was just not able to come up with the state in terms of i, And I didn’t really gave much efforts after I was stuck there. Is this because of lack of practise ? or I was just being lazy and now I am looking for an excuse. (… really want an anonymous feature to ask such dumb question without knowing, some one is probably going to bring this up in a social conversation :stuck_out_tongue: )