My code - https://ideone.com/nxJxpD Problem - http://www.spoj.com/problems/HYDRO/
I am getting correct results. I don’t know what is wrong.
Try this, expected answer is 11.
1 10 2 0 0 0 0 0 5 0 1 1