Language: C++

#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <locale>
#include <iostream>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define ALL(x) (x).begin(),(x).end()

using namespace std;

using ll = long long;
using ld = long double;

template <typename T> T &chmin(T &a, const T &b) { return a = min(a, b); }
template <typename T> T &chmax(T &a, const T &b) { return a = max(a, b); }
template <typename T> int len(const T &x) { return x.size(); }

template<typename T>
vector<T> table(int n, T v) { return vector<T>(n, v); }

template <class... Args>
auto table(int n, Args... args) {
  auto val = table(args...);
  return vector<decltype(val)>(n, move(val));
}

struct yes_no : numpunct<char> {
  string_type do_truename()  const { return "YES"; }
  string_type do_falsename() const { return "NO"; }
};

const ld pi = acos(-1.0);

using Data = int;
const Data INF = 1000000000;

vector<Data> lis(const vector<Data>& a) {
  const int n = a.size();
  if (n == 0) return vector<Data>(0);
  vector<Data> A(n, INF);
  vector<int> id(n);
  for (int i = 0; i < n; i++) {
    id[i] = distance(A.begin(), lower_bound(A.begin(), A.end(), a[i]));
    A[id[i]] = a[i];
  }
  int m = *max_element(id.begin(), id.end());
  vector<Data> res(m + 1);
  for (int i = n - 1; i >= 0; i--)
    if (id[i] == m) res[m--] = a[i];
  return res;
}

void solve(vector<ll> x, vector<ll> y, ll N, vector<ll> X, vector<ll> Y) {
  int l = min(x[0], x[1]);
  int r = max(x[0], x[1]);
  int t = min(y[0], y[1]);
  int b = max(y[0], y[1]);
  vector<pair<int,int>> point;
  REP(i,N) {
    if (l <= X[i] && X[i] <= r && t <= Y[i] && Y[i] <= b) {
      point.emplace_back(abs(X[i] - x[0]), abs(Y[i] - y[0]));
    }
  }
  sort(ALL(point));
  vector<int> ys;
  for (auto p: point) ys.push_back(p.second);
  auto v = lis(ys);
  ld res = ((r - l) + (b - t)) * 100.00;
  if (v.empty()) { cout << res << endl; }
  else{
    int n = v.back();
    chmin(n, r - l);
    chmin(n, b - t);
    res += (5 * pi - 20) * n;
    if (r - l < int(v.size()) || b - t < int(v.size())) {
      res += 10 * pi - 20;
    }
    cout << res << endl;
}

int main() {
  locale loc(locale(), new yes_no);
  cout << boolalpha << setprecision(15) << fixed;
  cout.imbue(loc);
	vector<ll> x(2-1+1);
	ll N;
	vector<ll> y(2-1+1);
	for (int i = 0 ; i <= 2-1 ; i++) {
	  scanf("%lld", &x[i]);
	  scanf("%lld", &y[i]);
	}
	scanf("%lld", &N);
	vector<ll> Y(N-1+1);
	vector<ll> X(N-1+1);
	for (int i = 0 ; i <= N-1 ; i++) {
	  scanf("%lld", &X[i]);
	  scanf("%lld", &Y[i]);
	}
	solve(x, y, N, X, Y);
	return 0;
}


Compiler output:
a.cc: In function 'void solve(std::vector<long long int>, std::vector<long long int>, ll, std::vector<long long int>, std::vector<long long int>)':
a.cc:104:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
  104 | int main() {
      |         ^~
a.cc:104:9: note: remove parentheses to default-initialize a variable
  104 | int main() {
      |         ^~
      |         --
a.cc:104:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:104:12: error: a function-definition is not allowed here before '{' token
  104 | int main() {
      |            ^
a.cc:124:2: error: expected '}' at end of input
  124 | }
      |  ^
a.cc:76:74: note: to match this '{'
   76 | void solve(vector<ll> x, vector<ll> y, ll N, vector<ll> X, vector<ll> Y) {
      |                                                                          ^