# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
2434 |
2013-07-21T12:44:42 Z |
rkdrjs0327 |
개미 (GA4_ant) |
C++ |
|
64 ms |
884 KB |
#include<stdio.h>
long long minval(long long x,long long y)
{
return x>y?y:x;
}
void process()
{
long long a,b,c,c1,c2,c3;
scanf("%lld%lld%lld",&a,&b,&c);
c1=a*a+(b+c)*(b+c);
c2=b*b+(c+a)*(c+a);
c3=c*c+(a+b)*(a+b);
printf("%lld\n",minval(c1,minval(c2,c3)));
}
void input()
{
int i,n;
scanf("%d",&n);
for(i=1; i<=n; i++) process();
}
int main()
{
input();
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 |
46 ms |
884 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
47 ms |
884 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
48 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 |
59 ms |
884 KB |
Output is correct |
2 |
Correct |
56 ms |
884 KB |
Output is correct |
3 |
Correct |
61 ms |
884 KB |
Output is correct |
4 |
Correct |
64 ms |
884 KB |
Output is correct |
5 |
Correct |
56 ms |
884 KB |
Output is correct |