Failed test cases

#include
using namespace std;
int main() {
int n,m;
cin>>n>>m;
int a[1000][1000],i,j;
for (i=0;i<n;i++){
for (j=0;j<n;j++){
cin>> a[i][j];
}
}
for (j=0;j<m;j++){
if (j%2==0){
for (i=0;i<n;i++){
cout<<a[i][j]<<", “;
}
}
else {
for (i=n-1;i>=0;i–){
cout<<a[i][j]<<”, ";
}
}

}
cout<<"END";
return 0;

}

no test case is passing with this code but output is coming out correct

hello @pranaynigam

pls save this code at cb ide and share its link

i cant seem to share the link of my code after saving it as the share bar is empty why i click on it to copy the link. Please make the required changes in the code and teach me how to overcome the sharing of url problem

no dont use that share button.
instead copy the url from ur search bar and paste it here in forum

check now->

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.