Language: C++

#include<bits/stdc++.h>
#define maxn 200005
using namespace std;
typedef long long LL;
int read()
{
    char c=getchar();int f=1,sum=0;
    while(c<'0' || c>'9'){if(c=='-')f=-1;c=getchar();}
    while(c>='0' && c<='9'){sum=sum*10+c-'0';c=getchar();}
    return sum*f;
}
const double pi=acos(-1.0);
int n,x1,x2,y1,y2,fx,fy,s[maxn],top;
struct point{
	int x,y;
}p[maxn];
bool cmp(point a,point b){return a.x==b.x?a.y<b.y:a.x<b.x;}
double ans;
int main()
{
	x1=read();y1=read();x2=read();y2=read();
	fx=x1>x2?-1:1;fy=y1>y2?-1:1;x1*=fx;x2*=fx;y1*=fy;y2*=fy;
	n=read();
	for(int i=1;i<=n;i++)
	{
		p[i].x=read()*fx,p[i].y=read()*fy;
		if(p[i].x<x1 || p[i].x>x2 || p[i].y<y1 || p[i].y>y2) n--,i--;
	}
	x1=x2-x1;y1=y2-y1;
	sort(p+1,p+1+n,cmp);
	for(int i=1;i<=n;i++)
	if(top==0 || s[top]<p[i].y)s[++top]=p[i].y;
	else s[(lower_bound(s+1,s+1+top,p[i].y)-s)]=p[i].y;
	double ans=x1*100.0+y1*100.0;
	ans=ans+(double)top*(pi*5.0-20.0);
	if(top==min(x1+1,y1+1)) ans+=pi*5;
	printf("%.11lf\n",ans);
	return 0;
}

Compiler output:
a.cc:13:13: error: 'int y1' redeclared as different kind of entity
   13 | int n,x1,x2,y1,y2,fx,fy,s[maxn],top;
      |             ^~
In file included from /usr/include/features.h:523,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:683,
                 from /usr/include/c++/14/cassert:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:33,
                 from a.cc:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:257:1: note: previous declaration 'double y1(double)'
  257 | __MATHCALL (y1,, (_Mdouble_));
      | ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:21:21: error: assignment of function 'double y1(double)'
   21 |         x1=read();y1=read();x2=read();y2=read();
      |                   ~~^~~~~~~
a.cc:22:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   22 |         fx=x1>x2?-1:1;fy=y1>y2?-1:1;x1*=fx;x2*=fx;y1*=fy;y2*=fy;
      |                          ~~^~~
a.cc:22:53: error: invalid operands of types 'double(double) noexcept' and 'int' to binary 'operator*'
   22 |         fx=x1>x2?-1:1;fy=y1>y2?-1:1;x1*=fx;x2*=fx;y1*=fy;y2*=fy;
      |                                                   ~~^~~~
a.cc:22:53: note:   in evaluation of 'operator*=(double(double) noexcept, int)'
a.cc:27:52: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   27 |                 if(p[i].x<x1 || p[i].x>x2 || p[i].y<y1 || p[i].y>y2) n--,i--;
      |                                              ~~~~~~^~~
a.cc:29:23: error: invalid operands of types 'int' and 'double(double) noexcept' to binary 'operator-'
   29 |         x1=x2-x1;y1=y2-y1;
      |                     ~~^~~
      |                     |  |
      |                     |  double(double) noexcept
      |                     int
a.cc:34:31: error: invalid operands of types 'double(double) noexcept' and 'double' to binary 'operator*'
   34 |         double ans=x1*100.0+y1*100.0;
      |                             ~~^~~~~~
      |                             |  |
      |                             |  double
      |                             double(double) noexcept
a.cc:36:28: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   36 |         if(top==min(x1+1,y1+1)) ans+=pi*5;
      |                          ~~^~
a.cc:36:20: error: no matching function for call to 'min(int, double (*)(double) noexcept)'
   36 |         if(top==min(x1+1,y1+1)) ans+=pi*5;
      |                 ~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:36:20: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'double (*)(double) noexcept')
   36 |         if(top==min(x1+1,y1+1)) ans+=pi*5;
      |                 ~~~^~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:36:20: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   36 |         if(top==min(x1+1,y1+1)) ans+=pi*5;
      |                 ~~~^~~~~~~~~~~