My issue
Hi , can someone pls tell what is it that i m doing wrong in code .
My code
#include <bits/stdc++.h>
using namespace std;
int main() {
// your code goes here
long long T ;
cin>>T;
while(T--){
long long N;
cin>>N;
vector<long long> Bucket(N);
for(int i = 0 ; i < N ; i++){
cin>>Bucket[i];
}
long long odds_and_1 = 0 , even = 0;
for (long long i : Bucket){
if((i%2)!=0){
odds_and_1++;
}
else if ((i%2)==0)
{
even++;
}
}
int Alice =0, Bob=0;
if (odds_and_1%2 != 0){
Alice++;
}
else if (odds_and_1%2 == 0){
if(even>0){
Bob++;
}
}
if (Bob > Alice){
cout<<"Bob\n";
}
else if (Bob == Alice){
cout<<"draw\n";
}
else {
cout<<"Alice";
}
}
}
Problem Link: Bucket Game Practice Coding Problem - CodeChef