Submission #2265

# Submission time Handle Problem Language Result Execution time Memory
2265 2013-07-21T00:40:01 Z 6590f1 개미 (GA4_ant) C++
48 / 100
59 ms 884 KB
#include<stdio.h>
int main()
{
    int a,b,c,k,n,i;
    scanf("%d",&n);
    for(i=1;i<=n;i++){
        scanf("%d %d %d",&a,&b,&c);
        k=(a+b)*(a+b)+(c*c);
        if((a+c)*(a+c)+(b*b)<k)k=(a+c)*(a+c)+(b*b);
        if((b+c)*(b+c)+(a*a)<k)k=(b+c)*(b+c)+(a*a);
        printf("%d\n",k);
    }
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 40 ms 884 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 44 ms 884 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Correct 47 ms 884 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 55 ms 884 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 59 ms 884 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 57 ms 884 KB Output isn't correct
2 Halted 0 ms 0 KB -