#include using namespace std; /* function to calculate jumps required to cross walls */ int jumpcount(int x, int y, int n, int height[]) { int jumps = 0; for (int i = 0; i < n; i++) { if (height[i] x) { jumps++; h = h - (x - y); } jumps++; } return jumps; } /*driver function*/ int main() { int x = 10, y = 1; int height[] = { 11, 10, 10, 9 }; int n = sizeof(height)/sizeof(height[0]); cout