uri 1555 solution in cpp
by ujjal roy
#include<bits/stdc++.h>
using namespace std;
main()
{
int t,r,b,c,x,y;
cin>>t;
while(t--)
{
cin>>x>>y;
r=pow(3*x,2)+y*y;
b=2*(x*x)+pow(5*y,2);
c=-(100*x)+pow(y,3);
if(r>b&&r>c) cout<<"Rafael ganhou"<<endl;
else if(b>r&&b>c) cout<<"Beto ganhou"<<endl;
else if(c>r&&c>b) cout<<"Carlos ganhou"<<endl;
}
return 0;
}
2 Comments
Nice
ReplyDeleteBrother Do you know about your girlfriend name ?
ReplyDelete