Submission #5630

# Submission time Handle Problem Language Result Execution time Memory
5630 2014-05-08T23:47:54 Z gs13073 개미 (GA4_ant) C++
100 / 100
60 ms 1088 KB
#include<stdio.h>
long long min(long long x,long long y){return x>y?y:x;}
int main()
{
  int T;
  scanf("%d",&T);
  long long a,b,c;
  while(T--){
  scanf("%lld %lld %lld",&a,&b,&c);
  long long l=(a+b)*(a+b)+c*c;
  long long ll=a*a+(b+c)*(b+c);
  long long lll=(a+c)*(a+c)+b*b;
  printf("%lld\n",min(min(l,ll),lll));
  }
  return 0;
}
# Verdict Execution time Memory Grader output
1 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 52 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
# Verdict Execution time Memory Grader output
1 Correct 52 ms 1088 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 60 ms 1088 KB Output is correct
2 Correct 48 ms 1088 KB Output is correct
3 Correct 48 ms 1088 KB Output is correct
4 Correct 52 ms 1088 KB Output is correct
5 Correct 52 ms 1088 KB Output is correct