Message from C, C++ talks
Ah, shi.. yes, incrementing one with that condition was a stupid inea.
Then.. we can create a new bool flag, representing whether the last processed item was good or going to be deleted. Set it to true, when we in
p[i] > pre block and set it to false in the
else block of this if.
And in the beginning of the block where we setting it to false do
if (isValueWasBad) count++;
So we will still increment the value in case we shold have one as the answer.