My issue
My code
#include <iostream>
using namespace std;
int main() {
long long t;
cin>>t;
while(t--){
long long n;
cin>>n;
long long a[n];
for(int i=0;i<n;i++)cin>>a[i];
long long c=0;
for(int i=1;i<n-1;i++){
if(a[i]==a[i-1] and a[i]==a[i+1])c++;;
}
if(a[0]==a[1])c++;
if(a[n-1]==a[n-2])c++;
// cout<<c<<endl;
cout<<n<<endl;
}
return 0;
}
Problem Link: BROKPHON Problem - CodeChef