Submission #3023

# Submission time Handle Problem Language Result Execution time Memory
3023 2013-08-23T16:09:41 Z movie_jo 개미 (GA4_ant) C
100 / 100
60 ms 1088 KB
#include<stdio.h>

#define min(x,y) (x<y?x:y)

int main()
{
	int T;
	long long a, b, c, d, e, f;

	scanf("%d", &T);

	while(T--)
	{
		scanf("%lld %lld %lld", &a, &b, &c);

		d = (b + c)*(b + c) + a*a;
		e = (a + c)*(a + c) + b*b;
		f = (a + b)*(a + b) + c*c;

		printf("%lld\n", min(d,min(e,f)));
	}
	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 44 ms 1088 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 44 ms 1088 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 48 ms 1088 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 56 ms 1088 KB Output is correct
2 Correct 48 ms 1088 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 52 ms 1088 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 52 ms 1088 KB Output is correct
2 Correct 48 ms 1088 KB Output is correct
3 Correct 52 ms 1088 KB Output is correct
4 Correct 60 ms 1088 KB Output is correct
5 Correct 48 ms 1088 KB Output is correct