Help me in solving FARFROMO problem

My issue

My code

#include <iostream>
#include <cmath>
#include <cstdlib>
#include <bits/stdc++.h>
using namespace std;

    int dist(int a, int b){
        int c= abs(a);
        int d= abs(b);
        int e= sqrt((c*c)+(d*d));
        return e;
    }
int main() {
	// your code goes here
	int t,a,b,c,d;
	cin>>t;
	for(int i=1;i<t+1;i++){
	    cin>>a>>b>>c>>d;
	    int x= dist(a,b);
	    int y= dist(c,d);
	    if(x>y){
	        cout<<"Alex"<<endl;
	    }
	    else if(x==y){
	        cout<<"Equal"<<endl;
	    }
	    else{
	        cout<<"Bob"<<endl;
	    }
	}
	return 0;
}

Problem Link: FARFROMO Problem - CodeChef

Hi @goyalsajal92,

Your code seems correct, but you overlooked fact that distance can be in decimal. So, you can change it double in order to get correct answer.

Happy Coding!