Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<utility>
#include<algorithm>
#include<map>
#include<cstdlib>
#include<cmath>
#include<numeric>
#include<iomanip>
#include<functional>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;
using ll =long long;
const int mod = 1000000007;
class mint {
	long long x;
public:
	mint(long long x = 0) : x((x% mod + mod) % mod) {}
	mint operator-() const {
		return mint(-x);
	}
	mint& operator+=(const mint & a) {
		if ((x += a.x) >= mod) x -= mod;
		return *this;
	}
	mint & operator-=(const mint & a) {
		if ((x += mod - a.x) >= mod) x -= mod;
		return *this;
	}
	mint & operator*=(const  mint & a) {
		(x *= a.x) %= mod;
		return *this;
	}
	mint operator+(const mint & a) const {
		mint res(*this);
		return res += a;
	}
	mint operator-(const mint & a) const {
		mint res(*this);
		return res -= a;
	}
	mint operator*(const mint & a) const {
		mint res(*this);
		return res *= a;
	}
	mint pow(ll t) const {
		if (!t) return 1;
		mint a = pow(t >> 1);
		a *= a;
		if (t & 1) a *= *this;
		return a;
	}
	// for prime mod
	mint inv() const {
		return pow(mod - 2);
	}
	mint& operator/=(const mint & a) {
		return (*this) *= a.inv();
	}
	mint operator/(const mint & a) const {
		mint res(*this);
		return res /= a;
	}

	friend ostream& operator<<(ostream & os, const mint & m) {
		os << m.x;
		return os;
	}
};
//組み合わせ
void recursive_comb(vector<int> indexes, int s, int rest, std::function<void(vector<int>)> f) {
	if (rest == 0) {
		f(indexes);
	}
	else {
		if (s < 0) return;
		recursive_comb(indexes, s - 1, rest, f);
		indexes[rest - 1] = s;
		recursive_comb(indexes, s - 1, rest - 1, f);
	}
}

// nCkの組み合わせに対して処理を実行する
void foreach_comb(int n, int k, std::function<void(vector<int>)> f) {
	 vector<int>indexes(k);
	recursive_comb(indexes, n - 1, k, f);
}
int main() {
	map<ll, ll>A;
	ll N, M;
	cin >> N>>M;
	vector<ll, ll>a(M), b(M);
	rep(i, M) {
		cin >> a[i] >> b[i];
		A[a[i] + b[i] * N]=1;

	}
	rep(i, M) {
		if (a[i] == 1) {
			if (A[b[i] + N * N] == 1) {

				cout << "POSSIBLE";
				return 0;
			}

		}

	}
				cout << "IMPOSSIBLE";

}


Compiler output:
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_vector.h: In instantiation of 'struct std::_Vector_base<long long int, long long int>':
/usr/include/c++/14/bits/stl_vector.h:428:11:   required from 'class std::vector<long long int, long long int>'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
a.cc:93:19:   required from here
   93 |         vector<ll, ll>a(M), b(M);
      |                          ^
/usr/include/c++/14/bits/stl_vector.h:87:28: error: 'long long int' is not a class, struct, or union type
   87 |         rebind<_Tp>::other _Tp_alloc_type;
      |                            ^~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:89:9: error: 'long long int' is not a class, struct, or union type
   89 |         pointer;
      |         ^~~~~~~
/usr/include/c++/14/bits/stl_vector.h: In instantiation of 'class std::vector<long long int, long long int>':
a.cc:93:19:   required from here
   93 |         vector<ll, ll>a(M), b(M);
      |                          ^
/usr/include/c++/14/bits/stl_vector.h:518:20: error: '_M_allocate' has not been declared in 'std::vector<long long int, long long int>::_Base'
  518 |       using _Base::_M_allocate;
      |                    ^~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:519:20: error: '_M_deallocate' has not been declared in 'std::vector<long long int, long long int>::_Base'
  519 |       using _Base::_M_deallocate;
      |                    ^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:521:20: error: '_M_get_Tp_allocator' has not been declared in 'std::vector<long long int, long long int>::_Base'
  521 |       using _Base::_M_get_Tp_allocator;
      |                    ^~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:95:25: error: no match for 'operator[]' (operand types are 'std::vector<long long int, long long int>' and 'int')
   95 |                 cin >> a[i] >> b[i];
      |                         ^
a.cc:95:33: error: no match for 'operator[]' (operand types are 'std::vector<long long int, long long int>' and 'int')
   95 |                 cin >> a[i] >> b[i];
      |                                 ^
a.cc:96:20: error: no match for 'operator[]' (operand types are 'std::vector<long long int, long long int>' and 'int')
   96 |                 A[a[i] + b[i] * N]=1;
      |                    ^
a.cc:96:27: error: no match for 'operator[]' (operand types are 'std::vector<long long int, long long int>' and 'int')
   96 |                 A[a[i] + b[i] * N]=1;
      |                           ^
a.cc:100:22: error: no match for 'operator[]' (operand types are 'std::vector<long long int, long long int>' and 'int')
  100 |                 if (a[i] == 1) {
      |                      ^
a.cc:101:32: error: no match for 'operator[]' (operand types are 'std::vector<long long int, long long int>' and 'int')
  101 |                         if (A[b[i] + N * N] == 1) {
      |                                ^