My issue
My code
#include <iostream>
#include <math.h>
using namespace std;
void check(){
int s1,s2;
if(s1>s2){
cout<<"alice"<<endl;
}
else if(s2>s1)
cout<<"bob"<<endl;
else
cout<<"tie"<<endl;
}
int main() {
// your code goes here
int s1=0;
int s2=0;
int t;
cin>>t;
while(t--){
for(int i=0;i<3;i++){
int a[3];
cin>>a[i];
for (int n=0;n<2;n++){
if(a[i]>a[i+1]){
s1= a[i];
}
else{
s1= a[i+1];
}
}
}
for(int j=0;j<3;j++){
int b[3];
cin>>b[j];
for (int m=0;m<2;m++){
if(b[j]>b[j+1]){
s2= b[j];
}
else{
s2= b[j+1];
}
}
}
check();
}
return 0;
}
Problem Link: DICEGAME2 Problem - CodeChef