The main key observation is realising that we can change any negative to positive if there are even number of negatives, doesn't matter if they are neighbours or far away. In case odd we cannot change 1 negative value no matter what. Thanks for the explanation. Without this observation the problem is very hard but yeah with this Idea it's definitely easy medium.
The main key observation is realising that we can change any negative to positive if there are even number of negatives, doesn't matter if they are neighbours or far away. In case odd we cannot change 1 negative value no matter what. Thanks for the explanation. Without this observation the problem is very hard but yeah with this Idea it's definitely easy medium.
Nice
Bhai please solve the yesterday's icpc preliminary round questions. By the way love your way of problem solving.
great bhaii
if 0 is adjacent a negative number then how should we handle that situation
in that even if the number of negative integer is odd we can change it to all positive