Submission #16364

# Submission time Handle Problem Language Result Execution time Memory
16364 2015-08-21T15:22:23 Z eaststar 개미 (GA4_ant) C++14
100 / 100
86 ms 1720 KB
#include <bits/stdc++.h>
using namespace std;
long long a[3];
int main(){
    int i,t;
    scanf("%d",&t);
    for(;t--;){
        for(i=0;i<3;++i)scanf("%lld",a+i);
        sort(a,a+3);
        printf("%lld\n",(a[0]+a[1])*(a[0]+a[1])+a[2]*a[2]);
    }
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 58 ms 1720 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 51 ms 1720 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 54 ms 1720 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 55 ms 1720 KB Output is correct
2 Correct 74 ms 1720 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1720 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 62 ms 1720 KB Output is correct
2 Correct 0 ms 1720 KB Output is correct
3 Correct 86 ms 1720 KB Output is correct
4 Correct 71 ms 1720 KB Output is correct
5 Correct 43 ms 1720 KB Output is correct