# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
2271 |
2013-07-21T00:52:21 Z |
sebin |
개미 (GA4_ant) |
C++ |
|
57 ms |
884 KB |
#include<stdio.h>
int main()
{
int t,i;
scanf("%d",&t);
for(i=1;i<=t;i++){
long long a,b,c;
long long m = 50000000001;
scanf("%lld %lld %lld",&a,&b,&c);
if((a+b)*(a+b)+c*c<m) m=(a+b)*(a+b)+c*c;
if((b+c)*(b+c)+a*a<m) m=(b+c)*(b+c)+a*a;
if((a+c)*(a+c)+b*b<m) m=(a+c)*(a+c)+b*b;
printf("%lld\n",m);
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
43 ms |
884 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
46 ms |
884 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
53 ms |
884 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
53 ms |
884 KB |
Output is correct |
2 |
Correct |
51 ms |
884 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
56 ms |
884 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
56 ms |
884 KB |
Output is correct |
2 |
Correct |
57 ms |
884 KB |
Output is correct |
3 |
Correct |
53 ms |
884 KB |
Output is correct |
4 |
Correct |
56 ms |
884 KB |
Output is correct |
5 |
Correct |
56 ms |
884 KB |
Output is correct |