Submission #1916

# Submission time Handle Problem Language Result Execution time Memory
1916 2013-07-19T10:35:22 Z gs13105 개미 (GA4_ant) C++
100 / 100
60 ms 884 KB
#include <stdio.h>

int main()
{
	int T,i;
	long long a,b,c;
	scanf("%d",&T);
	for(i=0;i<T;i++)
	{
		scanf("%lld%lld%lld",&a,&b,&c);
		if(a>=b&&a>=c)
			printf("%lld\n",a*a+(b+c)*(b+c));
		else
		{
			if(b>=c)
				printf("%lld\n",b*b+(a+c)*(a+c));
			else
				printf("%lld\n",c*c+(a+b)*(a+b));
		}
	}
	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 43 ms 884 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 46 ms 884 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 46 ms 884 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 49 ms 884 KB Output is correct
2 Correct 51 ms 884 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 52 ms 884 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 60 ms 884 KB Output is correct
2 Correct 56 ms 884 KB Output is correct
3 Correct 55 ms 884 KB Output is correct
4 Correct 57 ms 884 KB Output is correct
5 Correct 58 ms 884 KB Output is correct