My issue
my code running perfectly on vs code but here its showing other result
My code
// Update your code below to solve the problem
#include <bits/stdc++.h>
using namespace std;
int main()
{
int t; int teama;
int teamb; int count1=0;
int count2=0;
cin >> t;
while(t--)
{
int A[10];
for(int i = 0; i < 10; i++)
{
cin >> A[i];
}
for(int i=0;i<=10;i=i+2){
if(A[i]==1)
count1++;
}
for(int i=1;i<=10;i=i+2){
if(A[i]==1)
count2++;
}
if(count2==count1){
cout<<0<<endl;
}
else if(count2 >count1){
cout<<2<<endl;
}
else{
cout<<1<<endl;
}
}
}
Learning course: C++ for problem solving - 2
Problem Link: CodeChef: Practical coding for everyone