Language: C++

#include <stdio.h>
#include <iostream>
#include <algorithm>
using namespace std;

typedef struct
{
  long long int w[100];
}big;

big tasu(big a,big b)
{
  long long int w;
  big q;
  long long int mae = 0;
  for(int i = 0; i < 100; i++)
    {
      w = a.w[i] + b.w[i] + mae;
      mae = w / 1000000;
      w = w % 1000000;
      q.w[i] = w;
    }
  return q;
}

big syoki(long long int a)
{
  big q;
  for(int i = 0; i < 100; i++)
    {
      q.w[i] = 0;
    }
  q.w[0] = a;
  return q;
}

void hyozi(big a)
{
  char flg = 0;
  for(int i = 100 - 1; i >= 0; i--)
    {
      if(flg != 0)
	{
	  printf("%06lld",a.w[i]);
	}
      else if(a.w[i] != 0)
	{
	  printf("%lld",a.w[i]);
	  flg = 1;
	}
    }
  printf("\n");
}

long long int wkyori(WWW a,WWW b)
{
  return abs(a.x - b.x) + abs(a.y - b.y);
}

typedef struct
{
  long long int x;
  long long int y;
}WWW;

WWW ww[100000];
long long int x[100000];
long long int y[100000];

int main()
{
  long long int w,h;
  int n;
  scanf("%lld %lld",&w,&h);
  scanf("%d",&n);
  long long int xw,yw;
  for(int i = 0; i < n; i++)
    {
      scanf("%lld %lld",&xw,&yw);
      x[i] = xw;
      y[i] = yw;
      ww[i].x = xw;
      ww[i].y = yw;
    }
  sort(x,x + n);
  sort(y,y + n);
  WWW ori;
  int sai;
  if(n % 2 == 1)
    {
      ori.x = x[(n + 1) / 2];
      ori.y = y[(n + 1) / 2];
      int longer = 0;
      for(int i = 0; i < n; i++)
	{
	  if(longer < wkyori(ori,ww[i]))
	    {
	      longer = wkyori(ori,ww[i]);
	      sai = i;
	    }
	}
    }
  else
    {
      WWW s;
      int longer = 0;
      for(int i = 0; i < n; i++)
	{
	  if(ww[i].x > x[n / 2])
	    {
	      s.x = x[n / 2];
	    }
	  else
	    {
	      s.x = x[n / 2 + 1];
	    }
	  if(ww[i].y > y[n / 2])
	    {
	      s.y = y[n / 2];
	    }
	  else
	    {
	      s.y = y[n / 2 + 1];
	    }
	  if(longer < wkyori(s,ww[i]))
	    {
	      longer = wkyori(s,ww[i]);
	      sai = i;
	    }
	  else if(longer == wkyori(s,ww[i]))
	    {
	      if(ww[i].x < ww[sai].x || (ww[i].x == ww[sai].x && ww[i].y < ww[sai].y)
		{
		  sai = i;
		}
	    }
	}
      if(ww[sai].x > x[n / 2])
	{
	  ori.x = x[n / 2];
	}
      else
	{
	  ori.x = x[n / 2 + 1];
	}
      if(ww[sai].y > y[n / 2])
	{
	  ori.y = y[n / 2];
	}
      else
	{
	  ori.y = y[n / 2 + 1];
	}
    }
  big last = syoki(0);
  for(int i = 0; i < n; i++)
    {
      if(i != sai)
	{
	  last = tasu(last,wkyori(ori,ww[i]) * 2);
	}
      else
	{
	  last = tasu(last,wkyori(ori,ww[i]));
	}
    }
  hyozi(last);
  printf("%lld %lld\n",ori.x,ori.y);
  return 0;
}

Compiler output:
a.cc:55:22: error: 'WWW' was not declared in this scope
   55 | long long int wkyori(WWW a,WWW b)
      |                      ^~~
a.cc:55:28: error: 'WWW' was not declared in this scope
   55 | long long int wkyori(WWW a,WWW b)
      |                            ^~~
a.cc:55:33: error: expression list treated as compound expression in initializer [-fpermissive]
   55 | long long int wkyori(WWW a,WWW b)
      |                                 ^
a.cc: In function 'int main()':
a.cc:96:29: error: 'wkyori' cannot be used as a function
   96 |           if(longer < wkyori(ori,ww[i]))
      |                       ~~~~~~^~~~~~~~~~~
a.cc:98:30: error: 'wkyori' cannot be used as a function
   98 |               longer = wkyori(ori,ww[i]);
      |                        ~~~~~~^~~~~~~~~~~
a.cc:125:29: error: 'wkyori' cannot be used as a function
  125 |           if(longer < wkyori(s,ww[i]))
      |                       ~~~~~~^~~~~~~~~
a.cc:127:30: error: 'wkyori' cannot be used as a function
  127 |               longer = wkyori(s,ww[i]);
      |                        ~~~~~~^~~~~~~~~
a.cc:130:35: error: 'wkyori' cannot be used as a function
  130 |           else if(longer == wkyori(s,ww[i]))
      |                             ~~~~~~^~~~~~~~~
a.cc:132:86: error: expected ')' before '{' token
  132 |               if(ww[i].x < ww[sai].x || (ww[i].x == ww[sai].x && ww[i].y < ww[sai].y)
      |                 ~                                                                    ^
      |                                                                                      )
  133 |                 {
      |                 ~                                                                     
a.cc:136:13: error: expected primary-expression before '}' token
  136 |             }
      |             ^
a.cc:160:34: error: 'wkyori' cannot be used as a function
  160 |           last = tasu(last,wkyori(ori,ww[i]) * 2);
      |                            ~~~~~~^~~~~~~~~~~
a.cc:164:34: error: 'wkyori' cannot be used as a function
  164 |           last = tasu(last,wkyori(ori,ww[i]));
      |                            ~~~~~~^~~~~~~~~~~