Submission #19724490


Source Code Expand

Copy
#include <cstdio>
#include <algorithm>
using namespace std;
int Abs(int x){return x>0?x:-x;}
int main() {
	int T;
	scanf("%d",&T);
	while(T--)
	{
		int ax,ay,bx,by,cx,cy,X,Y,sx=-1,sy=-1,ans=-1;
		scanf("%d %d %d %d %d %d",&ax,&ay,&bx,&by,&cx,&cy);
		X=min(ax,min(bx,cx));Y=min(ay,min(by,cy));
		sx+=Abs(X-ax)+Abs(X-bx)+Abs(X-cx);
		sy+=Abs(Y-ay)+Abs(Y-by)+Abs(Y-cy);
		ans=max(ans,max(Abs(X*2+sx),Abs(Y*2+sy)));
		if(X==Y&&Abs(X*2+sx)>=2) ans++;
		printf("%d\n",ans);
	}
	return 0;
}

Submission Info

Submission Time
Task D - L
User SenseAnone
Language C++ (Clang 10.0.0)
Score 0
Code Size 502 Byte
Status WA
Exec Time 11 ms
Memory 3224 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 600
Status
AC × 2
AC × 7
WA × 8
Set Name Test Cases
Sample sample.txt, sample_2.txt
All edge.txt, edge_2.txt, edge_3.txt, edge_4.txt, edge_5.txt, edge_6.txt, edge_7.txt, edge_8.txt, random.txt, random_2.txt, random_3.txt, random_4.txt, random_5.txt, sample.txt, sample_2.txt
Case Name Status Exec Time Memory
edge.txt WA 11 ms 3016 KB
edge_2.txt WA 4 ms 3048 KB
edge_3.txt WA 5 ms 3004 KB
edge_4.txt WA 3 ms 3220 KB
edge_5.txt WA 4 ms 3016 KB
edge_6.txt WA 4 ms 3048 KB
edge_7.txt WA 4 ms 3224 KB
edge_8.txt WA 3 ms 3220 KB
random.txt AC 3 ms 3188 KB
random_2.txt AC 3 ms 3220 KB
random_3.txt AC 3 ms 3048 KB
random_4.txt AC 4 ms 3008 KB
random_5.txt AC 4 ms 3104 KB
sample.txt AC 2 ms 3008 KB
sample_2.txt AC 2 ms 3016 KB