Language: C++

#include<iostream>
#include<queue>
#include<vector>
#include<utility>
#include<algorithm>

#define REP(i,n)  for(int i=0;i<n;i++)

int vec1[]={0,1,-1,1,-1,0};
int vec2[]={1,1,0,0,-1,-1};

int t,n;
int table[200][200];

typedef pair<int,int> pii;
typedef pair<int,pii> piii;
queue<piii> q1;

int ans;

int solve(int y,int x){
	queue<piii> p;
	q1.push(make_pair(0,pale_pair(y,x)));
	while(!p1.empty()){
		if(t <= q1.front().first)
			return 0;
		REP(i,6){
			int n_y = q1.front().second.first + vec1[i];
			int n_x = q1.front().second.second + vec2[i];
			if(table[n_y][n_x] = 0){
				ans++;
				table[n_y][n_x] = 1;
				q1.push(make_pair(q1.front().first + 1,ma;e_pair(n_y,n_x)));
			}
		}
		q1.pop();
	}
	return 0;
}


int main(){
	while(cin>>t>>n,t+n){
		ans = 0;
		fill_n(table[0],200*200,0)
		REP(i,n){
			int x,y;
			cin>>x>>y;
			table[100+y][100+x] = 1;
		}
		int x,y;
		cin>>x>>y;
		table[100+y][100+x] = 1;
		solve(100+y,100+x);
		cout<<ans+1<<endl;
	}
	return 0;
}

Compiler output:
a.cc:15:9: error: 'pair' does not name a type
   15 | typedef pair<int,int> pii;
      |         ^~~~
a.cc:16:9: error: 'pair' does not name a type
   16 | typedef pair<int,pii> piii;
      |         ^~~~
a.cc:17:1: error: 'queue' does not name a type
   17 | queue<piii> q1;
      | ^~~~~
a.cc: In function 'int solve(int, int)':
a.cc:22:9: error: 'queue' was not declared in this scope; did you mean 'std::queue'?
   22 |         queue<piii> p;
      |         ^~~~~
      |         std::queue
In file included from /usr/include/c++/14/queue:66,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_queue.h:96:11: note: 'std::queue' declared here
   96 |     class queue
      |           ^~~~~
a.cc:22:15: error: 'piii' was not declared in this scope
   22 |         queue<piii> p;
      |               ^~~~
a.cc:22:21: error: 'p' was not declared in this scope
   22 |         queue<piii> p;
      |                     ^
a.cc:23:9: error: 'q1' was not declared in this scope
   23 |         q1.push(make_pair(0,pale_pair(y,x)));
      |         ^~
a.cc:23:29: error: 'pale_pair' was not declared in this scope
   23 |         q1.push(make_pair(0,pale_pair(y,x)));
      |                             ^~~~~~~~~
a.cc:23:17: error: 'make_pair' was not declared in this scope; did you mean 'std::make_pair'?
   23 |         q1.push(make_pair(0,pale_pair(y,x)));
      |                 ^~~~~~~~~
      |                 std::make_pair
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
                 from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_pair.h:1132:5: note: 'std::make_pair' declared here
 1132 |     make_pair(_T1&& __x, _T2&& __y)
      |     ^~~~~~~~~
a.cc:24:16: error: 'p1' was not declared in this scope
   24 |         while(!p1.empty()){
      |                ^~
a.cc:33:72: error: 'ma' was not declared in this scope
   33 |                                 q1.push(make_pair(q1.front().first + 1,ma;e_pair(n_y,n_x)));
      |                                                                        ^~
a.cc:33:75: error: 'e_pair' was not declared in this scope
   33 |                                 q1.push(make_pair(q1.front().first + 1,ma;e_pair(n_y,n_x)));
      |                                                                           ^~~~~~
a.cc: In function 'int main()':
a.cc:43:15: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   43 |         while(cin>>t>>n,t+n){
      |               ^~~
      |               std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:45:17: error: 'fill_n' was not declared in this scope; did you mean 'std::fill_n'?
   45 |                 fill_n(table[0],200*200,0)
      |                 ^~~~~~
      |                 std::fill_n
In file included from /usr/include/c++/14/algorithm:86,
                 from a.cc:5:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:195:1: note: 'std::fill_n' declared here
  195 | fill_n(_ExecutionPolicy&& __exec, _ForwardIterator __first, _Size __count, const _Tp& __value);
      | ^~~~~~
a.cc:46:21: error: 'i' was not declared in this scope
   46 |                 REP(i,n){
      |                     ^
a.cc:7:31: note: in definition of macro 'REP'
    7 | #define REP(i,n)  for(int i=0;i<n;i++)
      |                               ^
a.cc:55:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   55 |                 cout<<ans+1<<endl;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:55:30: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   55 |                 cout<<ans+1<<endl;
      |                              ^~~~
      |                              std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~