Submission #6788

# Submission time Handle Problem Language Result Execution time Memory
6788 2014-07-07T10:47:55 Z Qwaz 개미 (GA4_ant) C++
100 / 100
56 ms 1088 KB
#include <cstdio>
#include <algorithm>

using namespace std;

long long a, b, c;

int main(){
	int numCase;
	scanf("%d", &numCase);

	int i;
	for(i = 0; i<numCase; i++){
		scanf("%lld%lld%lld", &a, &b, &c);

		printf("%lld\n", min((a+b)*(a+b)+c*c, min((a+c)*(a+c)+b*b, (b+c)*(b+c)+a*a)));
	}

	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 40 ms 1088 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 40 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 40 ms 1088 KB Output is correct
2 Correct 48 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
2 Correct 56 ms 1088 KB Output is correct
3 Correct 56 ms 1088 KB Output is correct
4 Correct 56 ms 1088 KB Output is correct
5 Correct 52 ms 1088 KB Output is correct