# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
2587 |
2013-07-27T05:56:51 Z |
jht0717 |
개미 (GA4_ant) |
C++ |
|
60 ms |
1672 KB |
#include<iostream>
#include<stdio.h>
using namespace std;
int main()
{
long long n, i, a, b, c, a1, a2, a3, min;
scanf("%lld", &n);
for(i=1; i<=n; i++){
scanf("%lld %lld %lld",&a, &b, &c);
if(a<0 || b<0 || c<0) printf("0\n");
else{
a1=(a+b)*(a+b)+(c*c);
min=a1;
a2=(a+c)*(a+c)+(b*b);
if(a2<min) min=a2;
a3=(b+c)*(b+c)+(a*a);
if(a3<min) min=a3;
printf("%lld\n", min);
}
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
44 ms |
1672 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
40 ms |
1672 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
48 ms |
1672 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
48 ms |
1672 KB |
Output is correct |
2 |
Correct |
52 ms |
1672 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
52 ms |
1672 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
60 ms |
1672 KB |
Output is correct |
2 |
Correct |
60 ms |
1672 KB |
Output is correct |
3 |
Correct |
60 ms |
1672 KB |
Output is correct |
4 |
Correct |
44 ms |
1672 KB |
Output is correct |
5 |
Correct |
52 ms |
1672 KB |
Output is correct |