Language: C++

#include <cmath>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
#define pi 3.3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870
struct pig
{
    int x,y;
}info[200100];
int cnt,n,a[200100],c[200100],xo,xt,yo,yt,len;
long long ans;
bool cmp1(pig a,pig b)
{
    return a.y < b.y;
}
bool cmp(pig a,pig b)
{
    if(a.x == b.x)return a.y > b.y;
    return yo < yt ? a.x < b.x : a.x > b.x;
}
int find(int L,int R,int x)
{
    if(L == R) return L;
    int mid = (L + R) >> 1;
    if(c[mid] < x) return find(mid + 1,len,x);
    else return find(L,mid,x);
}
int main()
{
    scanf("%d%d%d%d",&xo,&yo,&xt,&yt);if(xt < xo)swap(xo,xt),swap(yo,yt);
    scanf("%d",&n);
    for(int i = 1;i <= n;i++)scanf("%d%d",&info[i].x,&info[i].y);
    sort(info + 1,info + 1 + n,cmp);
    len=0;  c[0]=-0x7fffffff;
    for(int i = 1;i <= n;i++)
    {
        if(info[i].x > max(xt,xo) || info[i].y > max(yt,yo) || info[i].y < min(yo,yt) || info[i].x < min(xo,xt))continue;
        int tmp;
        if(info[i].y>c[len]) tmp = ++len;
        else tmp = find(1,len,info[i].y);
        c[tmp]=info[i].y;
    }
    ans = (long long)(abs(xt - xo) + abs(yt - yo)) * 100 - (long long)len * 20;
    if(xo == xt || yo == yt)printf("%.15Lf\n",(long double)ans + (long double)pi * len * 10);
    else printf("%.15Lf\n",(long double)ans + (long double)pi * len * 5);
}

Compiler output:
a.cc:6:12: error: too many decimal points in number
    6 | #define pi 3.3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:45:79: note: in expansion of macro 'pi'
   45 |     if(xo == xt || yo == yt)printf("%.15Lf\n",(long double)ans + (long double)pi * len * 10);
      |                                                                               ^~
a.cc:6:12: error: too many decimal points in number
    6 | #define pi 3.3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:46:60: note: in expansion of macro 'pi'
   46 |     else printf("%.15Lf\n",(long double)ans + (long double)pi * len * 5);
      |                                                            ^~