Hello,
I don’t understand why a judge’s feedback is a wrong answer.
Link to the problem: http://www.spoj.com/problems/SMPCIRC/
My code:
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
int xo1, yo1, r1, xo2, yo2, r2, t, distance;
cin >> t;
for (int i = 0; i < t; i++)
{
cin >> xo1 >> yo1 >> r1 >> xo2 >> yo2 >> r2;
distance = sqrt(pow(xo1 - xo2, 2) + pow(yo1 - yo2, 2));
if (abs(r1 - r2) == distance) cout << "E";
else if (abs(r1 - r2) > distance) cout << "I";
else cout << "O";
cout << endl;
}
return 0;
}