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