# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
2373 |
2013-07-21T04:24:26 Z |
swh0329 |
개미 (GA4_ant) |
C++ |
|
57 ms |
884 KB |
#include<stdio.h>
int main()
{
int n,i;
long long int k,a,b,c;
scanf("%d",&n);
for(i=1;i<=n;i++){
scanf("%lld %lld %lld",&a,&b,&c);
k=(a+b)*(a+b)+(c*c);
if((a+c)*(a+c)+(b*b)<k)k=(a+c)*(a+c)+(b*b);
if((b+c)*(b+c)+(a*a)<k)k=(b+c)*(b+c)+(a*a);
printf("%lld\n",k);
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
42 ms |
884 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
48 ms |
884 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
45 ms |
884 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
52 ms |
884 KB |
Output is correct |
2 |
Correct |
53 ms |
884 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
52 ms |
884 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
53 ms |
884 KB |
Output is correct |
2 |
Correct |
56 ms |
884 KB |
Output is correct |
3 |
Correct |
54 ms |
884 KB |
Output is correct |
4 |
Correct |
57 ms |
884 KB |
Output is correct |
5 |
Correct |
52 ms |
884 KB |
Output is correct |