Submission #2514

# Submission time Handle Problem Language Result Execution time Memory
2514 2013-07-23T03:59:01 Z kipa00 개미 (GA4_ant) C++
100 / 100
59 ms 884 KB
#include <cstdio>
using namespace std;

int T;

int main() {
    long long int a, b, c;
    long long int d, e, f;
    long long int min;
    scanf("%d", &T);
    while (T--) {
        scanf("%lld %lld %lld", &a, &b, &c);
        d = a + b;
        e = b + c;
        f = c + a;
        d = c * c + d * d;
        e = a * a + e * e;
        f = b * b + f * f;
        min = (d < e) ? d : e;
        min = (min < f) ? min : f;
        printf("%lld\n", min);
    }
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 44 ms 884 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 47 ms 884 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 48 ms 884 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 58 ms 884 KB Output is correct
2 Correct 55 ms 884 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 51 ms 884 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 59 ms 884 KB Output is correct
2 Correct 59 ms 884 KB Output is correct
3 Correct 56 ms 884 KB Output is correct
4 Correct 56 ms 884 KB Output is correct
5 Correct 59 ms 884 KB Output is correct