Language: C++

include<bits/stdc++.h>
#define rg register
#define file(x) freopen(x".in","r",stdin);freopen(x".out","w",stdout);
using namespace std;
int read(){
    int x=0,f=1;char c=getchar();
    while(c<'0'||c>'9') f=(c=='-')?-1:1,c=getchar();
    while(c>='0'&&c<='9') x=x*10+c-48,c=getchar();
    return f*x;
}
struct node{
	int x,y,id;
}a[2000001];
bool cmp(const node & a , const node & b ){
	if(a.x==b.x) return a.y<b.y;
	return a.x<b.x;
}
int n,m;
int vis[200001];
bool check(int x){
	for(int j=1;j<=1;j++){
		int now=a[j].x,flag=0;
		memset(vis,0,sizeof(vis));
		vis[a[j].id]=1;
		for(int i=j+1;i<=n;i++){
			if(vis[a[i].id]) continue;
			if(now+x<=a[i].x)
				now=a[i].x;
			else continue;
			vis[a[i].id]=1;
		}
		for(int i=1;i<=n/2;i++)
			if(!vis[i])
				flag=1;
		if(!flag) return 1;
	}
	return 0;
}

int A[1001][2],c[1001],d[1001],maxx;
void dfs(int x){
	if(x==n+1){
		for(int i=1;i<=n;i++)
			d[i]=A[i][c[i]];
		sort(d+1,d+1+n);
		int minx=2147483647;
		for(int i=2;i<=n;i++)
			minx=min(d[i]-d[i-1],minx);
		maxx=max(minx,maxx);
		return ;
	}
	for(int i=0;i<=1;i++)
		c[x]=i,dfs(x+1);
}

int main(){
    //file("");
	n=read();
	for(int i=1;i<=n;i++)
		A[i][0]=a[i].x=read(),A[i][1]=a[i].y=a[i+n].x=read(),a[i].id=i,a[i+n].id=i;
	if(n<=22) dfs(1),cout<<maxx,exit(0);
//	cout<<check(17);
//	exit(0);
	int l=0,r=100000000,ans;
	n*=2;
	sort(a+1,a+1+n,cmp);
	while(l<=r){
		int mid=(l+r)>>1;
		if(check(mid)) l=mid+1,ans=mid;
		else r=mid-1;
	}
	cout<<ans;
    return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int read()':
a.cc:6:24: error: 'getchar' was not declared in this scope
    6 |     int x=0,f=1;char c=getchar();
      |                        ^~~~~~~
a.cc:1:1: note: 'getchar' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | include<bits/stdc++.h>
a.cc: In function 'bool check(int)':
a.cc:23:17: error: 'memset' was not declared in this scope
   23 |                 memset(vis,0,sizeof(vis));
      |                 ^~~~~~
a.cc:1:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
  +++ |+#include <cstring>
    1 | include<bits/stdc++.h>
a.cc: In function 'void dfs(int)':
a.cc:45:17: error: 'sort' was not declared in this scope; did you mean 'short'?
   45 |                 sort(d+1,d+1+n);
      |                 ^~~~
      |                 short
a.cc:48:30: error: 'min' was not declared in this scope; did you mean 'minx'?
   48 |                         minx=min(d[i]-d[i-1],minx);
      |                              ^~~
      |                              minx
a.cc:49:22: error: 'max' was not declared in this scope; did you mean 'maxx'?
   49 |                 maxx=max(minx,maxx);
      |                      ^~~
      |                      maxx
a.cc: In function 'int main()':
a.cc:61:26: error: 'cout' was not declared in this scope
   61 |         if(n<=22) dfs(1),cout<<maxx,exit(0);
      |                          ^~~~
a.cc:61:37: error: 'exit' was not declared in this scope
   61 |         if(n<=22) dfs(1),cout<<maxx,exit(0);
      |                                     ^~~~
a.cc:1:1: note: 'exit' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
  +++ |+#include <cstdlib>
    1 | include<bits/stdc++.h>
a.cc:66:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   66 |         sort(a+1,a+1+n,cmp);
      |         ^~~~
      |         short
a.cc:72:9: error: 'cout' was not declared in this scope
   72 |         cout<<ans;
      |         ^~~~