# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
4972 |
2014-01-23T16:31:13 Z |
tkxkd7223 |
개미 (GA4_ant) |
C++ |
|
52 ms |
1088 KB |
#include <stdio.h>
int main(){
int T, i;
long long a, b, c;
long long gap1, gap2, gap3, min;
scanf("%d", &T);
for(i=1 ; i<=T ; i++){
scanf("%lld %lld %lld", &a, &b, &c);
gap1=(a+b)*(a+b)+c*c;
gap2=(a+c)*(a+c)+b*b;
gap3=(b+c)*(b+c)+a*a;
min=gap1;
if(gap2<min)min=gap2;
if(gap3<min)min=gap3;
printf("%lld\n", min);
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
44 ms |
1088 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
40 ms |
1088 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
44 ms |
1088 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
44 ms |
1088 KB |
Output is correct |
2 |
Correct |
48 ms |
1088 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
44 ms |
1088 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
48 ms |
1088 KB |
Output is correct |
2 |
Correct |
48 ms |
1088 KB |
Output is correct |
3 |
Correct |
52 ms |
1088 KB |
Output is correct |
4 |
Correct |
52 ms |
1088 KB |
Output is correct |
5 |
Correct |
52 ms |
1088 KB |
Output is correct |