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 minval(long long x,long long y)
{
return x>y?y:x;
}
void process()
{
long long a,b,c,c1,c2,c3;
scanf("%lld%lld%lld",&a,&b,&c);
c1=a*a+(b+c)*(b+c);
c2=b*b+(c+a)*(c+a);
c3=c*c+(a+b)*(a+b);
printf("%lld\n",minval(c1,minval(c2,c3)));
}
void input()
{
int i,n;
scanf("%d",&n);
for(i=1; i<=n; i++) process();
}
int main()
{
input();
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... |