Language: C++

#include <bits/stdc++.h>

#define _overload(_1,_2,_3,name,...) name
#define _rep(i,n) _range(i,0,n)
#define _range(i,a,b) for(int i=int(a);i<int(b);++i)
#define rep(...) _overload(__VA_ARGS__,_range,_rep,)(__VA_ARGS__)

#define _rrep(i,n) _rrange(i,n,0)
#define _rrange(i,a,b) for(int i=int(a)-1;i>=int(b);--i)
#define rrep(...) _overload(__VA_ARGS__,_rrange,_rrep,)(__VA_ARGS__)

#define _all(arg) begin(arg),end(arg)
#define uniq(arg) sort(_all(arg)),(arg).erase(unique(_all(arg)),end(arg))
#define getidx(ary,key) lower_bound(_all(ary),key)-begin(ary)
#define clr(a,b) memset((a),(b),sizeof(a))
#define bit(n) (1LL<<(n))
#define popcount(n) (__builtin_popcountll(n))

using namespace std;

template<class T>bool chmax(T &a, const T &b) { return (a<b)?(a=b,1):0;}
template<class T>bool chmin(T &a, const T &b) { return (b<a)?(a=b,1):0;}

using ll=long long;
using R=long double;
const R EPS=1e-9L; // [-1000,1000]->EPS=1e-8 [-10000,10000]->EPS=1e-7
inline int sgn(const R& r){return(r > EPS)-(r < -EPS);}
inline R sq(R x){return sqrt(max(x,0.0L));}

const int dx[8]={1,0,-1,0,1,-1,-1,1};
const int dy[8]={0,1,0,-1,1,1,-1,-1};

// Problem Specific Parameter:

// convex_hull Verify AOJ CGL_4_A
VP convex_hull(VP pol){
	int n=pol.size(),k=0;
	auto cmp_x=[](P a,P b)->bool{return sgn(real(a)-real(b))?sgn(real(a)-real(b))<0:sgn(imag(a)-imag(b)<0);};
	sort(begin(pol),end(pol),cmp_x);
	VP res(2*n);

	// down
	rep(i,n){
		while(k>1&&sdet(O,res[k-1]-res[k-2],pol[i]-res[k-1])>=1) k--;
		res[k++]=pol[i];
	}
	
	// up
	int t=k;
	rrep(i,n-1){
		while(k>t&&sdet(O,res[k-1]-res[k-2],pol[i]-res[k-1])>=1) k--;
		res[k++]=pol[i];
	}
	res.resize(k-1);
	return res;
}

// farthest point pair Verify AOJ CGL_4_B
R fpp(VP pol){
	if(!is_convex(pol)) pol=convex_hull(pol);
	int n=pol.size(),i=0,j=0;
	if(n<=2) return abs(pol[0]-pol[1]);
	R res=0.0;
	auto cmp_x=[](P a,P b)->bool{return sgn(real(a)-real(b))?sgn(real(a)-real(b))<0:sgn(imag(a)-imag(b)<0);};
	
	rep(k,n){
		if(!cmp_x(pol[i],pol[k]))i=k;
		if(cmp_x(pol[j],pol[k]))j=k;
	}

	int si=i,sj=j;
	while(i!=sj||j!=si){
		chmax(res,abs(pol[i]-pol[j]));
		if(sdet(O,pol[(i+1)%n]-pol[i],pol[(j+1)%n]-pol[j]))<0)
			i=(i+1)%n;
		else 
			j=(j+1)%n;
	}
	return res;
}

int main(void){
	int n;
	cin >> n;
	VP pol;
	rep(i,n){
		P p;
		cin >> p;
		pol.push_back(p);
	}
	cout.precision(10);
	cout << fixed << fpp(pol) << endl;
	return 0;
}

Compiler output:
a.cc:36:1: error: 'VP' does not name a type
   36 | VP convex_hull(VP pol){
      | ^~
a.cc:59:7: error: 'VP' was not declared in this scope
   59 | R fpp(VP pol){
      |       ^~
a.cc: In function 'int main()':
a.cc:85:9: error: 'VP' was not declared in this scope
   85 |         VP pol;
      |         ^~
a.cc:87:17: error: 'P' was not declared in this scope
   87 |                 P p;
      |                 ^
a.cc:88:24: error: 'p' was not declared in this scope
   88 |                 cin >> p;
      |                        ^
a.cc:89:17: error: 'pol' was not declared in this scope; did you mean 'powl'?
   89 |                 pol.push_back(p);
      |                 ^~~
      |                 powl
a.cc:92:30: error: 'pol' was not declared in this scope; did you mean 'powl'?
   92 |         cout << fixed << fpp(pol) << endl;
      |                              ^~~
      |                              powl
a.cc:92:33: error: 'fpp' cannot be used as a function
   92 |         cout << fixed << fpp(pol) << endl;
      |                                 ^