Language: C++

//E? Nanndatte?
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
#include <map>
#include <set>
using namespace std;
typedef pair<int,int> P;
typedef pair<int,P> P1;
typedef pair<P,P> P2;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 2000000000
int n;
P p[100005];
int x[100005];
int main()
{
	int n;
	scanf("%d",&n);
	for(int i=0;i<n;i++)
	{
		int a,b;
		scanf("%d %d",&a,&b);
		p[i].first=a+b;
		x[i]=a+b;
		p[i].second=a-b;
	}

	sort(p,p+n);
	sort(x,x+n);

	int lb=-1;
	int ub=3e6;
	while(ub-lb>1)
	{
		int mid=(lb+ub)>>1;
		int le=lower_bound(x,x+n,x[n-1]-mid)-x;
		int ri=upper_bound(x,x+n,x[0]+mid)-x;
		ri--;
		int y[2][2];
		for(int i=0;i<2;i++)y[i][0]=-INF;
		for(int i=0;i<2;i++)y[i][1]=INF;
		if(ri<le) goto fail;
		if(!le) goto succeed;
		for(int i=0;i<ri;i++)
		{
			y[0][0]=max(y[0][0],p[i].second);
			y[0][1]=min(y[0][1],p[i].second);
		}
		for(int i=le+1;i<n;i++)
		{
			y[1][0]=max(y[1][0],p[i].second);
			y[1][1]=min(y[1][1],p[i].second);
		}
		if(y[0][0]-y[0][1]>mid || y[1][0]-y[1][1]>mid) goto fail;
		int a=y[0][0];
		int b=y[0][1];
		int c=y[1][0];
		int d=y[1][1];
		vector<int>vec;
		for(int i=ri;i<=le;i++)
		{
			vec.pb(p[i].second);
		}
		sort(vec.begin(),vec.end());
		for(int i=-1;i<vec.size();i++)
		{
			int aa=a,bb=b,cc=c,dd=d;
			if(i==-1)
			{
				aa=max(aa,vec[vec.size()-1]);
				bb=min(bb,vec[0]);
				if(aa-bb<=mid) goto succeed;
			}
			else
			{
				aa=max(aa,vec[vec.size()-1]);
				bb=min(bb,vec[i+1]);
				cc=max(cc,vec[i]);
				dd=min(dd,vec[0]);
				if(aa-bb<=mid && cc-dd<=mid) goto succeed;
			}
		}
		for(int i=-1;i<vec.size();i++)
		{
			int aa=a,bb=b,cc=c,dd=d;
			if(i==-1)
			{
				cc=max(cc,vec[vec.size()-1]);
				dd=min(dd,vec[0]);
				if(cc-dd<=mid) goto succeed;
			}
			else
			{
				cc=max(cc,vec[vec.size()-1]);
				dd=min(dd,vec[i+1]);
				aa=max(aa,vec[i]);
				bb=min(bb,vec[0]);
				if(aa-bb<=mid && cc-dd<=mid) goto succeed;
			}
		}
fail:;
		lb=mid;
		continue;
succeed:;
		ub=mid;
	}
	printf("%d\n",ub);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:113:1: error: jump to label 'fail'
  113 | fail:;
      | ^~~~
a.cc:66:69: note:   from here
   66 |                 if(y[0][0]-y[0][1]>mid || y[1][0]-y[1][1]>mid) goto fail;
      |                                                                     ^~~~
a.cc:71:28: note:   crosses initialization of 'std::vector<int> vec'
   71 |                 vector<int>vec;
      |                            ^~~
a.cc:70:21: note:   crosses initialization of 'int d'
   70 |                 int d=y[1][1];
      |                     ^
a.cc:69:21: note:   crosses initialization of 'int c'
   69 |                 int c=y[1][0];
      |                     ^
a.cc:68:21: note:   crosses initialization of 'int b'
   68 |                 int b=y[0][1];
      |                     ^
a.cc:67:21: note:   crosses initialization of 'int a'
   67 |                 int a=y[0][0];
      |                     ^
a.cc:113:1: error: jump to label 'fail'
  113 | fail:;
      | ^~~~
a.cc:54:32: note:   from here
   54 |                 if(ri<le) goto fail;
      |                                ^~~~
a.cc:71:28: note:   crosses initialization of 'std::vector<int> vec'
   71 |                 vector<int>vec;
      |                            ^~~
a.cc:70:21: note:   crosses initialization of 'int d'
   70 |                 int d=y[1][1];
      |                     ^
a.cc:69:21: note:   crosses initialization of 'int c'
   69 |                 int c=y[1][0];
      |                     ^
a.cc:68:21: note:   crosses initialization of 'int b'
   68 |                 int b=y[0][1];
      |                     ^
a.cc:67:21: note:   crosses initialization of 'int a'
   67 |                 int a=y[0][0];
      |                     ^
a.cc:116:1: error: jump to label 'succeed'
  116 | succeed:;
      | ^~~~~~~
a.cc:55:30: note:   from here
   55 |                 if(!le) goto succeed;
      |                              ^~~~~~~
a.cc:71:28: note:   crosses initialization of 'std::vector<int> vec'
   71 |                 vector<int>vec;
      |                            ^~~
a.cc:70:21: note:   crosses initialization of 'int d'
   70 |                 int d=y[1][1];
      |                     ^
a.cc:69:21: note:   crosses initialization of 'int c'
   69 |                 int c=y[1][0];
      |                     ^
a.cc:68:21: note:   crosses initialization of 'int b'
   68 |                 int b=y[0][1];
      |                     ^
a.cc:67:21: note:   crosses initialization of 'int a'
   67 |                 int a=y[0][0];
      |                     ^