Submission #20145

# Submission time Handle Problem Language Result Execution time Memory
20145 2016-02-28T06:40:07 Z hongjun7 개미 (GA4_ant) C++14
100 / 100
65 ms 1084 KB
#include <stdio.h>
#include <algorithm>
using namespace std;
long long a[3];
int main() {
	int T;
	for (scanf("%d", &T); T--; ) {
		for (int 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]);
	}
}
# Verdict Execution time Memory Grader output
1 Correct 43 ms 1084 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 49 ms 1084 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 46 ms 1084 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 50 ms 1084 KB Output is correct
2 Correct 0 ms 1084 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 61 ms 1084 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 48 ms 1084 KB Output is correct
2 Correct 61 ms 1084 KB Output is correct
3 Correct 41 ms 1084 KB Output is correct
4 Correct 0 ms 1084 KB Output is correct
5 Correct 65 ms 1084 KB Output is correct