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 main()
{
long long mn;
int t,i;
long long a,b,c;
scanf("%d",&t);
for(i=1;i<=t;i++){
scanf("%lld %lld %lld",&a,&b,&c);
mn=a*a+(b+c)*(b+c);
if(mn>b*b+(a+c)*(a+c)) mn=b*b+(a+c)*(a+c);
if(mn>c*c+(a+b)*(a+b)) mn=c*c+(a+b)*(a+b);
printf("%lld\n",mn);
}
}
# | 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... |