criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <iostream>
#include <cstring>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <set>
#include <utility>
#include <cstdlib>
#include <queue>
#include <iomanip>
#include <cstdio>

using namespace std;


int N;
int M;
int a[200001];
int b[200001];
bool graph[200001][200001] = {false};
bool visited[200001] = {false};

void dfs(int v, int num){
    visited[v] = true;
    if(num == 2) return;

    for(int i = 0; i < N+1; i++){
        if(visited[i] == false && graph[v][i] == true){
            dfs(i,num+1);
        }
    }
}

int main(void){
    cin >> N >> M;
    N--;

    for(int i=0;i<M;i++){
        cin >> a[i] >> b[i];
        a[i]--;
        b[i]--;
        graph[a[i]][b[i]] = graph[b[i]][a[i]] = true;;
    }

    dfs(0,0);

    if(visited[N] == true) cout << "POSSIBLE" << endl;
    else cout << "IMPOSSIBLE" << endl;

    return 0;
}
  


Compiler output:
/tmp/ccTsd6WV.o: in function `dfs(int, int)':
a.cc:(.text+0x16): relocation truncated to fit: R_X86_64_PC32 against symbol `visited' defined in .bss section in /tmp/ccTsd6WV.o
a.cc:(.text+0x35): relocation truncated to fit: R_X86_64_PC32 against symbol `visited' defined in .bss section in /tmp/ccTsd6WV.o
/tmp/ccTsd6WV.o: in function `main':
a.cc:(.text+0x276): relocation truncated to fit: R_X86_64_PC32 against symbol `visited' defined in .bss section in /tmp/ccTsd6WV.o
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include <cstring>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <set>
#include <utility>
#include <cstdlib>
#include <queue>
#include <iomanip>
#include <cstdio>

using namespace std;


int N;
int M;
int a[200001];
int b[200001];
bool graph[200001][200001] = {false};
bool visited[200001] = {false};
bool flag = false;

void dfs(int v, int num){
    visited[v] = true;
    if(num == 2) return;

    for(int i = 0; i < N+1; i++){
        if(visited[i] == false && graph[v][i] == true){
            dfs(i,num+1);
        }
    }
}

int main(){
    cin >> N >> M;
    N--;

    for(int i=0;i<M;i++){
        cin >> a[i] >> b[i];
        a[i]--;
        b[i]--;
        graph[a[i]][b[i]] = graph[b[i]][a[i]] = true;;
    }

    dfs(0,0);

    if(visited[N] == true) cout << "POSSIBLE" << endl;
    else cout << "IMPOSSIBLE" << endl;

    return 0;
}
  


Compiler output:
/tmp/ccODfbwX.o: in function `dfs(int, int)':
a.cc:(.text+0x16): relocation truncated to fit: R_X86_64_PC32 against symbol `visited' defined in .bss section in /tmp/ccODfbwX.o
a.cc:(.text+0x35): relocation truncated to fit: R_X86_64_PC32 against symbol `visited' defined in .bss section in /tmp/ccODfbwX.o
/tmp/ccODfbwX.o: in function `main':
a.cc:(.text+0x276): relocation truncated to fit: R_X86_64_PC32 against symbol `visited' defined in .bss section in /tmp/ccODfbwX.o
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include <cstring>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <set>
#include <utility>
#include <cstdlib>
#include <queue>
#include <iomanip>
#include <cstdio>

using namespace std;


int N;
int M;
int a[200001];
int b[200001];
bool graph[200001][200001] = {false};
bool visited[200001] = {false};
bool flag = false;

void dfs(int v, int num){
    visited[v] = true;
    if(num == 2) return;

    for(int i = 0; i < N+1; i++){
        if(visited[i] == false && graph[v][i] == true){
            dfs(i,num+1);
        }
    }
}

int main(){
    cin >> N >> M;
    N--;

    for(int i=0;i<M;i++){
        cin >> a[i] >> b[i];
        a[i]--;
        b[i]--;
        graph[a[i]][b[i]] = graph[b[i]][a[i]] = true;;
    }

    dfs(0,0);

    if(visited[N] == true) cout << "POSSIBLE" << endl;
    else cout << "IMPOSSIBLE" << endl;

    return 0;
}
  


Compiler output:
/tmp/ccbe6TPZ.o: in function `dfs(int, int)':
a.cc:(.text+0x16): relocation truncated to fit: R_X86_64_PC32 against symbol `visited' defined in .bss section in /tmp/ccbe6TPZ.o
a.cc:(.text+0x35): relocation truncated to fit: R_X86_64_PC32 against symbol `visited' defined in .bss section in /tmp/ccbe6TPZ.o
/tmp/ccbe6TPZ.o: in function `main':
a.cc:(.text+0x276): relocation truncated to fit: R_X86_64_PC32 against symbol `visited' defined in .bss section in /tmp/ccbe6TPZ.o
collect2: error: ld returned 1 exit status
Language: C++

#include <ioatream>
#include <vector>
using namespace std;
int main(void){
  int N,M;
  cin >> N >> M;
  
  vector<vector<bool>>reachable(200001,vector<bool>(200001,false));
  for(int i=0;i<M;i++){
    int a,b;
    cin >> a >> b;
    reachable[a][b] = reachable[b][a] = true;
  }
  
  bool ans = false;
  
  for(int i=2;i<N;i++){
    if(reachable[1][i] == true && reachable[i][N] == true)
      ans = true;
  }
  
  if(ans)
    cout << "POSSIBLE" << endl;
  else
    cout << "IMPOSSIBLE" << endl;
  
  return 0;
}

      

Compiler output:
a.cc:1:10: fatal error: ioatream: No such file or directory
    1 | #include <ioatream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define print(s) cout << s << endl
#define acc(v) accumulate(v.begin(), v.end(), 0)
#define cinv(n,v) rep(i,n) cin >> v[i]
using namespace std;
const int INF = 1e9;
typedef long long ll;
typedef vector<int> vint;
typedef vector<string> vstr;
typedef vector<char> vchar;
const ll LINF = 1e18;
const ll MOD = 1e9 + 7;
// const lint MOD = 998244353;
int x_pos[4] = {1,0,-1,0}, y_pos[4] = {0,1,0,-1};
int ctoi(char c) {
	if (c >= '0' && c <= '9') {
		return c - '0';
	}
	return 0;
}
char upper(char c){
	return c-0x20;
}
char lower(char c){
	return c+0x20;
}

ll gcd(ll x, ll y) {
  if (y == 0) return x;
  return gcd(y, x%y);
}

ll lcm(ll x, ll y){
	ll g = gcd(x,y);
	return x/g*y;
}

int main(){
	int n,m; cin >> n >> m;
	vector<pair<int, int> > p(m);
	vector<int> v;

	rep(i,m){
		int a, b;
		cin >> a >> b;
		if (a==1){
			v.push_back(b);
		}
		p[i] = make_pair(b,a);
	}
	sort(rall(p));
	sort(all(v));
	vector<int> g(200007), s(200007);
	rep(i,n){
		if (p[i].first != n) break;
		g[p[i].second]++;
	}
	rep(i,v.size()){
		s[v[i]]++;
	}
	rep(i,200007){
		if (g[i]>0 && s[i]>0){
			cout << "POSSIBLE" << endl;
			return 0;
}
		}
	}
	cout << "IMPOSSIBLE" << endl;
}

Compiler output:
a.cc:71:9: error: 'cout' does not name a type
   71 |         cout << "IMPOSSIBLE" << endl;
      |         ^~~~
a.cc:72:1: error: expected declaration before '}' token
   72 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
	int N, M;
  	int a, b;
  	bool exist_route = false;
  
  	cin >> N >> M;
  	vector<bool> pass = (N+1, false);
  
  	for (int i=0; i<M; i++){
      cin >> a >> b; 
      if( a == 1){
        if(pass[b]){
        	exist_route = true;
        }
      	pass[b] = true;
      }
      else if( b == N ){
        if(pass[b]){
        	exist_route = true;
        }
      	pass[a] = true;
      }
    }
  

	if( exist_route){
      cout << "POSSIBLE";
    }  
  	else{
        cout << "IMPOSSIBLE";
    }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:40: error: conversion from 'bool' to non-scalar type 'std::vector<bool>' requested
   10 |         vector<bool> pass = (N+1, false);
      |                                        ^
Language: C++

#include <bits/stdc++.h>

#define ld long double
#define ll long long int
#define ull unsigned long long int
#define vi vector<int>
#define vl vector<ll>
#define vvi vector< vector<int> >
#define vvl vector< vector<ll> >
#define repd(i, a, b) for (int i=(a);i<(b);i++)
#define rep(i, n) repd(i,0,n)
#define ALL(v) v.begin(), v.end()
#define INF 1e9

using namespace std;

/**
 * calculate GCD(greatest common divisor)
 * @param a
 * @param b
 * @return
 */
unsigned euclidean_gcd(unsigned a, unsigned b) {
    if (a < b) return euclidean_gcd(b, a);
    unsigned r;
    while ((r = a % b)) {
        a = b;
        b = r;
    }
    return b;
}

/**
 * change minimum
 * @tparam T
 * @param a
 * @param b
 * @return bool
 */
template<class T>
inline bool changeMinimum(T &a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}

/**
 * change maximum
 * @tparam T
 * @param a
 * @param b
 * @return bool
 */
template<class T>
inline bool changeMaximum(T &a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}

/**
 * output answer
 * @tparam T
 * @param answer
 * @return
 */
template<typename T>
T output(T answer) {
    cout << answer << endl;
    return 0;
}

/** ----from here ---------------------------------------------------------- */

int main() {

    int N, M;
    cin >> N >> M;
//    pair<int, std::string> p;
//    for (int i = 0; i < 3; ++i) {
//        p = make_pair(1, "he");
//        p = make_pair(2, "hel");
//        p = make_pair(3, "hell");
//    }
    map<int, int> s;
    for (int i = 0; i < M; ++i) {
        int key, value;
        cin >> key >> value;
        s[key] = value;
    }

    vector<int> c;
    c.push_back(1);
    c.push_back(2);
    for (int i = 0; i < 2; ++i) {
        cout << c[i] << endl;
    }
    for (pair<int, int> p:s) {
        int a = p.first;
        int b = p.second;
        if (a == 1) {
            c.push_back(b);
        }

    }
    bool ans = false;
    for (pair<int, int> p:s) {
        int a = p.first;
        int b = p.second;
        if (b == N) {
            for (int j = 0; j < c.size(); ++j) {
                int cc = c[i];
                if (cc == a) {
                    ans = true;
                }
            }
        }
    }
    string str;
    if (ans) {
        str = "POSSIBLE";
    } else {
        str = "IMPOSSIBLE";
    }
    cout << str << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:116:28: error: 'i' was not declared in this scope
  116 |                 int cc = c[i];
      |                            ^
Language: C

#include <stdio.h>
int main(void){
    int N,M,i,j,a[200000],b[200000],temp[200000],swi=0,cnt=0;
    scanf("%d %d",&N,&M);
    for(i=0;i<M;i++)
    scanf("%d %d",&a[i],&b[i]);
    
    for(i=0;i<N;i++)　　/* 島1から船1本で行ける島の探索(条件を満たす島の数もカウントする) */
    if(a[i]==1){
    for(j=0;j<N;j++)
    temp[j]=b[i];     
    cnt++;
    }
    　
    for(j=0;j<=cnt&&swi==0;j++){  /* 島Nが島1から船2本で行ける(=島1から船1本で行ける島から船1本で行ける)か判定 */
        for(i=0;i<N;i++){
            if(temp[j]==a[i]&&b[i]==N)
            swi=1;
        }
    }
    
    if(swi==1)
   printf("POSSIBLE");
   else
   printf("IMPOSSIBLE");
    return(0);
}


Compiler output:
main.c: In function 'main':
main.c:8:21: error: stray '\343' in program
    8 |     for(i=0;i<N;i++)<U+3000><U+3000>/* <U+5CF6>1<U+304B><U+3089><U+8239>1<U+672C><U+3067><U+884C><U+3051><U+308B><U+5CF6><U+306E><U+63A2><U+7D22>(<U+6761><U+4EF6><U+3092><U+6E80><U+305F><U+3059><U+5CF6><U+306E><U+6570><U+3082><U+30AB><U+30A6><U+30F3><U+30C8><U+3059><U+308B>) */
      |                     ^~~~~~~~
main.c:8:23: error: stray '\343' in program
    8 |     for(i=0;i<N;i++)<U+3000><U+3000>/* <U+5CF6>1<U+304B><U+3089><U+8239>1<U+672C><U+3067><U+884C><U+3051><U+308B><U+5CF6><U+306E><U+63A2><U+7D22>(<U+6761><U+4EF6><U+3092><U+6E80><U+305F><U+3059><U+5CF6><U+306E><U+6570><U+3082><U+30AB><U+30A6><U+30F3><U+30C8><U+3059><U+308B>) */
      |                             ^~~~~~~~
main.c:14:5: error: stray '\343' in program
   14 |     <U+3000>
      |     ^~~~~~~~
Language: C++

#include<iostream>
#include<vector>
#include<cstdio>
using namespace std;

int main() {
	int n, m;
	scanf_s("%d %d", &n, &m);
	int a, b;
	vector<bool>v1(m,false);
	vector<bool>vn(m,false);//あえて多くメモリを確保し、中継点の番号を一致させ、O(N)を実現
	for (int i = 0; i < m; ++i) {
		scanf_s("%d %d", &a, &b);
		if (a == 1)v1[i]=true;
		else if (b == n)vn[i]=true;
	}
	for (int i = 0; i < m; ++i) {
		if (v1[i]==true && vn[i]==true) {
				printf("POSSIBLE\n");
				return 0;
			}
	}
	printf("IMPOSSIBLE\n");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    8 |         scanf_s("%d %d", &n, &m);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <cstdlib>
using namespace std;

int main(void){
    int N , M;
    cin >> N >> M;
    vector<bool> a(200000);
    vector<bool> b(200000);
    for (int i = 0;i < 200000; i++){
        a[i] = 0;
        b[i] = 0;
    }
    if (N < 3 && N > 200000 && 1 > M && M > 200000){
        return 0;
    }
    for (int i = 0;i < M; i++){
        long long from,to;
        cin >> from >> to;
        if(from == 1){
            a[to] = true;
        }
        if(to == N){
            b[from] = true
        }
    }
    for (int i = 0;i < N; i++){
        if(a[i] && b[i]){
            cout << "POSSIBLE" << endl;
            return 0;
        }
    }
    cout << "IMPOSSIBLE" << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:27: error: expected ';' before '}' token
   26 |             b[from] = true
      |                           ^
      |                           ;
   27 |         }
      |         ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
const int SIZE=200005;
int A[SIZE],B[SIZE];
int C[SIZE];
int main(){
	int n;
	cin>>n>>m;
	for(int i=0;i<n;i++){
		cin>>A[i]>>B[i];
	}
	for(int i=0;i<n;i++)
		if(A[i]==1) C[B[i]]=1;
	bool ans=false;
	for(int i=0;i<n;i++){
		if(B[i]==n&&C[A[i]]==1) ans==true;
		if(ans) break;
	}
	if(!ans) cout<<"IM";
	cout<<"POSSIBLE"<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: 'm' was not declared in this scope
    8 |         cin>>n>>m;
      |                 ^
Language: C++

#include <iostream>
using namespace std;
int main(){
	int n, m;
	cin>>n>>m;
	vector<bool>vis(n + 1, false);
	bool ans = false;
	for (int i = 0; i < m; i ++){
		int a, b;
		cin>>a>>b;
		if (a == 1){
			if(vis[b]){
				ans = true;
			}
			vis[b] = true;
		}else if(b == n){
			if (vis[a]){
				ans = true;
			}
			vis[a] = true;
		}
	}
	
	if(!ans)cout << "IM";
	cout << "POSSIBLE" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'vector' was not declared in this scope
    6 |         vector<bool>vis(n + 1, false);
      |         ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:6:16: error: expected primary-expression before 'bool'
    6 |         vector<bool>vis(n + 1, false);
      |                ^~~~
a.cc:12:28: error: 'vis' was not declared in this scope
   12 |                         if(vis[b]){
      |                            ^~~
a.cc:15:25: error: 'vis' was not declared in this scope
   15 |                         vis[b] = true;
      |                         ^~~
a.cc:17:29: error: 'vis' was not declared in this scope
   17 |                         if (vis[a]){
      |                             ^~~
a.cc:20:25: error: 'vis' was not declared in this scope
   20 |                         vis[a] = true;
      |                         ^~~
Language: C++

#include <iostream>
#include <vector>
#include <string>
using namespace std;


int main()
{
    int N, M;
    cin >> N >> M;
    vector<int> a(M), b(M);
    for( int i = 0; i < M; ++i ) cin >> a[i] >> b[i];


    vector<int> firstBoat, secondBoat;
    bool ans = false;
    for( auto f: firstBoat ){
        for( auto s; secondBoat ){
            if( f == s ){
                ans = true;
                break;
            }
        }
    }
    if( ans ) cout << "POSSIBLE" << endl;
    else cout << "IMPOSSIBLE" << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:14: error: declaration of 'auto s' has no initializer
   18 |         for( auto s; secondBoat ){
      |              ^~~~
a.cc:18:22: error: could not convert 'secondBoat' from 'std::vector<int>' to 'bool'
   18 |         for( auto s; secondBoat ){
      |                      ^~~~~~~~~~
      |                      |
      |                      std::vector<int>
a.cc:18:32: error: expected ';' before ')' token
   18 |         for( auto s; secondBoat ){
      |                                ^~
      |                                ;
Language: C++

#include<iostream>
#include <bits/stdc++.h>
#include<stdio.h>
#include <stdlib.h>
#include<string>
#include<queue>
#include<algorithm>
#include<math.h>
#include<map>
using namespace std;


int main(){
	int N,M,A,B,ok[200001]={};
	cin>>N>>M;
	for(int i=0;i<M;i++){
		cin>>A>>B;
		if(A==1){
			ok[B]++;
		}
		if(B[i]==N){
			ok[A]++;
		}
	}
	for(int i=1;i<=N;i++){
		if(ok[i]==2){
			cout<<"POSSIBLE"<<endl;
			return 0;
		}
	}
	cout<<"IMPOSSIBLE"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:21: error: invalid types 'int[int]' for array subscript
   21 |                 if(B[i]==N){
      |                     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define MM 1000000000;
#define mod MM + 7;
#define INF (ll)1e18
#define pi acos(-1.0)
#define MAX 100005
#define NIL -1
int main(){
    ll n, m; cin >> n >> m;
    ll a[m], b[m];
    pair<ll, ll> pp;
    vector<ll> v_f, v_e;
    bool flg = false;
    for(ll i = 0; i < m; i++){
        cin >> a[i] >> b[i];
        if(a[i] == 1){
            vf.push_back(b[i]);
        } 
        if(b[i] == n){
            ve.push_back(a[i]);
        }
    }
    for(int i = 0; i < vf.size(); i++){
        for(int j = 0; j < ve.size(); j++){
            if(vf[i] == ve[j]) flg = true;
        }
    }
    if(flg) cout << "POSSIBLE" << endl;
    else cout << "IMPOSSIBLE" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:13: error: 'vf' was not declared in this scope; did you mean 'v_f'?
   19 |             vf.push_back(b[i]);
      |             ^~
      |             v_f
a.cc:22:13: error: 've' was not declared in this scope; did you mean 'v_e'?
   22 |             ve.push_back(a[i]);
      |             ^~
      |             v_e
a.cc:25:24: error: 'vf' was not declared in this scope; did you mean 'v_f'?
   25 |     for(int i = 0; i < vf.size(); i++){
      |                        ^~
      |                        v_f
a.cc:26:28: error: 've' was not declared in this scope; did you mean 'v_e'?
   26 |         for(int j = 0; j < ve.size(); j++){
      |                            ^~
      |                            v_e
Language: C++

int main(){
	int n,m,x,y;
	bool a[200010],b[200010];
	a[0]=false;
	b[0]=false;
	cin>>n>>m; 
	for(int i=0;i<m;i++){
	    cin>>x>>y;
	    if(x==1){
	        a[y]=1;
	    }
	    if(y==n){
	        b[x]=1;
	    }
	}
	
	for(int i=2;i<=n;i++){
	    if(a[i]==1&&b[i]==1){
	        cout<<"POSSIBLE"<<endl;
	        return 0;
	    }
	}
	
	cout<<"IMPOSSIBLE"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin>>n>>m;
      |         ^~~
a.cc:19:17: error: 'cout' was not declared in this scope
   19 |                 cout<<"POSSIBLE"<<endl;
      |                 ^~~~
a.cc:19:35: error: 'endl' was not declared in this scope
   19 |                 cout<<"POSSIBLE"<<endl;
      |                                   ^~~~
a.cc:24:9: error: 'cout' was not declared in this scope
   24 |         cout<<"IMPOSSIBLE"<<endl;
      |         ^~~~
a.cc:24:29: error: 'endl' was not declared in this scope
   24 |         cout<<"IMPOSSIBLE"<<endl;
      |                             ^~~~
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<map>
#include<math.h>
#include<queue>
#include<deque>
#include<stack>
#include<cstdio>
#include<utility>
#include<set>
#include<list>
#include<cmath>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
const int INF = 1e9;
int main() {
	int N, M;
	cin >> N >> M;
	vector<bool>S(N + 1, false), E(N + 1, false);
	bool ans = false;
	for (int i = 0; i < M; ++i) {
		int a, b;
		cin >> a >> b;
		if (a == 1) {
			S[b] = true;
		}
		if (b == N) {
			E[a] = true;
		}
	}
	for (int i = 0; i < N+1; ++i) {
		if (S[i] && E[i]) {
			ans = true;
		}
	}
	if (!ans)cout << "IM";
	cout << "POSSIBLE" << endl;
	return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:41:18: error: expected '}' at end of input
   41 |         return 0;
      |                  ^
a.cc:19:12: note: to match this '{'
   19 | int main() {
      |            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,m,c=0;
  cin>>n>>m;
  set<int> se;
  for(int i=0;i<m;i++){
    int a,b;
    cin>>a>>b;
    if(a==1){
      se.insert(b);
      c++;
    }
    if(b==n){
      se.insert(a);
      c++;
    }
  }
  cout<<(c==se.size()?"IMPOSSIBLE":POSSIBLE");
}

Compiler output:
a.cc:19:44: warning: missing terminating " character
   19 |   cout<<(c==se.size()?"IMPOSSIBLE":POSSIBLE");
      |                                            ^
a.cc:19:44: error: missing terminating " character
   19 |   cout<<(c==se.size()?"IMPOSSIBLE":POSSIBLE");
      |                                            ^~~
a.cc: In function 'int main()':
a.cc:19:36: error: 'POSSIBLE' was not declared in this scope
   19 |   cout<<(c==se.size()?"IMPOSSIBLE":POSSIBLE");
      |                                    ^~~~~~~~
a.cc:19:44: error: expected ')' before '}' token
   19 |   cout<<(c==se.size()?"IMPOSSIBLE":POSSIBLE");
      |         ~                                  ^
      |                                            )
   20 | }
      | ~
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

int main(){
    int n, m;
    cin >> n >> m;
    if(m == 1){
        cout << "IMPOSSIBLE" << endl;
        return 0;
    }

    bool flag = false;
    vector<int> b, ans;
    for(int i = 0; i < m; i++){
        int x, y;
        cin >> x >> y;
        if(x == 1){
            b.push_back(y);
            flag = true;
        }
        if(y == n){
            ans.push_back(x);
            flag = true;
        }
    }

    sort(ans.begin(), ans.end());
    sort(b.begin(), b.end());
    decltype(ans)::iterator v1 = unique(ans.begin(), ans.end());
    decltype(b)::iterator v2 = unique(b.begin(), b.end());
    ans.erase(v1, ans.end());
    b.erase(v2, b.end());

    if(flag){
        /*
        for(int i = 0; i < b.size(); i++){
            auto result = find(ans.begin(), ans.end(), b[i]);
            if(result != ans.end()){
                cout << "POSSIBLE" << endl;
                return 0;
            }
        }*/
        for(int i = 0; i < ans.size(); i++){
            auto res = find(b.begin(), b.end(), ans[i]);
            if(res != b.end()){
                cout << "POSSIBLE" << endl;
                return 0
            }
        }
    }

    cout << "IMPOSSIBLE" << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:49:25: error: expected ';' before '}' token
   49 |                 return 0
      |                         ^
      |                         ;
   50 |             }
      |             ~
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

int main(){
    int n, m;
    cin >> n >> m;
    if(m == 1){
        cout << "IMPOSSIBLE" << endl;
        return 0;
    }

    bool flag = false;
    vector<int> b, ans;
    for(int i = 0; i < m; i++){
        int x, y;
        cin >> x >> y;
        if(x == 1){
            b.push_back(y);
            flag = true;
        }
        if(y == n){
            ans.push_back(x);
            flag = true;
        }
    }

    sort(ans.begin(), ans.end());
    sort(b.begin(), b.end());
    //cout << "ans:" << ans.size() << endl;
    //cout << "b:" << b.size() << endl;
    decltype(ans)::iterator v1 = unique(ans.begin(), ans.end());
    decltype(b)::iterator v2 = unique(b.begin(), b.end());
    ans.erase(v1, ans.end());
    b.erase(v2, b.end());
    //cout << "ans:" << ans.size() << endl;
    //cout << "b:" << b.size() << endl;
    
    auto err = find(ans.negin(), ans.end(), b[b.size() - 1]);
    if(err != ans.end()){
        cout << "POSSIBLE" << endl;
        return 0;
    }

    if(flag){
        for(int i = 0; i < b.size(); i++){
            auto result = find(ans.begin(), ans.end(), b[i]);
            if(result != ans.end()){
                cout << "POSSIBLE" << endl;
                return 0;
            }
         }
    }

    cout << "IMPOSSIBLE" << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:25: error: 'class std::vector<int>' has no member named 'negin'; did you mean 'begin'?
   40 |     auto err = find(ans.negin(), ans.end(), b[b.size() - 1]);
      |                         ^~~~~
      |                         begin
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

int main(){
    int n, m;
    cin >> n >> m;

    bool flag = false;
    vector<int> a, b; 
    for(int i = 0; i < m; i++){
        int x, y;
        cin >> x >> y;
        if(x == 1 || y == n){
            a.push_back(x);
            b.push_back(y);
            flag = true;
        }
    }

    if(flag){
        for(int i = 0; i < a.size(); i++){
            auto ans = find(b.begin(), b.end(), a[i]);
            if(ans != b.end()){
                cout << "POSSIBLE" << endl;
                return 0
            }
        }
    }

    cout << "IMPOSSIBLE" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:25: error: expected ';' before '}' token
   27 |                 return 0
      |                         ^
      |                         ;
   28 |             }
      |             ~
Language: Java

import java.io.File;
import java.io.IOException;
import java.util.*;
 
public class Main {
 
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner in = new Scanner(file);
		
		Scanner in = new Scanner(System.in);
		
		int n = in.nextInt();
		int m = in.nextInt();
      
		int[][] ab = new int[m][2];
        boolean[] tf = new boolean[n+1];
		
		for(int i = 0; i < n; i++) {
			ab[i][0] = in.nextInt();
            ab[i][1] = in.nextInt();
          if(ab[i][0] == 1) tf[ab[i][1]] = true;
		}
      
        for(int i = 0; i < n; i++) {
			if(tf[ab[i][0]] && ab[i][1] == N){
              System.out.println("POSSIBLE");
              return;
            }
		}
        
		System.out.println("IMPOSSIBLE");
	}
}


Compiler output:
Main.java:26: error: cannot find symbol
			if(tf[ab[i][0]] && ab[i][1] == N){
			                               ^
  symbol:   variable N
  location: class Main
1 error
Language: Java

import java.io.File;
import java.io.IOException;
import java.util.*;
 
public class Main {
 
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner in = new Scanner(file);
		
		Scanner in = new Scanner(System.in);
		
		int n = in.nextInt();
		int m = in.nextInt();
      
		int[][] ab = new int[m][2];
        boolean[] tf new boolean[n+1];
		
		for(int i = 0; i < n; i++) {
			ab[i][0] = in.nextInt();
            ab[i][1] = in.nextInt();
          if(ab[i][0] == 1) tf[ab[i][1]] = true;
		}
      
        for(int i = 0; i < n; i++) {
			if(tf[ab[i][0]] && ab[i][1] == N){
              System.out.println("POSSIBLE");
              return;
            }
		}
        
		System.out.println("IMPOSSIBLE");
	}
}


Compiler output:
Main.java:17: error: ';' expected
        boolean[] tf new boolean[n+1];
                    ^
Main.java:17: error: not a statement
        boolean[] tf new boolean[n+1];
                     ^
2 errors
Language: C++

#include <string>
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
	int n,m;
	cin >> n>>m;
	vector<int> a,b;
	for (int i = 0; i < m; ++i) {
		pair<int, int> tmp;
		cin >> tmp.first >> tmp.second;
		if (tmp.first == 1) {
			if (find(a.begin(), a.end(), tmp.second) == a.end()) {
				a.push_back(tmp.second);
				if (find(b.begin(), b.end(), tmp.second) != b.end()) {
					cout << "POSSIBLE" << endl;
					return 0;
				}
		}
		if (tmp.second==n) {
			if (find(b.begin(), b.end(), tmp.first) == b.end()) {
				b.push_back(tmp.first); 
				if (find(a.begin(), a.end(), tmp.second) != a.end()) {
					cout << "POSSIBLE" << endl;
					return 0;
				}
			}
		}
		
	}
	cout << "IMPOSSIBLE"<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:2: error: expected '}' at end of input
   34 | }
      |  ^
a.cc:6:12: note: to match this '{'
    6 | int main() {
      |            ^
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<cmath>
#define swap(type,x,y) do{type t=x;x=y;y=t;}while(0)

using namespace std;

void quick(vector<int> a, int left, int right) {
	int pl = left;
	int pr = right;
	int x = a[(pl + pr) / 2];

	do {
		while (a[pl] < x)pl++;
		while (a[pr] > x)pr--;
		if (pl <= pr) {
			swap(int, a[pl], a[pr]);
			pl++;
			pr--;
		}
	} while (pl <= pr);
	if (left < pr) quick(a, left, pr);
	if (pl < right) quick(a, pl, right);
}

int main() {
	int n, m, i, j, k, s;
	vector<int>a, x;

	cin >> n >> m;

	for (i = 0; i < m; i++) {
		cin >> j >> k;
		if (j == 1)
			x.push_back(k);
		if (k == n)
			a.push_back(j);
	}

	k = x.size();
	m = a.size();

	if (k <= 0 && m <= 0) {
		cout << "IMPOSSIBLE";
		return 0;
	}
	
	for (i = 2; i < n; i++) {
		if (search(x.begin(), x.end(), i) && search(a.begin(), a.end(), i)) {
			cout << "POSSIBLE";
			return 0;
		}
	}

	cout << "IMPOSSIBLE";

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:50:51: error: no match for 'operator&&' (operand types are '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' and '__gnu_cxx::__normal_iterator<int*, std::vector<int> >')
   50 |                 if (search(x.begin(), x.end(), i) && search(a.begin(), a.end(), i)) {
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                           |                                |
      |                           __normal_iterator<[...],[...]>   __normal_iterator<[...],[...]>
a.cc:50:51: note: candidate: 'operator&&(bool, bool)' (built-in)
   50 |                 if (search(x.begin(), x.end(), i) && search(a.begin(), a.end(), i)) {
      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:50:51: note:   no known conversion for argument 2 from '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'bool'
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h: In instantiation of '_ForwardIterator std::search(_ForwardIterator, _ForwardIterator, const _Searcher&) [with _ForwardIterator = __gnu_cxx::__normal_iterator<int*, vector<int> >; _Searcher = int]':
a.cc:50:13:   required from here
   50 |                 if (search(x.begin(), x.end(), i) && search(a.begin(), a.end(), i)) {
      |                     ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4186:24: error: expression cannot be used as a function
 4186 |     { return __searcher(__first, __last).first; }
      |              ~~~~~~~~~~^~~~~~~~~~~~~~~~~
Language: C++

#include<iostream>
#include <stdlib.h>
#include <algorithm>
#include <string>
#include <math.h>
#include <sstream>
#include <cstdlib>
typedef long long  ll;
using namespace std;
int main()
{
	int N,M;
	cin >> N >> M;
	vector<int> dataa(M,0);
	vector<int> datab(M,0);
	for(int i=0;i<M;i++){
		cin >> dataa[i] >> datab[i];
	}
	if (M==1){
		cout << "IMPOSSIBLE" << endl;
		return 0;
	}
	for (int i=0;i<M;i++){
		if(datab[i]==N){
			for(int j=0;j<M;j++){
				if(dataa[i]==datab[j]){
					if(dataa[j]==1){
						cout << "POSSIBLE" << endl;
						return 0;
					}
				}
			}
		}
	}
	cout << "IMPOSSIBLE" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'vector' was not declared in this scope
   14 |         vector<int> dataa(M,0);
      |         ^~~~~~
a.cc:8:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    7 | #include <cstdlib>
  +++ |+#include <vector>
    8 | typedef long long  ll;
a.cc:14:16: error: expected primary-expression before 'int'
   14 |         vector<int> dataa(M,0);
      |                ^~~
a.cc:15:16: error: expected primary-expression before 'int'
   15 |         vector<int> datab(M,0);
      |                ^~~
a.cc:17:24: error: 'dataa' was not declared in this scope
   17 |                 cin >> dataa[i] >> datab[i];
      |                        ^~~~~
a.cc:17:36: error: 'datab' was not declared in this scope
   17 |                 cin >> dataa[i] >> datab[i];
      |                                    ^~~~~
a.cc:24:20: error: 'datab' was not declared in this scope
   24 |                 if(datab[i]==N){
      |                    ^~~~~
a.cc:26:36: error: 'dataa' was not declared in this scope
   26 |                                 if(dataa[i]==datab[j]){
      |                                    ^~~~~
Language: C++

#include<iostream>
#include<cstdio>
#include<string>
#include<algorithm>
#include<utility>
#include<numeric>
#include<vector>
#include<map>
#include<set>
#include<tuple>
#include<stack>
#include<queue>
#include<functional>
#include<iterator>
#include<cmath>
#include<cctype>

using namespace std;

typedef long long ll;
typedef pair<int,int> P;

const int INF = 1e9;
const ll LINF = 1e18;

struct edge{int to,cost;};


int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);

	int n,m;
	cin >> n >> m;
	
	vector<int> es[n];
	int a,b;
	for(int i=0;i<m;i++){
		cin >> a >> b;
		a--;b--;
		es[a].push_back(b);
	}

	int dp[n];
	d[0]=0;
	for(int i=1;i<n;i++) d[i] = INF;
	
	int e;
	for(int i=0;i<n-1;i++){
		for(int j=0;j<es[i].size();j++){
			e = es[i][j];
			if(d[e] > d[i]+1){
				d[e] = d[i]+1;
			}
		}
	}
	cout << (d[n-1]<=2?"":"IM") << "POSSIBLE\n";

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:45:9: error: 'd' was not declared in this scope; did you mean 'dp'?
   45 |         d[0]=0;
      |         ^
      |         dp
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
    int N, M, a, b;
    cin >> N >> M;
    int i1[200001], iN[200001];
  	fill_n(i1, 200001, 0);
    fill_n(i2, 200001, 0);
    for(int i=0;i<M;i++){
        cin >> a >> b;
        if(a == 1)
            i1[b] = 1;
        if(b == N)
            iN[a] = 1;
    }
    for(int i=2;i<N;i++){
        if(i1[i] == 1 && iN[i] == 1){
            cout << "POSSIBLE" << endl;
            return 0;
        }
    }
    cout << "IMPOSSIBLE" << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: 'i2' was not declared in this scope; did you mean 'iN'?
    9 |     fill_n(i2, 200001, 0);
      |            ^~
      |            iN
Language: C++

#include <bits/stdc++.h>
using namespace std;
vector<int>vecx;
vector<int>vecy;
int main(){
    int n,m,a,b,x=0,y=0;
    cin>>n>>m;
    for(int i=0;i<m;i++){
        cin>>a>>b;
        if(a==1){
            vecx.push_back(b);
            x++;
        if(b==n){
            vecy.push_back(a);
            y++;
        }
    }
    if(x==0||y==0){
        cout<<"IMPOSSIBLE"<<endl;
        return 0;
    }
    sort(vecx.begin(),vecx.end());
    sort(vecy.begin(),vecy.end());
    x=0,y=0;
    while(x<=vecx.size()&&y<=vecy.size()){
        if(vecx[x]==vecy[y]){
            cout<<"POSSIBLE"<<endl;
            return 0;
        }
        if(vecx[x]<vecy[y])x++;
        else y++;
    }
    cout<<"IMPOSSIBLE"<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:2: error: expected '}' at end of input
   35 | }
      |  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
vector<int>vecx;
vector<int>vecy;
int main(){
    int n,m,a,b,x=0,y=0;
    cin>>n>>m;
    for(int i=0;i<m;i++){
        cin>>a>>b;
        if(a==1){
            vecx.push_back(b)
            x++;
        if(b==n){
            vecy.push_back(a);
            y++;
        }
    }
    if(x==0||y==0){
        cout<<"IMPOSSIBLE"<<endl;
        return 0;
    }
    sort(vecx.begin(),vecx.end());
    sort(vecy.begin(),vecy.end());
    x=0,y=0;
    while(x<=vecx.size()&&y<=vecy.size()){
        if(vecx[x]==vecy[y]){
            cout<<"POSSIBLE"<<endl;
            return 0;
        }
        if(vecx[x]<vecy[y])x++;
        else y++;
    }
    cout<<"IMPOSSIBLE"<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:30: error: expected ';' before 'x'
   11 |             vecx.push_back(b)
      |                              ^
      |                              ;
   12 |             x++;
      |             ~                 
a.cc:35:2: error: expected '}' at end of input
   35 | }
      |  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int N,M;
    cin >> N >> M;

    vector<bool> a(n),b(N);
    for(int i = 0;i < M;i++){
        int x,y;
        cin >> x >> y;
        if(x == 1)a[y-1] = true;
        if(y == N)b[x-1] = false;
    }
    for(int i = 0;i < N;i++){
        if(a[i]&&b[i]){
            cout <<"POSSIBLE"<< endl;
            return 0;
        }
    } 
    cout << "IMPOSSIBLE" << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: 'n' was not declared in this scope
    7 |     vector<bool> a(n),b(N);
      |                    ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
static const int MAX=200000;

bool graph[MAX][MAX],visited[MAX],pos;

int main(){
    ll cunt,N,M,a,b; //N:島の個数,M:船の数
    cin>>N>>M;

    for(int i=0;i<M;i++){
        cin>>a>>b;
        a--;b--;
        graph[a][b]=graph[b][a]=true;
    }
   
    for(int v=1;v<N-1;v++){
        if(graph[0][v]&&graph[v][N-1])
            pos=true;
            break;
    }

    cout<<(pos?"POSSIBLE":"IMPOSSIBLE")<<"\n";
    
    return 0;
}


Compiler output:
/tmp/cclSsX8r.o: in function `main':
a.cc:(.text+0x141): relocation truncated to fit: R_X86_64_PC32 against symbol `pos' defined in .bss section in /tmp/cclSsX8r.o
a.cc:(.text+0x14a): relocation truncated to fit: R_X86_64_PC32 against symbol `pos' defined in .bss section in /tmp/cclSsX8r.o
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>
#define INF (1<<30)
#define INFLL (1ll<<60)
using namespace std;
map <int,int> mp;
typedef pair<int, int> P;
typedef long long ll;
static const int MAX=200000;

bool graph[MAX][MAX],visited[MAX],pos;

int main(){
    ll cunt,N,M,a,b; //N:島の個数,M:船の数
    cin>>N>>M;

    for(int i=0;i<M;i++){
        cin>>a>>b;
        a--;b--;
        graph[a][b]=graph[b][a]=true;
    }
   
    for(int v=1;v<N-1;v++){
        if(graph[0][v]&&graph[v][N-1])
            pos=true;
            break;
    }

    cout<<(pos?"POSSIBLE":"IMPOSSIBLE")<<"\n";
    
    return 0;
}


Compiler output:
/tmp/ccdVHC2e.o: in function `main':
a.cc:(.text+0x141): relocation truncated to fit: R_X86_64_PC32 against symbol `pos' defined in .bss section in /tmp/ccdVHC2e.o
a.cc:(.text+0x14a): relocation truncated to fit: R_X86_64_PC32 against symbol `pos' defined in .bss section in /tmp/ccdVHC2e.o
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>
#define INF (1<<30)
#define INFLL (1ll<<60)
using namespace std;
map <int,int> mp;
typedef pair<int, int> P;
typedef long long ll;
static const int MAX=200000;
ll cunt,N,M,a,b; //N:島の個数,M:船の数

bool graph[MAX][MAX],visited[MAX],pos;

int main(){
    cin>>N>>M;

    for(int i=0;i<M;i++){
        cin>>a>>b;
        a--;b--;
        graph[a][b]=graph[b][a]=true;
    }
   
    for(int v=1;v<N-1;v++){
        if(graph[0][v]&&graph[v][N-1])
            pos=true;
            break;
    }

    cout<<(pos?"POSSIBLE":"IMPOSSIBLE")<<"\n";
    
    return 0;
}


Compiler output:
/tmp/ccsqZ9dv.o: in function `main':
a.cc:(.text+0x16e): relocation truncated to fit: R_X86_64_PC32 against symbol `pos' defined in .bss section in /tmp/ccsqZ9dv.o
a.cc:(.text+0x177): relocation truncated to fit: R_X86_64_PC32 against symbol `pos' defined in .bss section in /tmp/ccsqZ9dv.o
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>
#define INF (1<<30)
#define INFLL (1ll<<60)
using namespace std;
map <int,int> mp;
typedef pair<int, int> P;
typedef long long ll;
static const int MAX=200000;
int cunt,N,M,a,b; //N:島の個数,M:船の数

bool graph[MAX][MAX],visited[MAX],pos;

int main(){
    cin>>N>>M;

    for(int i=0;i<M;i++){
        cin>>a>>b;
        a--;b--;
        graph[a][b]=graph[b][a]=true;
    }
   
    for(int v=1;v<N-1;v++){
        if(graph[0][v]&&graph[v][N-1])
            pos=true;
            break;
    }

    cout<<(pos?"POSSIBLE":"IMPOSSIBLE")<<"\n";
    
    return 0;
}


Compiler output:
/tmp/cc1JqqPe.o: in function `main':
a.cc:(.text+0x166): relocation truncated to fit: R_X86_64_PC32 against symbol `pos' defined in .bss section in /tmp/cc1JqqPe.o
a.cc:(.text+0x16f): relocation truncated to fit: R_X86_64_PC32 against symbol `pos' defined in .bss section in /tmp/cc1JqqPe.o
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>
using namespace std;
static const int MAX=200000;
int cunt,N,M,a,b; //N:島の個数,M:船の数
bool graph[MAX][MAX],visited[MAX],pos;
int main(){
    cin>>N>>M;

    for(int i=0;i<M;i++){
        cin>>a>>b;
        a--;b--;
        graph[a][b]=graph[b][a]=true;
    }
   
    for(int v=1;v<N-1;v++){
        if(graph[0][v]&&graph[v][N-1])
            pos=true;
            break;
    }

    cout<<(pos?"POSSIBLE":"IMPOSSIBLE")<<"\n";
    
    return 0;
}


Compiler output:
/tmp/ccD5byR7.o: in function `main':
a.cc:(.text+0x166): relocation truncated to fit: R_X86_64_PC32 against symbol `pos' defined in .bss section in /tmp/ccD5byR7.o
a.cc:(.text+0x16f): relocation truncated to fit: R_X86_64_PC32 against symbol `pos' defined in .bss section in /tmp/ccD5byR7.o
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>
using namespace std;
static const int MAX=200000;
int cunt,N,M,a,b; //N:島の個数,M:船の数
bool graph[MAX][MAX],visited[MAX],pos;
void dfs(int v){
    visited[v]=true;
    for(int v2=0;v2<N;v2++){
        if(!graph[v][v2]||visited[v2]||cunt>=2)continue;
        cunt++;
        cout<<v<<v2<<"\n";
        if(v2==N-1)pos=true;
        dfs(v2);
        cunt--;
    }
    visited[v]=false;
}
int main(){
    cin>>N>>M;

    for(int i=0;i<M;i++){
        cin>>a>>b;
        a--;b--;
        graph[a][b]=graph[b][a]=true;
    }
    
    dfs(0);
    cout<<(pos?"POSSIBLE":"IMPOSSIBLE")<<"\n";
    
    return 0;
}


Compiler output:
/tmp/ccz7xFQH.o: in function `dfs(int)':
a.cc:(.text+0x13): relocation truncated to fit: R_X86_64_PC32 against symbol `visited' defined in .bss section in /tmp/ccz7xFQH.o
a.cc:(.text+0x5c): relocation truncated to fit: R_X86_64_PC32 against symbol `visited' defined in .bss section in /tmp/ccz7xFQH.o
a.cc:(.text+0xcf): relocation truncated to fit: R_X86_64_PC32 against symbol `pos' defined in .bss section in /tmp/ccz7xFQH.o
a.cc:(.text+0x10b): relocation truncated to fit: R_X86_64_PC32 against symbol `visited' defined in .bss section in /tmp/ccz7xFQH.o
/tmp/ccz7xFQH.o: in function `main':
a.cc:(.text+0x231): relocation truncated to fit: R_X86_64_PC32 against symbol `pos' defined in .bss section in /tmp/ccz7xFQH.o
collect2: error: ld returned 1 exit status
Language: C++


#include<iostream>
#include<vector>
#include<algorithm>

struct root{
	std::size_t one, other;
	root() :one{}, other{} {}
	friend std::istream& operator>> ( std::istream&is,  root&p) {
		return is >> p.one >> p.other;
	}
};


/*
auto find = [&](auto x)->bool {
	auto it = std::find(std::begin(vc), std::end(vc), x);
	return it != std::end(vc);
};*/

template<class T>
bool find(const std::vector<T>&v,const T&val) {
	auto e_ = std::end(v);
	auto it = std::find(std::begin(v),e_,val);
	return e_ != it;
}



auto push = [&](bool b, auto x)->void {
	if (b)	vc.emplace_back(x);
};

int main() {
	std::size_t N, M;//target, size;
	std::cin >> N >> M;

	std::vector<root> vr;
	vr.resize(M);

	for (auto &e : vr) {
		std::cin >> e;
	}


	std::sort(std::begin(vr), std::end(vr),
		[](const auto &e,const auto &e1)->bool {
		return e.one < e1.one;
	});


	std::vector<size_t> vc;
	vc.emplace_back(1);

	for (const auto&e : vr) {
		auto no_other = find(vc, e.one) && !find(vc, e.other);//
		auto no_one= !find(vc, e.one) && find(vc, e.other);
		if (no_one) {
			vc.emplace_back(e.one);
		}
		if (no_other) {
			vc.emplace_back(e.other);
		}
	}
	/*
	for (const auto&e : vc) {
		std::cout << e << "\n";
	}*/
	
	auto exist = find(vc,N);

	std::cout << (exist ? "POSSIBLE" : "IMPOSSIBLE") << "\n";
	std::cin >> M;
	return 0;
}

Compiler output:
a.cc:30:14: error: non-local lambda expression cannot have a capture-default
   30 | auto push = [&](bool b, auto x)->void {
      |              ^
a.cc: In lambda function:
a.cc:31:17: error: 'vc' was not declared in this scope
   31 |         if (b)  vc.emplace_back(x);
      |                 ^~
Language: C++

#include <iostream>
#include<cstdlib>
#include<queue>
#include<set>
#include<vector>
#include<stack>
#include<map>
#include<string>
#include<algorithm>
#include<cstdio>
using namespace std;
#define rep(i,a) for(int i=0;i<a;i++)
#define mp make_pair
#define pb push_back
#define P pair<int,int>
#define ll __int64
//#define __int64 long long
const ll M=1000000007;
int n,m;
vector<int>G[211111];

int main(){
	cin>>n>>m;
	rep(i,m){
		int a,b;
		cin>>a>>b;
		a--;b--;
		G[a].push_back(b);
		G[b].push_back(a);
	}

	rep(i,G[0].size()){
		rep(j,G[G[0][i]].size()){
			if(G[G[0][i]][j]==n-1){
			cout<<"POSSIBLE"<<endl;
			return 0;
			}
		}
	}
	cout<<"IMPOSSIBLE"<<endl;
	return 0;
}

Compiler output:
a.cc:16:12: error: '__int64' does not name a type; did you mean '__int64_t'?
   16 | #define ll __int64
      |            ^~~~~~~
a.cc:18:7: note: in expansion of macro 'll'
   18 | const ll M=1000000007;
      |       ^~
Language: C++

#include<iostream>
using namespace std;

typedef long long ll;

ll N, M;
bool adj[200000][200000];
bool memo[200000];
const ll WHITE = 0;
const ll BLACK = 1;

bool DFS(int depth, ll pos){
    memo[pos] = BLACK;
    if(depth==2){
        if(pos==N-1) return true;
        else return false;
    }else{
        bool flag;
        flag = false;
        for(ll i=0; i<N; i++){
            if(adj[pos][i] && memo[i]==WHITE){
                flag = DFS(depth+1, i);
                if(flag) return flag;
            }
        }
        return flag;
    }
}

int main(){
    cin >> N >> M;
    ll a, b;
    for(ll i=0; i<N; i++){
        memo[i] = WHITE;
        for(ll j=0; j<N; j++){
            adj[i][j] = false;
        }
    }
    for(ll i=0; i<M; i++){
        cin >> a >> b;
        a--; b--;
        adj[a][b] = true;
        adj[b][a] = true;
    }
    if(DFS(0, 0)){
        cout << "POSSIBLE" << endl;
    }else{
        cout << "IMPOSSIBLE" << endl;
    }

}


Compiler output:
/tmp/ccK0l9uv.o: in function `DFS(int, long long)':
a.cc:(.text+0x12): relocation truncated to fit: R_X86_64_PC32 against symbol `memo' defined in .bss section in /tmp/ccK0l9uv.o
a.cc:(.text+0x7f): relocation truncated to fit: R_X86_64_PC32 against symbol `memo' defined in .bss section in /tmp/ccK0l9uv.o
/tmp/ccK0l9uv.o: in function `main':
a.cc:(.text+0x113): relocation truncated to fit: R_X86_64_PC32 against symbol `memo' defined in .bss section in /tmp/ccK0l9uv.o
collect2: error: ld returned 1 exit status