PLEASE DON'T DOWNVOTE WITHOUT READING BLOG,YOU CAN JUST IGNORE IT IF YOU DONT WANT TO HELP
Hey community, somedays ago there had a gym contset named "Belarusian round #2: Simran, Muskan, Divyansh, Pranjal and their problems" which had some really cool problems.
I had some idea of PROBLEM C of that contest and but it failed,and cause it has no editorial and we cant see other code I am not getting how to do this.
WHETHER YOU HAVE DONE THAT QUESTION OR NOT ,I SINCERLY HOPE THAT YOU GO THROUGH PROBLEM ONCE.
First of all this is question link: PROBLEM C
If you hadn't registered in that contest here is link to register: Belarusian round #2
AND AT LAST HERE IS FAILED APPROACH:
If there's an even number of negative numbers then the answer is product of whole array.
If there's an odd number of negative numbers, one subarray will have negative product, so obviosuly we want to minimise this and maximise the other one.
It's easy to notice that subarray will be a prefix till the first negative number, or suffix till the first negative number.
Edit:See WE cant't see accepted code