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(x,y) x<y?x:y
using namespace std;
int main()
{
int t;
int a, b, c, m;
scanf("%d", &t);
while(t>0)
{
t--;
m=999999;
scanf("%d %d %d", &a, &b, &c);
m=Min(m, a*a+b*b*2+c*c);
m=Min(m, a*a*2+b*b+c*c);
m=Min(m, a*a+b*b+c*c*2);
printf("%d\n", m);
}
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... |