Please find why codechef is showing wrong answer for my code.

link to problem: https://www.codechef.com/problems/RAINBOWA
my code:
#include
#include <math.h>
using namespace std;
int main()
{
int t;
cin>>t;
int flag=0;
int m=t;
int res[t]={0};
if (t<=100 && t>=1)
{
while(t–)
{
int number=0;
cin>>number;
if (number>=7 && number<=100)
{
int arr[number];
for (int i = 0; i < number; ++i)
{
cin>>arr[i];
if (arr[i]>=1 && arr[i]<=100)
{
continue;
}
else
{
break;
}
}
if (number%2==0)
{
res[t]= 1;
/cout<<“No”;/
}
else
{
int middle = number/2;

				for (int i = 0; i < middle; ++i)
				{
					if (arr[i]==arr[number-1-i])
					{
						continue;
					}
					else
					{
						flag=1;
						break;
					}
				}
				if (flag==1)
				{
					res[t]= 1;
					/*cout<<"No";*/
				}
				else
				{
					res[t]= 0;
					/*cout<<"Yes";*/
				}
			}

		}	
	}
}	
while(m--)
{
	if (res[m]==1)
	{
		cout<<"no"<<endl;
	}
	else if(res[m]==0)
	{
		cout<<"yes"<<endl;
	}
	else
	{
		cout<<"error";
	}
}

}

Your code is giving wrong answer “no” for this input…

1

14

1 2 3 4 5 6 7 7 6 5 4 3 2 1

while answer should be yes… because 7 can also be repeated in between…

//