WA in LEBOMBS

my code wrks perfectly in dev c++ bt showing WA. cn any one pls suggest whats wrng with my code
#include<stdio.h>
int main()
{int t;
scanf("%d",&t);
while(t–)
{int n,m=0;
scanf("%d",&n);
bool arr1[n],arr2[n]; char arr[n];
scanf("%s",arr);
for(int l=0;l<n;l++) arr2[l]=1;
for(int i=0;i<n;i++){
if (arr[i]==‘0’) arr1[i]=0;
else arr1[i]=1;}
arr2[0]=1;arr2[1]=1;
if(arr1[0]==1){arr2[0]=0; arr2[1]=0;}
for(int j=1;j<=(n-1);j++)
{
if (arr2[j]==1&&arr1[j]==1)
{
arr2[j-1]=0;
arr2[j]=0;
if(j!=(n-1))
arr2[j+1]=0;
}
}
for(int k=0;k<n;k++)
{if(arr2[k]==1)
m++;
}
printf("%d\n",m);
}
return 0;}

//