# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
7061 |
2014-07-21T10:41:01 Z |
gs14004 |
개미 (GA4_ant) |
C++ |
|
60 ms |
1088 KB |
#include <cstdio>
#include <algorithm>
using namespace std;
long long a,b,c;
long long v1,v2,v3;
int main(){
int tc;
scanf("%d",&tc);
for (int i=0; i<tc; i++) {
scanf("%lld %lld %lld",&a,&b,&c);
v1 = (a+b)*(a+b)+c*c;
v2 = (a+c)*(a+c)+b*b;
v3 = (b+c)*(b+c)+a*a;
printf("%lld\n",min(v1,min(v2,v3)));
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
48 ms |
1088 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
52 ms |
1088 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
52 ms |
1088 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
44 ms |
1088 KB |
Output is correct |
2 |
Correct |
56 ms |
1088 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
60 ms |
1088 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
52 ms |
1088 KB |
Output is correct |
2 |
Correct |
56 ms |
1088 KB |
Output is correct |
3 |
Correct |
56 ms |
1088 KB |
Output is correct |
4 |
Correct |
48 ms |
1088 KB |
Output is correct |
5 |
Correct |
36 ms |
1088 KB |
Output is correct |