Can any one help me my own test cases are passing this solution but still it shows wrong answer in submission

Continuing the discussion from TOWIN - Editorial:

#include
using namespace std;

int main() {
long int t;
cin>>t;
while(t–)
{ long int n,x,sum=0,sum2=0;
cin>>n;
for(int i=0;i<n;i++)
{
cin>>x;
if((i==1||i==2||i%2==0)&&(i!=0))
{
sum=sum+x;
}
else
{
sum2=sum2+x;
}

       }
       if(sum2==sum)
       {
               cout<<"draw"<<endl;
       }
       else if(sum2>sum)
       {
               cout<<"first"<<endl;
       }
       else
       {
               cout<<"second"<<endl;
       }
}
return 0;

}

First take number in array then sort it. Because the player P1 can choose any one element so, he will go to select the largest element then P2 goes to second and third largest then they will choose alternatively .
I hope you this understand you.
otherwise take a look on my submission :- code