Submission #17437

# Submission time Handle Problem Language Result Execution time Memory
17437 2015-12-11T14:13:36 Z atomzeno 개미 (GA4_ant) C++
100 / 100
70 ms 1084 KB
#include<stdio.h>
#include<algorithm>
using namespace std;
int main(){
    int n;
    scanf("%d",&n);
    while(n--){
        long long int a[3],e;
        scanf("%lld%lld%lld",&a[0],&a[1],&a[2]);
        if(a[0]>a[1]){
            e=a[0];
            a[0]=a[1];
            a[1]=e;
        }if(a[0]>a[2]){
            e=a[1];
            a[1]=a[2];
            a[2]=e;
        }if(a[1]>a[2]){
            e=a[1];
            a[1]=a[2];
            a[2]=e;
        }
        a[0]+=a[1];
        printf("%lld\n",a[0]*a[0]+a[2]*a[2]);
    }
}
# Verdict Execution time Memory Grader output
1 Correct 36 ms 1084 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 43 ms 1084 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1084 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 48 ms 1084 KB Output is correct
2 Correct 55 ms 1084 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1084 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 70 ms 1084 KB Output is correct
2 Correct 0 ms 1084 KB Output is correct
3 Correct 50 ms 1084 KB Output is correct
4 Correct 58 ms 1084 KB Output is correct
5 Correct 49 ms 1084 KB Output is correct