hello guys My code is as follows ,it is getting the 1st,3rd and 4th testcases right but wrong in all other, can u guys please help:-
#include <iostream>using namespace std;int main(){int width,maxheight;cin>>width>>maxheight;int arr[width];for(int i=0;i<width;i++){cin>>arr[i];}bool havebox=false;int craneposition=0;while(true){int command;cin>>command;if(command==1){