Language: C++

#include <iostream>
#include <queue>
#include <vector>
#include <algorithm>
#include <functional>
#include <utility>
#include <set>
using namespace std;
typedef pair<int,int> pii;
typedef pair<pii,int> piii;
int dx[]={0,1,1,0,-1,-1};
int dy[]={1,1,0,-1,-1,0};
int main()
{
	int t,n;
	while(cin>>t>>n,t!=0){
		vector<pii> jama(n);
		int sx,sy;
		for(int i=0;i<n;i++){
			int x,y;
			cin>>x>>y;
			jama.push_back(pii(x,y));
		}
		cin>>sx>>sy;
		set<pii> visited;
		queue<piii> q;
		q.push(piii(pii(sx,sy),0));
		while(q.front().second<=n){
			piii fr=q.front();
			q.pop();
			if(visited.find(fr.first)!=visited.end())continue;
			for(int i=0;i<6;i++){
				if(visited.find(fr.first.first+dx[i],fr.first.second+dy[i])==visited.end()&&jama.find(fr.first.first+dx[i],fr.first.second+dy[i])==jama.end())q.push(piii(pii(fr.first.first+dx[i],fr.first.second+dy[i]),fr.second+1));
			}
		}
	}
	
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:48: error: no matching function for call to 'std::set<std::pair<int, int> >::find(int, int)'
   33 |                                 if(visited.find(fr.first.first+dx[i],fr.first.second+dy[i])==visited.end()&&jama.find(fr.first.first+dx[i],fr.first.second+dy[i])==jama.end())q.push(piii(pii(fr.first.first+dx[i],fr.first.second+dy[i]),fr.second+1));
      |                                    ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/set:63,
                 from a.cc:7:
/usr/include/c++/14/bits/stl_set.h:806:9: note: candidate: 'template<class _Kt> decltype (std::set<_Key, _Compare, _Alloc>::iterator{((std::set<_Key, _Compare, _Alloc>*)this)->std::set<_Key, _Compare, _Alloc>::_M_t._M_find_tr(__x)}) std::set<_Key, _Compare, _Alloc>::find(const _Kt&) [with _Key = std::pair<int, int>; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >]'
  806 |         find(const _Kt& __x)
      |         ^~~~
/usr/include/c++/14/bits/stl_set.h:806:9: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_set.h:812:9: note: candidate: 'template<class _Kt> decltype (std::set<_Key, _Compare, _Alloc>::const_iterator{((const std::set<_Key, _Compare, _Alloc>*)this)->std::set<_Key, _Compare, _Alloc>::_M_t._M_find_tr(__x)}) std::set<_Key, _Compare, _Alloc>::find(const _Kt&) const [with _Key = std::pair<int, int>; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >]'
  812 |         find(const _Kt& __x) const
      |         ^~~~
/usr/include/c++/14/bits/stl_set.h:812:9: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_set.h:796:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::find(const key_type&) [with _Key = std::pair<int, int>; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >; iterator = std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int> >, std::less<std::pair<int, int> >, std::allocator<std::pair<int, int> > >::const_iterator; key_type = std::pair<int, int>]'
  796 |       find(const key_type& __x)
      |       ^~~~
/usr/include/c++/14/bits/stl_set.h:796:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_set.h:800:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::const_iterator std::set<_Key, _Compare, _Alloc>::find(const key_type&) const [with _Key = std::pair<int, int>; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<int, int> >; const_iterator = std::_Rb_tree<std::pair<int, int>, std::pair<int, int>, std::_Identity<std::pair<int, int> >, std::less<std::pair<int, int> >, std::allocator<std::pair<int, int> > >::const_iterator; key_type = std::pair<int, int>]'
  800 |       find(const key_type& __x) const
      |       ^~~~
/usr/include/c++/14/bits/stl_set.h:800:7: note:   candidate expects 1 argument, 2 provided
a.cc:33:114: error: 'class std::vector<std::pair<int, int> >' has no member named 'find'
   33 |                                 if(visited.find(fr.first.first+dx[i],fr.first.second+dy[i])==visited.end()&&jama.find(fr.first.first+dx[i],fr.first.second+dy[i])==jama.end())q.push(piii(pii(fr.first.first+dx[i],fr.first.second+dy[i]),fr.second+1));
      |                                                                                                                  ^~~~