Submission #1447

# Submission time Handle Problem Language Result Execution time Memory
1447 2013-07-04T13:42:27 Z tncks0121 개미 (GA4_ant) C++
100 / 100
78 ms 884 KB
#include <stdio.h>
#include <algorithm>

using namespace std;
typedef long long ll;

ll sq (ll x) {
    return x*x;
}

int main() {
    int tc; scanf("%d", &tc);
    while(tc--) {
        ll a[3]; for(int i = 0; i < 3; i++) scanf("%lld", a+i);
        sort(a, a+3);
        
        ll r = sq(a[0]+a[1]) + sq(a[2]);
        printf("%lld\n", r);
    }
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 51 ms 884 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 52 ms 884 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 72 ms 884 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 76 ms 884 KB Output is correct
2 Correct 63 ms 884 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 65 ms 884 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 70 ms 884 KB Output is correct
2 Correct 66 ms 884 KB Output is correct
3 Correct 72 ms 884 KB Output is correct
4 Correct 78 ms 884 KB Output is correct
5 Correct 71 ms 884 KB Output is correct