This is my accepted solution for this question on Codechef

#include <bits/stdc++.h>

using namespace std;

int main()

{

long t;

cin>>t;

while(t–)

{

long n;

cin>>n;

int p[n],flag=1,i;

for(i=0;i<n;i++)

cin>>p[i];

int chec[8]={0};

```
for(i=0;i<n;i++)
chec[p[i]]++;
for(int i=1;i<7;i++)
{
if(chec[i]%2!=0||chec[i]==0||chec[7]==0)
{
flag=0;
break;
}
}
if(flag==0)
cout<<"no"<<endl;
else
cout<<"yes"<<endl;
```

}

return 0;

}

This is Author Solution for the same question

#include <bits/stdc++.h>

using namespace std;

const int MAXN = 105;

const int MAX = 100;

int a[MAXN];

int main() {

int T;

scanf("%d", &T);

assert(T >= 1 && T <= MAX);

while (T–) {

int n;

scanf("%d", &n);

assert(n >= 1 && n <= MAX);

for (int i = 0; i < n; i++) {

scanf("%d", &a[i]);

assert(a[i] >= 1 && a[i] <= MAX);

}

vector<pair<int, int> > cnts;

int cnt = 1, which = a[0];

for (int i = 1; i < n; i++) {

if (a[i] == a[i - 1]) {

cnt++;

} else {

cnts.push_back(make_pair(which, cnt));

which = a[i];

cnt = 1;

}

}

if (cnt > 0) {

cnts.push_back(make_pair(which, cnt));

}

int ok = true;

// cnt dentoes consecutive groups of equal numbers.

if (cnts.size() == 13) {

for (int i = 0; i < 13; i++) {

if (cnts[i] != cnts[13 - i - 1]) {

ok = false;

}

if (i < 7 && cnts[i].first != i + 1) {

ok = false;

}

}

} else {

ok = false;

}

puts(ok ? “yes” : “no”);

}

return 0;

}

Now Test case i have used is this

1

13

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

My accepted solution is giving yes for above test case while Author’s solution giving no for the same…

I have run several hundreds of codes of other people also for the same test case.Their answer is yes for above test .

But Editorial and Tester solution is giving no for the same.

Just want to ask Codechef Admins what is happening here .Even the guys who have made the question have not used the correct test cases for checking solutions.