This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <stdio.h>
int t;
long long a, b, c, ans;
int main(void)
{
int i;
scanf("%d",&t);
for(i=1 ; i<=t ; i++)
{
scanf("%lld %lld %lld",&a,&b,&c);
ans=(a+b)*(a+b)+c*c;
if(ans>(b+c)*(b+c)+a*a)
ans=(b+c)*(b+c)+a*a;
if(ans>(c+a)*(c+a)+b*b)
ans=(c+a)*(c+a)+b*b;
printf("%lld\n",ans);
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |