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