# CHCBOX WA pls tell any one t.c. on which it will fail

This is my code for the problem CodeChef: Practical coding for everyone
pls tell any 1 test case on which it will fail it is giving W.A. on submission

#include <bits/stdc++.h>
using namespace std;

#define ff first
#define ss second
#define int long long
#define pb push_back
#define mp make_pair
#define pii pair<int,int>
#define vi vector
#define mii map<int,int>
#define pqb priority_queue
#define setbits(x) __builtin_popcountll(x)
#define zrobits(x) __builtin_ctzll(x)
#define ps(x,y) fixed<<setprecision(y)<<x
#define w(x) int x;cin>>x;while(x–)

int mod = 1000000007;

class Triplet {
public:
int x;
int y;
int gcd;
};

int gcd(int a, int b) {
if (b == 0)
return a;
return gcd(b, a % b);
}

Triplet extendedEuclid(int a, int b) {
if (b == 0) {
Triplet ans;
ans.gcd = a;
ans.x = 1;
ans.y = 0;
return ans;
}
Triplet smallAns = extendedEuclid(b, a % b);
Triplet ans;
ans.gcd = smallAns.gcd;
ans.x = smallAns.y;
ans.y = smallAns.x - (a / b) * smallAns.y;
return ans;
}

int modulo(int a, int m) {
Triplet ans = extendedEuclid(a, m);
return ans.x;
}
int32_t main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
w(t) {
int n;
cin >> n;
int arr[2 * n];
int maxi = 0;
for (int i = 0; i < n; i++) {
cin >> arr[i];
maxi = max(arr[i], maxi);
}
int s = 2 * n;
for (int i = n; i < s; i++) {
arr[i] = arr[i - n];
}
int i = n + 1 , j = n + n / 2 ;
int ma[s + 1] = {};
ma[0] = 0;
if (arr[0] == maxi)
ma[1] = 1;
for (int i = 1; i <= s; i++) {
if (arr[i] == maxi)
ma[i + 1] = 1;
ma[i + 1] += ma[i];

``````		// cout << ma[i] << ' ';
}
// cout << endl;
int count = 0;
// bool found = false;
while (i > 0) {
// cout << i << ' ' << j << " ";
// cout << ma[j] - ma[i] << " \n";
if (ma[j] - ma[i] == 0 && ma[i] == ma[i - 1]) {
// found = true;
count++;
// break;
}
i--;
j--;
// count++;
}
// if (!found) {
// 	cout << "0\n";
// 	// cout << "here\n";
// 	continue;
// }
cout << count << "\n";
}
return 0;
``````

}