Submission #1583

# Submission time Handle Problem Language Result Execution time Memory
1583 2013-07-09T13:24:07 Z tncks0121 개미 (GA4_ant) C++
100 / 100
74 ms 884 KB
#include<cstdio>

int main()
{
	int tc,tcn;
	long long a,b,c,t;
	scanf("%d",&tcn);
	for(tc=0;tc<tcn;tc++)
	{
		scanf("%lld%lld%lld",&a,&b,&c);
		if(a>b)
		{
			t=a;
			a=b;
			b=t;
		}
		if(b>c)
		{
			t=b;
			b=c;
			c=t;
		}
		if(a>b)
		{
			t=a;
			a=b;
			b=t;
		}
		printf("%lld\n",(a+b)*(a+b)+c*c);
	}
}
# Verdict Execution time Memory Grader output
1 Correct 43 ms 884 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 43 ms 884 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 48 ms 884 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 50 ms 884 KB Output is correct
2 Correct 54 ms 884 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 65 ms 884 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 58 ms 884 KB Output is correct
2 Correct 69 ms 884 KB Output is correct
3 Correct 73 ms 884 KB Output is correct
4 Correct 67 ms 884 KB Output is correct
5 Correct 74 ms 884 KB Output is correct