My issue
i have error in a test case but even the solution part has the same code as min
My code
// Update your code below to solve the problem
#include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin >> t;
while(t--)
{
int A[10];
int t1,t2;
for(int i = 0; i < 10; i++)
{
cin >> A[i];
}
t1=A[1]+A[2]+A[3]+A[4]+A[0];
t2=A[5]+A[6]+A[7]+A[8]+A[9];
if(t1>t2)
{
cout<<1<<endl;
}
else if(t1<t2)
{
cout<<2<<endl;
}
else
{
cout<<0<<endl;
}
}
}
Learning course: C++ for problem solving - 2
Problem Link: CodeChef: Practical coding for everyone