write in c++ program to solve water jug problem