Language: C++

#include<bits/stdc++.h>
#define ll long long
using namespace std;\
struct info{
	ll x;
	ll y;
};
bool check(info a,info b)
{
	return (a.x<b.x);
}
int main()
{
 ll n;
 cin >> n;
	info a[n+1];
	for(int i=0;i<n;i++)
	{
		cin >> a[i].x >> a[i].y;
	}
vector	<info> res;
res.resize(0);
	for(int i=0;i<n;i++)
		{
			res[i].x=10e8;
			res[i].y=10e8;
		}
	sort(a,a+n,check);
	res[0].x=a[1].x-a[0].x;
	res[0].y=a[1].y-a[0].y;
	ll d=0,v,m;
	for(int i=1;i<n-1;i++)
	{
			if((a[i+1].x-a[i].x)!=res[i-1].x &&(a[i+1].y-a[i].y)!=res[i-1].y)
			{
				v=a[i+1].x-a[i].x;
				res.push_back(v);
				m=a[i+1].y-a[i].y;
				res.push_back(m);
			}
	}
	for(int i=0;i<n-1;i++)
	{
		for(int j=0;j<n;j++)
		{
			if(res[i].x!=res[j].x &&res[i].y!=res[j].y  ) 
			{
			d++; break;
			}
		}
	}
//	sort(res,res+n,check);

		cout << res.size();
		return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:46: error: no matching function for call to 'std::vector<info>::push_back(long long int&)'
   37 |                                 res.push_back(v);
      |                                 ~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = info; _Alloc = std::allocator<info>; value_type = info]'
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:35: note:   no known conversion for argument 1 from 'long long int' to 'const std::vector<info>::value_type&' {aka 'const info&'}
 1283 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = info; _Alloc = std::allocator<info>; value_type = info]'
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:30: note:   no known conversion for argument 1 from 'long long int' to 'std::vector<info>::value_type&&' {aka 'info&&'}
 1300 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~
a.cc:39:46: error: no matching function for call to 'std::vector<info>::push_back(long long int&)'
   39 |                                 res.push_back(m);
      |                                 ~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = info; _Alloc = std::allocator<info>; value_type = info]'
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:35: note:   no known conversion for argument 1 from 'long long int' to 'const std::vector<info>::value_type&' {aka 'const info&'}
 1283 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = info; _Alloc = std::allocator<info>; value_type = info]'
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:30: note:   no known conversion for argument 1 from 'long long int' to 'std::vector<info>::value_type&&' {aka 'info&&'}
 1300 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~