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>
#define MIN(a,b) ((a)<(b)?(a):(b))
int main() {
int T;
scanf("%d",&T); while(T--) {
double a,b,c,d1,d2,d3;
scanf("%lf%lf%lf",&a,&b,&c);
d1 = (a+b)*(a+b) + c*c;
d2 = (a+c)*(a+c) + b*b;
d3 = (b+c)*(b+c) + a*a;
printf("%.0lf\n",MIN(MIN(d1,d2),d3));
}
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... |