Submission #2464

# Submission time Handle Problem Language Result Execution time Memory
2464 2013-07-22T01:57:38 Z makesource 개미 (GA4_ant) C++
100 / 100
186 ms 884 KB
#include <stdio.h>
#define MIN(a,b) ((a)<(b)?(a):(b))

int main() {
	int T;
	scanf("%d",&T); while(T--) {
		double a,b,c,d1,d2,d3;
		scanf("%lf%lf%lf",&a,&b,&c);
		d1 = (a+b)*(a+b) + c*c;
		d2 = (a+c)*(a+c) + b*b;
		d3 = (b+c)*(b+c) + a*a;
		printf("%.0lf\n",MIN(MIN(d1,d2),d3));
	}
	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 124 ms 884 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 139 ms 884 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 143 ms 884 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 152 ms 884 KB Output is correct
2 Correct 151 ms 884 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 151 ms 884 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 166 ms 884 KB Output is correct
2 Correct 184 ms 884 KB Output is correct
3 Correct 166 ms 884 KB Output is correct
4 Correct 186 ms 884 KB Output is correct
5 Correct 172 ms 884 KB Output is correct