Why is this not giving the correct output?

Why is this not giving the correct output?
AND Please check the if the condition that is I think there will be equality sign too in y+1<arr[x].size

@cbcao263
only error is that
you have to return the result vector
after completion of while loop

Modified Code

i hope this help
if you have more doubts regarding this feel free to ask
if your doubt is resolved mark it as resolved from your doubt section inside your course

How I can take the code making perfect for the input. Please help for this one.

this is how to take input for vector of vectors

vector<vector<int> > arr2;
	while(n--)
	{
		vector<int>v;
		for(int i=0;i<m;i++)
		{
			int x;cin>>x;
			v.push_back(x);
		}
        arr2.push_back(v);
	}

Modified Code

you have ask same doubt with same code with same error again DOUBT

you can ask doubts regarding this here
i will help you
Please mark THAT DOUBT as resolved

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.