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

#pragma gcc optimize("Ofast")
#include <bits/stdc++.h>

using namespace std;
using ll = long long;

#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(V) (V).begin(),(V).end()
#define SORT(V) sort(ALL(V)) //小さい方からソート
#define REV(V) reverse(ALL(V)) //リバース
#define RSORT(V) SORT(V);REV(V) //大きい方からソート
#define NPN(V) next_permutation(ALL(V)) //順列
#define pb(n) push_back(n)
#define endl '\n'
#define Endl '\n'
#define DUMP(x)  cout << #x << " = " << (x) << endl
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define yes(n) cout << ((n) ? "yes" : "no"  ) << endl
#define Yay(n) cout << ((n) ? "Yay!": ":(") << endl
#define RAPID cin.tie(0);ios::sync_with_stdio(false)
#define VSUM(V) accumulate(ALL(V), 0)
#define MID(a,b,c) (a) < (b) && (b) < (c)
#define MIDe(a,b,c) (a) <= (b) && (b) <= (c)
#define IN(n) cin >> n
#define IN2(a,b) cin >> a >> b
#define IN3(a,b,c) cin >> a >> b >> c 
#define IN4(a,b,c,d) cin >> a >> b >> c >> d
#define VIN(V) for(int i = 0; i < (V).size(); i++) {cin >> (V).at(i);}
#define OUT(n) cout << n << endl
#define VOUT(V) REP(i, (V).size()) {cout << (V)[i] << endl;}
#define VOUT2(V) REP(i, (V).size()) {cout << (V)[i] << " ";} cout<<endl;

// 型マクロ定義
#define int long long
#define P pair<ll,ll>
#define Vi vector<ll>
#define VVi vector<vector<ll>>
#define Vd vector<double>
#define Vb vector<bool>
#define Vs vector<string>
#define Vc vector<char>
#define M map<ll,ll>
#define S set<ll>
#define PQ priority_queue<ll>
#define PQG priority_queue<ll,V,greater<ll>
//

template<class T> inline bool chmin(T& a, T b) {if(a>b){a=b;return true;}return false;}
template<class T> inline bool chmax(T& a, T b) {if(a<b){a=b;return true;}return false;}

const int MOD = 1000000007;
const int INF = 1061109567;
const double EPS = 1e-10;
const double PI  = acos(-1.0);

int gcd(int a,int b){return b != 0 ? gcd(b, a % b) : a;} //最大公約数
int lcm(int a, int b){return a * b / gcd(a, b);}
string toStrUp(string str){char diff = 'A'-'a';REP(i,str.size()) str[i] += diff;return str;}
string gCh(string str, int key){return str.substr(key,1);}

signed main() {
  RAPID;
  // デフォルト変数定義
  int n=0,m=0,a=0,b=0,c=0,d=0,x=0,y=0,z=0;
  string s="",t="";
  //

  // ここから
  IN2(n,m);
  Vi A(m);
  Vi B(m);
  REP(i,m){
    IN2(A[i],B[i]);
  }
  Vi V1;
  Vi V2;
  REP(i,m){
    if(A[i]==1　&& B[i]!=n) V1.pb(B[i]);
  }
  REP(i,m){
    if(B[i]==n && A[i]!=1) V2.pb(A[i]);
  }
  Vi result;
  set_intersection(V1.begin(), V1.end(),
                         V2.begin(), V2.end(),
                         inserter(result, result.end()));
  if(result.size()==0) OUT("IMPOSSIBLE");
  else OUT("POSSIBLE");
}

Compiler output:
a.cc:80:14: error: extended character 　 is not valid in an identifier
   80 |     if(A[i]==1　&& B[i]!=n) V1.pb(B[i]);
      |              ^
a.cc: In function 'int main()':
a.cc:80:14: error: unable to find numeric literal operator 'operator""\U00003000'
   80 |     if(A[i]==1　&& B[i]!=n) V1.pb(B[i]);
      |              ^~~
Language: Java

import java.util.*;
public class Main{
 public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
 
   int N = sc.nextInt();
   int M = sc.nextInt();
   boolean[] one_to_i = new boolean[N+1];
   boolean[] i_to_n = new boolean[N+1];
   tmpa = 0;
   tmpb = 0;
   for(int i=0;i<M;i++)
   {
     tmpa = sc.nextInt();
     tmpb = sc.nextInt(); 
     if(tmpa==1) one_to_i[tmpb] = true;
     if(tmpb==N) i_to_n[tmpa] = true;
   }
   boolean forans = false;
   String ans = "IMPOSSIBLE";
   for(int i=1;i<N;i++)
   {
     if(one_to_i[i])
     {
       if(i_to_n[i]) 
       {
         forans = true;
         break;
       }
     }
   }
   if(forans) ans = "POSSIBLE"; 
   System.out.println(ans);
 }
}

Compiler output:
Main.java:10: error: cannot find symbol
   tmpa = 0;
   ^
  symbol:   variable tmpa
  location: class Main
Main.java:11: error: cannot find symbol
   tmpb = 0;
   ^
  symbol:   variable tmpb
  location: class Main
Main.java:14: error: cannot find symbol
     tmpa = sc.nextInt();
     ^
  symbol:   variable tmpa
  location: class Main
Main.java:15: error: cannot find symbol
     tmpb = sc.nextInt(); 
     ^
  symbol:   variable tmpb
  location: class Main
Main.java:16: error: cannot find symbol
     if(tmpa==1) one_to_i[tmpb] = true;
        ^
  symbol:   variable tmpa
  location: class Main
Main.java:16: error: cannot find symbol
     if(tmpa==1) one_to_i[tmpb] = true;
                          ^
  symbol:   variable tmpb
  location: class Main
Main.java:17: error: cannot find symbol
     if(tmpb==N) i_to_n[tmpa] = true;
        ^
  symbol:   variable tmpb
  location: class Main
Main.java:17: error: cannot find symbol
     if(tmpb==N) i_to_n[tmpa] = true;
                        ^
  symbol:   variable tmpa
  location: class Main
8 errors
Language: C++

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

int main(){
  int n,m;cin >> n >> m;
  vector<int> x;
  bool f=false;
  for(int i=0;i<m;i++){
    int a,b;cin >> a >>b;
    if(a==1){
      if(find(x.begin(),x.end(),b)!=x.end()){
        cout << "POSSIBLE" << endl;f=true;break;
      }else{
        x.push_back(b);
      }
    }
    if(b==n){
      if(find(x.begin(),x.end(),a)!=x.end()){
        cout << "POSSIBLE" << endl;f=true;break;
      }else{
        x.push_back(a);
      }
    }
  }
  if(!f){cout << "IMPOSSIBLE" << endl;}

}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
   12 |       if(find(x.begin(),x.end(),b)!=x.end()){
      |          ~~~~^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:12:14: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   12 |       if(find(x.begin(),x.end(),b)!=x.end()){
      |          ~~~~^~~~~~~~~~~~~~~~~~~~~
a.cc:19:14: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
   19 |       if(find(x.begin(),x.end(),a)!=x.end()){
      |          ~~~~^~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:19:14: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   19 |       if(find(x.begin(),x.end(),a)!=x.end()){
      |          ~~~~^~~~~~~~~~~~~~~~~~~~~
Language: C++

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

int main() {
  int n, m;
  cin >> n >> m;
  vector<int> a(200002, 0);
  string out;
  for(int i = 0; i < m; i++){
    int c, d;
    cin >> c >> d;
    if(c == 1) a.at(d)++;
    if(d == n) b.at(c)++;
    if(a.at(d) == 2){
      out = "POSSIBLE";
    }
    if(a.at(c) == 2){
      out = "POSSIBLE";
    }
  }
  out = "IMPOSSIBLE";
  cout << out;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: 'b' was not declared in this scope
   13 |     if(d == n) b.at(c)++;
      |                ^
Language: C++

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

int main() {
  int n, m;
  cin >> n >> m;
  vector<int> a(200002, 0);
  for(int i = 0; i < m; i++){
    int c, d;
    cin >> c >> d;
    if(c == 1) a.at(d)++;
    if(d == n) b.at(c)++;
    if(a.at(d) == 2){
      cout << "POSSIBLE";
      return 0;
    }
    if(a.at(c) == 2){
      cout << "POSSIBLE";
      return 0;
    }
  }
  cout << "IMPOSSIBLE";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: 'b' was not declared in this scope
   12 |     if(d == n) b.at(c)++;
      |                ^
Language: C++

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

int main() {
  int n, m;
  cin >> n >> m;
  vector<int> a(200002, 0), b(200002, 0);
  for(int i = 0; i < m; i++){
    int c, d;
    cin >> c >> d;
    if(c == 1) a.at(d) = 1;
    if(d == n) a.at(c) = 1;
  }
  for(int i = 0; i < 200002; i++){
    if(c.at(i) + d.at(i) == 2){
      cout << "POSSIBLE";
      return 0;
    }
  }
  cout << "IMPOSSIBLE";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:8: error: 'c' was not declared in this scope
   15 |     if(c.at(i) + d.at(i) == 2){
      |        ^
a.cc:15:18: error: 'd' was not declared in this scope
   15 |     if(c.at(i) + d.at(i) == 2){
      |                  ^
Language: C++

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

int main() {
  int n, m;
  cin >> n >> m;
  priority_queue<int> a, b;
  for(int i = 0; i < m; i++){
    int c, d;
    cin >> c >> d;
    if(c == 1) b.push(d);
    if(d == n) a.push(-c);
  }
  vector<int> e;
  while(!a.empty()){
    e.push_back(-a.top());
    a.pop;
  }
  while(!b.empty()){
    for(int i = e.size() - 1; i > 0; i--){
      if(e.at(i) == b.top()){
        cout << "POSSIBLE";
        return 0;
      }else if(e.at(i) > b.top()){
        b.pop();
        break;
      }
    }
  }
  cout << "IMPOSSIBLE";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:7: error: invalid use of non-static member function 'void std::priority_queue<_Tp, _Sequence, _Compare>::pop() [with _Tp = int; _Sequence = std::vector<int>; _Compare = std::less<int>]'
   17 |     a.pop;
      |     ~~^~~
In file included from /usr/include/c++/14/queue:66,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:157,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_queue.h:771:7: note: declared here
  771 |       pop()
      |       ^~~
Language: C++

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

int main() {
  int n, m;
  cin >> n >> m;
  vector<pair<int, int>> p(m), P(m);
  for(int i = 0; i < m; i++){
    cin >> p.at(i).first >> p.at(i).second;
    P.at(i).second = p.at(i).first;
    P.at(i).first = p.at(i).second;
  }
  sort(p.begin(), p.end());
  vector<int> c;
  for(int i = 0; i < m; i++){
    if(p.at(i).first != 1) break;
    c.push(p.at(i).second);
  }
  sort(P.begin(), P.end());
  vector<int> d;
  for(int i = m - 1; i > -1; i--){
    if(P.at(i).first != n) break;
    d.push(P.at(i).second);
  }
  for(int i = 0; i < c.size(); i++){
    for(int j : d){
      if(c.at(i) == j){
        cout << "POSSIBLE";
        return 0;
      }
      if(i == c.size() - 1){
        cout << "IMPOSSIBLE";
      }
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:7: error: 'class std::vector<int>' has no member named 'push'
   17 |     c.push(p.at(i).second);
      |       ^~~~
a.cc:23:7: error: 'class std::vector<int>' has no member named 'push'
   23 |     d.push(P.at(i).second);
      |       ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  queue <int>x,y;
  int n,m;
  cin >> n >> m;
  int a[n];
  int b[n];
  int i;
  int chk = 0;
  for(i=0;i<n;i++){
    cin >> a[i] >> b[i];
    if(a[i]==1)x.push(b[i]);
  }
  for(i=0;i<n;i++){
    if(b[i]==n){
      y=x;
      while(!y.enpty()){
        if(y.front()==a[i]){
          chk = 1;
          i=1000000;
          break;
        }
        y.pop();      
      }
    }
  }
  if(chk==1)cout << "POSSIBLE";
  else cout << "IMPOSSIBLE";
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:16: error: 'class std::queue<int>' has no member named 'enpty'; did you mean 'empty'?
   18 |       while(!y.enpty()){
      |                ^~~~~
      |                empty
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(false); cin.tie(0);
#define FOR(i,s,n) for(int i = s; i < (n); i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(n) (n).begin(), (n).end()
#define RALL(n) (n).rbegin(), (n).rend()
#define ATYN(n) cout << ( (n) ? "Yes":"No") << endl;
#define CFYN(n) cout << ( (n) ? "YES":"NO") << endl;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int,int>;

int main(void)
{
    IOS
    int n, m;
    cin >> n >> m;
    map<int,bool> s,g;
    REP(i,m){
        int a, b;
        cin >> a >> b;
        if (a == 1) s[b] = true;
        if (b == n) g[a] = true;

    }

    bool ans = false;
    for(auto x:s) {
        if (g[x.first]) {
            ans = true;
            break;
    }

    string str = ans ? "POSSIBLE" : "IMPOSSIBLE";
    cout << str << endl;

    return 0;
}

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

#include <iostream>
#include <cmath>
#include <vector>
#include <string>
#include <ctime>
#include <climits>
#include <iomanip>
#include <fstream>
#include <sstream>
#include <algorithm>
#include <utility>
#include <cstdlib>

using namespace std;
long int pow107 = (int)pow(10, 9) + 7;
int ilimit = INT_MAX;
long int llimit = LONG_MAX;

bool comp(pair<int, int> a, pair<int, int> b){
    if(a.first != b.first) return a.first > b.first;
    else return a.second < b.second;
}

long int jou(long int x, long int y){
    long int f = 1;
    for(int i = 0; i < y; ++i){
        f = f * x % pow107;
    }
    return f;
}

bool pn(long int x){
    if(x != 2 && x % 2 == 0)
        return false;
    for(int i = 3; i < x; ++i){
        if(x != i && x % i == 0)
            return false;
    }
    return true;
}

long int factorial(long int n){
    long int f = 1;
    for(long int i = 1; i <= n; ++i){
        f = f * i % pow107;
    }
    return f;
}

int Func2(int n,int m){
    long int s2 = 1,
        r = 1;


    for(int i = 1; i <= m; ++i){
        s2 = (s2*(n - (i - 1))/i) % pow107;
    }

    return s2;
}

//long intの最大llimit
//intの最大ilimit
//10^9+7    pow107
//素数pn
//n乗jou
//階乗factorial
//コンビネーションFunc2

int main(){
    vector<pair<int,int> > v;
    int n,m;
    cin >> n >> m;
    for(int i = 0; i < m ; ++i){
        int a,b;
        cin >> a >> b;
        v.push_back(make_pair(b,a));
    }

    sort(v.begin(),v.end(),comp;
    for(int i = 0; i < m; ++i){
        if(v[i].first != n){
            break;
        }
        if(v[i].second == 1){
            cout << "POSSIBLE" << endl;
            return 0;
        }
        for(int j = 0; j < m; ++j){
            if(v[i].second == v[j].first){
                if(v[j].second == 1){
                    cout << "POSSIBLE" << endl;
                    return 0;
                }
            }
        }
    }
    cout << "IMPOSSIBLE" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:80:32: error: expected ')' before ';' token
   80 |     sort(v.begin(),v.end(),comp;
      |         ~                      ^
      |                                )
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define REP(i,n) for(int i=0;i<(n);i++)
#define REP2(i,a,b) for(int i=(a);i<(b);i++)
#define ALL(v) (v).begin(),(v).end()
#define INF 2e9
typedef long long ll;

int main()
{
  int n,m;
  cin>>n>>m;
  vector<pair<int,int>> a_n,b_1;
  REP(i,m){
    int temp_a,temp_b;
    cin>>temp_a>>temp_b;
    if(temp_a==1) b.emplace_back(b);
    if(temp_b==n) a.emplace_back(a);
  }

  REP(i,a.size()){
    REP(j,b.size()){
      if(a[i]==b[j]){
        cout<<"POSSIBLE"<<endl;
        return 0;
      }
    }
  }
  cout<<"IMPOSSIBLE"<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:19: error: 'b' was not declared in this scope
   17 |     if(temp_a==1) b.emplace_back(b);
      |                   ^
a.cc:18:19: error: 'a' was not declared in this scope
   18 |     if(temp_b==n) a.emplace_back(a);
      |                   ^
a.cc:21:9: error: 'a' was not declared in this scope
   21 |   REP(i,a.size()){
      |         ^
a.cc:3:33: note: in definition of macro 'REP'
    3 | #define REP(i,n) for(int i=0;i<(n);i++)
      |                                 ^
a.cc:22:11: error: 'b' was not declared in this scope
   22 |     REP(j,b.size()){
      |           ^
a.cc:3:33: note: in definition of macro 'REP'
    3 | #define REP(i,n) for(int i=0;i<(n);i++)
      |                                 ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define REP(i,n) for(int i=0;i<(n);i++)
#define REP2(i,a,b) for(int i=(a);i<(b);i++)
#define ALL(v) (v).begin(),(v).end()
#define INF 2e9
typedef long long ll;

int main()
{
  int n,m;
  cin>>n>>m;
  vector<pair<int,int>> p;
  REP(i,m){
    int a,b;
    cin>>a>>b;
    if(a==1 || b==n) p[i].emplace_back(make_pair(a,b));
  }

  int l=p.size();
  REP(i,l){
    if(p[i].second==n){
      REP(j,l){
        if(p[j].second==p[i].first && p[j].first==1){
          cout<<"POSSIBLE"<<endl;
          return 0;
        }
      }
    }
  }
  cout<<"IMPOSSIBLE"<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:27: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 'emplace_back'
   17 |     if(a==1 || b==n) p[i].emplace_back(make_pair(a,b));
      |                           ^~~~~~~~~~~~
Language: C++

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

// nがbc.at(a)とbc.at(b)の間に存在するか、二分探索
bool search2(int n, vector<int> &bc, int a, int b){
  // 二分探索なので中間をとる。中間と一致すればok
  int c = a + (b-a)/2;
  if (n == bc.at(c)){
    return true;
  }else if (n > bc.at(c)){
    //中間よりでかいならもっと右だが、右がないならサヨナラ
    if (c+1 == bc.size()){
      return false;
    }else{
      return search2(n, bc, c+1, b);
    }
  }else if (n < bc.at(c)){
    //中間より小さいならもっと左だが、左がないならサヨナラ
    if (c-1 == -1){
      return false;
    }else{
      return search2(n, bc, a, c-1);
    }
  }
}

// nがbcの中に存在するか
bool search(int n, vector<int> &bc){
  return search2(n, bc, 0, bc.size()-1);
}

int main() {
  int n,m; cin >>n >>m;
  vector<int> a(m), b(m);
  vector<int> ac, bc;
  for (int i=0; i<m; i++){
    cin >>a.at(i) >>b.at(i);
    if (a.at(i)==1) ac.push_back(b.at(i));
    if (b.at(i)==n) bc.push_back(a.at(i));
  }
  sort(ac.begin(), ac.end());
  sort(bc.begin(), bc.end());
  //acには島1から行ける島を突っ込んでソート
  //bcには島Nに行ける島を突っ込んでソート
  //ac,bcに共通する島があればいける
  
  bool possible;
  if (ac.size()*bc.size()==0){
    possible=false; // 便通ってなかったら無理
  }else{
    for (int i=0; i<ac.size(); i++){
      if (i!=0 && i=i-1){
        continue;
      }
      //acの要素がbc内にあればok
      if (search(ac.at(i),bc)){
        possible=true;
        break;
      }
    }
  }
  
  if(possible) cout <<"POSSIBLE" <<endl;
  else cout <<"IMPOSSIBLE" <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:52:16: error: lvalue required as left operand of assignment
   52 |       if (i!=0 && i=i-1){
      |           ~~~~~^~~~
a.cc: In function 'bool search2(int, std::vector<int>&, int, int)':
a.cc:25:1: warning: control reaches end of non-void function [-Wreturn-type]
   25 | }
      | ^
Language: Java

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = Integer.parseInt(sc.next());
		int m = Integer.parseInt(sc.next());

		HashSet<Integer> aSet = new HashSet<>();
		HashSet<Integer> bSet = new HashSet<>();

		for (int i=0; i<m; i++){
			int a = Integer.parseInt(sc.next());
			int b = Integer.parseInt(sc.next());
			if ( a == 1){
				bSet.add(b);
			}
			if ( b == n){
				aSet.add(a);
			}
		}
		aSet.retainAll(bSet);

		if (aSet.size() == 0){
			System.out.println("IMPOSSIBLE");
		}else {
			System.out.println("POSSIBLE");
		}
	}
}

Compiler output:
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
Main.java:8: error: cannot find symbol
		HashSet<Integer> aSet = new HashSet<>();
		^
  symbol:   class HashSet
  location: class Main
Main.java:8: error: cannot find symbol
		HashSet<Integer> aSet = new HashSet<>();
		                            ^
  symbol:   class HashSet
  location: class Main
Main.java:9: error: cannot find symbol
		HashSet<Integer> bSet = new HashSet<>();
		^
  symbol:   class HashSet
  location: class Main
Main.java:9: error: cannot find symbol
		HashSet<Integer> bSet = new HashSet<>();
		                            ^
  symbol:   class HashSet
  location: class Main
6 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
#define rep(i, n) for(int i = 0; i < (n); i++)

int int_len(int n) {
  int s=0;
  while(n!=0) s++, n/=10;
  return s;
}

int int_sum(int n) {
  int m=0,s=0,a=n;
  while(a!=0) s++, a/=10;
  for(int i=s-1;i>=0;i--) m+=n/((int)pow(10,i))-(n/((int)pow(10,i+1)))*10;
  return m;
}






int gcd(int a,int b)
{
 
  int r, tmp;
 
  
 
  /* 自然数 a > b を確認・入替 */
  if(a<b){
    tmp = a;
    a = b;
    b = tmp;
  }
 
  /* ユークリッドの互除法 */
  r = a % b;
  while(r!=0){
    a = b;
    b = r;
    r = a % b;
  }
 
 
 
  return b;
}







int fac(int n){
  int m=1;
  while(n>=1) m*=n,n--;
  return m;
}

int vec_sum(vector<int> v){
  int n=0;
  for(int i=0;i<v.size();i++) n+=v[i];
  return n;
}
///////////////////////////
int main() {
  bool flag=false;
  int n,m;
  cin>>n>>m;
  vector<int> a(m),b(m),v
  rep(i,m) cin>>a[i]>>b[i];
  rep(i,m){
    if(a[i]==1 && b[i]==n){
      cout<<"POSSIBLE"<<endl;
      return 0;
    }
    if(a[i]==1){
      v.push_back(b[i]);
    }
    if(b[i]==n){
      v.push_back(a[i]);
    }
  }
  sort(v.begin(),v.end());
  if(v.size()<=1){
    cout<<"IMPOSSIBLE"<<endl;
    return 0;
  }
  
  for(int i=0;i<v.size();i++){
    if(v[i]==v[i+1]){
      cout<<"POSSIBLE"<<endl;
      return 0;
    }
  }
  cout<<"IMPOSSIBLE"<<endl;
  
  
}
///////////////////////////

Compiler output:
a.cc: In function 'int main()':
a.cc:4:19: error: expected initializer before 'for'
    4 | #define rep(i, n) for(int i = 0; i < (n); i++)
      |                   ^~~
a.cc:74:3: note: in expansion of macro 'rep'
   74 |   rep(i,m) cin>>a[i]>>b[i];
      |   ^~~
a.cc:74:7: error: 'i' was not declared in this scope
   74 |   rep(i,m) cin>>a[i]>>b[i];
      |       ^
a.cc:4:34: note: in definition of macro 'rep'
    4 | #define rep(i, n) for(int i = 0; i < (n); i++)
      |                                  ^
a.cc:81:7: error: 'v' was not declared in this scope
   81 |       v.push_back(b[i]);
      |       ^
a.cc:84:7: error: 'v' was not declared in this scope
   84 |       v.push_back(a[i]);
      |       ^
a.cc:87:8: error: 'v' was not declared in this scope
   87 |   sort(v.begin(),v.end());
      |        ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
#define rep(i, n) for(int i = 0; i < (n); i++)

int int_len(int n) {
  int s=0;
  while(n!=0) s++, n/=10;
  return s;
}

int int_sum(int n) {
  int m=0,s=0,a=n;
  while(a!=0) s++, a/=10;
  for(int i=s-1;i>=0;i--) m+=n/((int)pow(10,i))-(n/((int)pow(10,i+1)))*10;
  return m;
}






int gcd(int a,int b)
{
 
  int r, tmp;
 
  
 
  /* 自然数 a > b を確認・入替 */
  if(a<b){
    tmp = a;
    a = b;
    b = tmp;
  }
 
  /* ユークリッドの互除法 */
  r = a % b;
  while(r!=0){
    a = b;
    b = r;
    r = a % b;
  }
 
 
 
  return b;
}







int fac(int n){
  int m=1;
  while(n>=1) m*=n,n--;
  return m;
}

int vec_sum(vector<int> v){
  int n=0;
  for(int i=0;i<v.size();i++) n+=v[i];
  return n;
}
///////////////////////////
int main() {
  int n,m;
  cin>>n>>m;
  vector<int> a(m),b(m),v,w;
  rep(i,m) cin>>a[i]>>b[i];
  rep(i,m){
    if(a[i]==1){
      v.push_back(b[i]);
    }
    if(b[i]==n){
      w.push_back(a[i]);
    }
  }
  sort(v.begin(),v.end());
  sort(w.begin(),w.end());
  for(auto p:v){
    for(auto q:w){
      if(p==q){
        flag=true;
        break;
      }
    }
  }
  
  if(flag){
    cout<<"POSSIBLE"<<endl;
  }else{
    cout<<"IMPOSSIBLE"<<endl;
  }
  
  
  
  
  
  
}
///////////////////////////

Compiler output:
a.cc: In function 'int main()':
a.cc:87:9: error: 'flag' was not declared in this scope
   87 |         flag=true;
      |         ^~~~
a.cc:93:6: error: 'flag' was not declared in this scope
   93 |   if(flag){
      |      ^~~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#include <map>
#include <set>
#include <queue>
#include <list>
#define rep(i,n) for(int i=0;i<(n);i++)
#define REP(i,a,b) for(int i=int(a);i<int(b);++i)
#define crep(i) for(char i='a';i<='z';i++)
#define psortsecond(A,N) sort(A,A+N,[](const pii &a, const pii &b){return a.second<b.second;});
#define psortfirst(A,N) sort(A,A+N,[](const pii &a, const pii &b){return a.first<b.first;});
#define ALL(x) (x).begin(),(x).end()
int ctoi(const char c){
  if('0' <= c && c <= '9') return (c-'0');
  return -1;
}
using namespace std;
using pii  = pair<int,int>;
long long gcd(long long a, long long b){return (b == 0 ? a : gcd(b, a%b));}
long long lcm(long long a, long long b){return a*b/gcd(a,b);}
typedef long long ll;
#define MOD 1000000007
#define EPS 10e-8
#define N 200000
bool sx[N+1], xe[N+1];
int n, m, a, b;
int main() {
    cin >> n >> m;
    REP(i, m) {
        cin >> a >> b;
        if (a == 1) {
            sx[b] = true;
        } else if (b == n) {
            xe[a] = true;
        }
    }
    string ans = "IMPOSSIBLE";
    REP(i, n) {
        if (sx[i] && xe[i]) {
            ans = "POSSIBLE";
            break;
        }
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc:35:13: error: macro "REP" requires 3 arguments, but only 2 given
   35 |     REP(i, m) {
      |             ^
a.cc:14:9: note: macro "REP" defined here
   14 | #define REP(i,a,b) for(int i=int(a);i<int(b);++i)
      |         ^~~
a.cc:44:13: error: macro "REP" requires 3 arguments, but only 2 given
   44 |     REP(i, n) {
      |             ^
a.cc:14:9: note: macro "REP" defined here
   14 | #define REP(i,a,b) for(int i=int(a);i<int(b);++i)
      |         ^~~
a.cc: In function 'int main()':
a.cc:35:5: error: 'REP' was not declared in this scope
   35 |     REP(i, m) {
      |     ^~~
a.cc:44:8: error: expected ';' before '{' token
   44 |     REP(i, n) {
      |        ^      ~
      |        ;
Language: C++

#include <bits/stdc++.h>
#define FOR(i,a,b) for (int i = (a); i < (b); ++i)
#define RFOR(i,a,b) for (int i = (b)-1; i >= (a); --i)
#define REP(i,n) FOR(i,0,(n))
#define REPS(i,n) FOR(i,1,(n)+1)
#define RREP(i,n) RFOR(i,0,(n))
#define ALL(x) (x).begin(),(x).end()
#define RALL(x) (x).rbegin(),(x).rend()
#define DEBUG(x)  cout << #x << " = " << (x) << endl;
#define SORT(x) sort(ALL(x));
#define RSORT(x) sort(RALL(x));
#define SUM(x) accumulate(ALL(x),0);
#define FI first
#define SE second
#define PB push_back
#define EB emplace_back
#define SZ(x) (int)(x).size()
#define BN(x) ((1<<x)-1)
#define DUP(x,y) (((x)+(y)-1)/(y))
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using pii = pair<int, int>;
using tiii = tuple<int, int, int>;
const ll mod = 1e9+7;
const int INF = (1<<30)-1;
const ll INFLL = (1LL<<62)-1;
const int dx[4] = {1,0,-1,0};
const int dy[4] = {0,1,0,-1};
//cout << fixed << setprecision(10);

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }

ll gcd(ll a, ll b) { return b ? gcd(b,a%b) : a;}
ll lcm(ll a, ll b) { return a/gcd(a,b)*b;}

int N, M;
const int MAXN = 200005;
vi to[MAXN];

int main () {
  cin >> N >> M;
  REP(i,M) {
    int a, b;
    cin >> a >> b;
    a--, b--;
    to[a].push_back(b);
  }

  for (auto c : to[0]) {
    for (auto d : to[c]) {
      if (d == N-1) {
        cout << "POSSIBLE" << endl;
        return 0;
      }
    }
  }
  
  cout << "IMPOSSIBLE" <<< endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:62:26: error: expected primary-expression before '<' token
   62 |   cout << "IMPOSSIBLE" <<< endl;
      |                          ^
Language: C++

#include<iostream>
#include<algorithm>
#include<cmath>
#include<iomanip>
#include<map>
using namespace std;
int main() {
  int n,m,a[200005]={},b[200005]={};
  cin >> n >> m;
  for(int i=0; i<m; i++) {
    int c,d;
    cin >> c >> d;
    if(c==1) {
      b[d]++;
    }
    if(d==n) {
      b[a]++;
    }
  }
  for(int i=1; i<=n; i++) {
    if(b[i]==2) {
      cout << "POSSIBLE" << endl;
      return 0;
    }
  }
  cout << "IMPOSSIBLE" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:8: error: invalid types 'int [200005][int [200005]]' for array subscript
   17 |       b[a]++;
      |        ^
Language: C++

#include<iostream>
#include<algorithm>
#include<cmath>
#include<iomanip>
#include<map>
using namespace std;
int main() {
  int n,m,a[200005]={},b[200005]={};
  cin >> n >> m;
  for(int i=0; i<m; i++) {
    int c,d;
    cin >> c >> d;
    if(a==1) {
      b[d]++;
    }
    if(b==n) {
      b[a]++;
    }
  }
  for(int i=1; i<=n; i++) {
    if(b[i]==2) {
      cout << "POSSIBLE" << endl;
      return 0;
    }
  }
  cout << "IMPOSSIBLE" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |     if(a==1) {
      |        ~^~~
a.cc:16:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |     if(b==n) {
      |        ~^~~
a.cc:17:8: error: invalid types 'int [200005][int [200005]]' for array subscript
   17 |       b[a]++;
      |        ^
Language: C++

#include<iostream>
#include<unordered_map>
using namespace std;

int main(){
	int n, m;
	unordered_map <int, int> m;
	cin >> n >> m;
	for(int i=0; i<m; i++){
		int a, b;
		cin >> a >> b;
		if(a==1){
			m[b] |= 1;
			if(m[b]==3) {
				cout << "POSSIBLE";
				return 0;
			}
		} else if (b == 1) {
			m[a] |= 1;
			if(m[a]==3) {
				cout << "POSSIBLE";
				return 0;
			}
		} else if (a == n) {
			m[b] |= 2;
			if(m[b]==3) {
				cout << "POSSIBLE";
				return 0;
			}
		} else if (b == n) {
			m[a] |= 2;
			if(m[a]==3) {
				cout << "POSSIBLE";
				return 0;
			}
		}
	}
	cout << "IMPOSSIBLE";
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:7:34: error: conflicting declaration 'std::unordered_map<int, int> m'
    7 |         unordered_map <int, int> m;
      |                                  ^
a.cc:6:16: note: previous declaration as 'int m'
    6 |         int n, m;
      |                ^
a.cc:13:26: error: invalid types 'int[int]' for array subscript
   13 |                         m[b] |= 1;
      |                          ^
a.cc:14:29: error: invalid types 'int[int]' for array subscript
   14 |                         if(m[b]==3) {
      |                             ^
a.cc:19:26: error: invalid types 'int[int]' for array subscript
   19 |                         m[a] |= 1;
      |                          ^
a.cc:20:29: error: invalid types 'int[int]' for array subscript
   20 |                         if(m[a]==3) {
      |                             ^
a.cc:25:26: error: invalid types 'int[int]' for array subscript
   25 |                         m[b] |= 2;
      |                          ^
a.cc:26:29: error: invalid types 'int[int]' for array subscript
   26 |                         if(m[b]==3) {
      |                             ^
a.cc:31:26: error: invalid types 'int[int]' for array subscript
   31 |                         m[a] |= 2;
      |                          ^
a.cc:32:29: error: invalid types 'int[int]' for array subscript
   32 |                         if(m[a]==3) {
      |                             ^
Language: C++

#include<bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;

const int nmax = 200002;
bool graph[nmax][nmax];
int n, m;
bool frag = false;

void dfs(int v, int depth) {
  if (depth == 2 && v == n-1) frag = true;
  if (depth > 2) return;
  rep(i, n) {
    if (!graph[v][i]) continue;
    dfs(i, depth+1);
  }
}

int main() {
  cin >> n >> m;
  rep(i, m) {
    int x, y;
    cin >> x >> y;
    graph[x-1][y-1] = graph[y-1][x-1] = true;
  }
  dfs(0, 0);
  if (frag) printf("POSSIBLE\n");
  else printf("IMPOSSIBLE\n");
}


Compiler output:
/tmp/ccyh5qx1.o: in function `dfs(int, int)':
a.cc:(.text+0x16): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccyh5qx1.o
a.cc:(.text+0x24): relocation truncated to fit: R_X86_64_PC32 against symbol `frag' defined in .bss section in /tmp/ccyh5qx1.o
a.cc:(.text+0x7c): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccyh5qx1.o
/tmp/ccyh5qx1.o: in function `main':
a.cc:(.text+0x95): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccyh5qx1.o
a.cc:(.text+0xb1): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccyh5qx1.o
a.cc:(.text+0x167): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccyh5qx1.o
a.cc:(.text+0x186): relocation truncated to fit: R_X86_64_PC32 against symbol `frag' defined in .bss section in /tmp/ccyh5qx1.o
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i=0; i < (int)(n); i++)
#define FINAL_OUT(x) {cout << (x) << endl;} 

int main(void) {

	int a, b, N, M;
	bool s[200010];
	bool t[200010];

	cin >> N >> M;

	for (int i = 0; i < M; i++) {
		cin >> a >> b;
		if (a == 1) s[b] = true;
		if (b == N) t[a] = true;
	}

	for (int i = 2; i < N; i++) {
		if (s[i] = true && t[i] = true) {
			FINAL_OUT("POSSIBLE");
		}
		FINAL_OUT("POSSIBLE");
	}
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:21:33: error: lvalue required as left operand of assignment
   21 |                 if (s[i] = true && t[i] = true) {
      |                            ~~~~~^~~~~~~
Language: C++


#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i=0; i < (int)(n); i++)

int main() {
  
  int a,b, N, M;
  bool s[200010];
  bool t[200010];
  
  cin >> N >> M;
  
  for(int i = 0; i < M; i++){
  cin >> a >> b;
  if(a==1) s[b] = true;
  if(b==N) t[a] = true;
  }
  
  for(int i = 2; i < N; i++)
    if(s[i]&t[i])
      FINAL_OUT("POSSIBLE");
  FINAL_OUT("IMPOSSIBLE");  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:7: error: 'FINAL_OUT' was not declared in this scope
   22 |       FINAL_OUT("POSSIBLE");
      |       ^~~~~~~~~
a.cc:23:3: error: 'FINAL_OUT' was not declared in this scope
   23 |   FINAL_OUT("IMPOSSIBLE");
      |   ^~~~~~~~~
Language: C++

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

using namespace std;

int main(){
  int N, M;
  cin >> N >> M;
  
  vector<int> ab, ba;
  
  for(int i = 0; i < M; i++){
    int a, b;
    cin >> a >> b;
    if(a == 1) ab.push_back(b);
    if(b == 1) ab.push_back(a);
    if(a == N) ba.push_back(b);
    if(b == N) ba.push_back(a);
  }
  
  sort(ab.begin(), ab.end());
  sort(ab.begin(), ab.end());
  
  bool flag = false;
  int i ,j = 0;
  while(i < ab.size() && j < ba.size()){
    if(ab[i] == ba[j]){
      flag = true;
      break
    }else if(ab[i] > ba[j]){
      j++;
    }else if(ab[i] < ba[j]){
      i++;
    }
  }
  if(flag) cout << "POSSIBLE";
  else cout << "IMPOSSIBLE";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:12: error: expected ';' before '}' token
   30 |       break
      |            ^
      |            ;
   31 |     }else if(ab[i] > ba[j]){
      |     ~
Language: C++

#include <iostream>
#include <vector>
#include <unorderd_map>
#include <map>

using namespace std;



int main(){
  int N ,M;
  cin >> N >> M;
  
  unorderd_map<pair<int, int>, int> mp;
  
  for(int i = 0; i < M; i++){
    int a ,b;
    cin >> a >> b;
    pair<int, int> m = make_pair(a, b);
    pair<int, int> ivm = make_pair(b, a);
    mp[m]++;
    mp[ivm]++;
  }
  
  bool ans = false;
  if(mp[make_pair(1,N)]) ans = true;
  for(int i = 1; i <= N; i++){
    if(mp[make_pair(1,i)] && mp[make_pair(i,N)]) ans = true;
  }
  if(ans) cout << "POSSIBLE";
  else cout << "IMPOSSIBLE";
}


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

#include <iostream>
#include <vector>
#include <unorderd_map>
#include <map>

using namespace std;



int main(){
  int N ,M;
  cin >> N >> M;
  
  unorderd_map<pair<int, int>, int> mp;
  
  for(int i = 0; i < M; i++){
    int a ,b;
    cin >> a >> b;
    pair<int, int> m = make_pair(a, b);
    pair<int, int> ivm = make_pair(b, a);
    mp[m]++;
    mp[ivm]++;
  }
  
  bool ans = false;
  if(mp[make_pair(1,N)]) ans = true;
  for(int i = 1; i <= N; i++){
    if(mp[make_pair(1,i)] && mp[make_pair(i,N)]) ans = true;
  }
  if(ans) cout << "POSSIBLE";
  else cout << "IMPOSSIBLE";
}

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

#include <iostream>
#include <vector>
#include <unorderd_map>

using namespace std;

int N, M;

int main(){
  cin >> N >> M;
  
  unorderd_map<int, int> mp;
  
  for(int i = 0; i < M; i++){
    int a, b;
    cin >> a >> b;
    if(a > b){
      int t = a;
      a = b;
      b = t;
    }
    mp[a] = b;
  }
  
  bool ans = false;
  
  for(int i = 1; i <= N; i++){
    if(mp[1] == i && mp[i] == N) ans = true;
  }
  
  if(ans) cout << "POSSIBLE";
  else cout << "IMPOSSIBLE";
  
}

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

#include <iostream>
#include <vector>

using namespace std;

int main(){
  int N, M;
  cin >> N >> M;
  
  bool G[N][N] = {false};
  
  int a[M] b[M];
  for(int i = 0; i < M; i++){
    cin >> a[i] >> b[i];
    a[i]--;
    b[i]--;
    G[a[i]][b[i]] = G[b[i]][a[i]] = true;
  }
  bool ans = false;
  for(int i = 0; i < N; i++){
    if(G[i][0] && G[i][N-1]){
      ans = true;
      break;
    }
  }
  if(ans) cout << "POSSIBLE";
  else cout << "IMPOSSIBLE";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: error: expected initializer before 'b'
   12 |   int a[M] b[M];
      |            ^
a.cc:14:12: error: 'a' was not declared in this scope
   14 |     cin >> a[i] >> b[i];
      |            ^
a.cc:14:20: error: 'b' was not declared in this scope
   14 |     cin >> a[i] >> b[i];
      |                    ^
Language: C++

#include <iostream>
#include <vector>

using namespace std;

void visit(int v, int hop, vector<bool> &visited, vector<vector<bool>> &G){
  if(hop == 2) return;
  visited[v] = true;
  for(int v2 = 0; v2 < N; v2++){
    if(visited[v2])continue;
    if(G[v][v2] == false) continue;
    visit(v2, hop+1, visited, G);
  }
}

int main(){
  int N, M;
  cin >> N >> M;
  vector<bool> visited(N,false);
  vector<vector<bool>> G(N, vector<bool>(N, false));
  //bool G[N][N];と等価
  
  vector<int> a(M,0);
  vector<int> b(M,0);
  
  for(int i = 0; i < M; i++){
    cin >> a[i] >> b[i];
    a[i]--;
    b[i]--;
    G[a[i]][b[i]] = G[b[i]][a[i]] = true;
  }
  
  visit(1,0, visited, G);
  
  if(visited[N-1]) cout << "POSSIBLE";
  else cout << "IMPOSSIBLE";

}


Compiler output:
a.cc: In function 'void visit(int, int, std::vector<bool>&, std::vector<std::vector<bool> >&)':
a.cc:9:24: error: 'N' was not declared in this scope
    9 |   for(int v2 = 0; v2 < N; v2++){
      |                        ^
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int main(){
  int N, M;
  cin >> N >> M;
  vector<bool> visited(N,false);
  vector<vector<bool>> G(N, vector<bool>(N, false));
  //bool G[N][N];と等価
  
  vector<int> a(M,0);
  vector<int> b(M,0);
    
  void visit(int v, int hop, vector<bool> &visited, vector<vector<bool>> &G){
    if(hop == 2) return;
    visited[v] = true;
    for(int v2 = 0; v2 < N; v2++){
      if(visited[v2])continue;
      if(G[v][v2] == false) continue;
      visit(v2, hop+1, visited, G);
    }
  }
  
  for(int i = 0; i < M; i++){
    cin >> a[i] >> b[i];
    a[i]--;
    b[i]--;
    G[a[i]][b[i]] = G[b[i]][a[i]] = true;
  }
  
  visit(1,0, visited, G);
  
  if(visited[N-1]) cout << "POSSIBLE";
  else cout << "IMPOSSIBLE";

}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:77: error: a function-definition is not allowed here before '{' token
   16 |   void visit(int v, int hop, vector<bool> &visited, vector<vector<bool>> &G){
      |                                                                             ^
a.cc:33:3: error: 'visit' was not declared in this scope
   33 |   visit(1,0, visited, G);
      |   ^~~~~
a.cc:3:1: note: 'std::visit' is defined in header '<variant>'; this is probably fixable by adding '#include <variant>'
    2 | #include <vector>
  +++ |+#include <variant>
    3 |
Language: C++

#include <bits/stdc++.h>
#define rep(i,a,b) for(ll i=ll(a);i<ll(b);i++)
#define irep(i,a,b) for(ll i=ll(a);i>=ll(b);i--)
using ll = long long;
using namespace std;


int main(){
	ll n,m;
	cin>>n>>m;
    ll a[m],b[m];
    rep(i,0,m)cin>>a[i]>>b[i];
    vector <ll> s,e;
    bool p=false;
    rep(i,0,m){
        if(a[i]==1)s.push_back(i);
        else if(b[i]==n)e.push_back(i);
    }
    rep(i,0,s.size()){
        rep(j,0,e.size()) if(b[s[i]]==a[e[j]]){p=true;break}
    }
    if(p)cout<<"POSSIBLE";
    else cout<<"IMPOSSIBLE";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:60: error: expected ';' before '}' token
   20 |         rep(j,0,e.size()) if(b[s[i]]==a[e[j]]){p=true;break}
      |                                                            ^
      |                                                            ;
Language: C++

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

int main() {
  int N,M;
  cin >> N>>M;
  vector<int> a(M);
  vector<int> b(M);
  for(int i=0;i<M;i++){
    cin >> a[i]>> b[i];
  }
/*
bool from1=false, toN=false;
  for(int i=2;i<N;i++){
    from1=false;
    toN=false;
    for(int j=0;j<M;j++){
      if(a[j]==1 && b[j]==i){
        from1=true;
        break;
      }
    }
    for(int j=0;j<M;j++){
      if(a[j]==i && b[j]==N){
        toN=true;
        break;
      }
    }
    if(from1 && toN) break;

  }
  */

  for(int i=0;i<M;i++){
    if(a[i]==1){
      int c=b[i];
      for(int j=0;j<M;j++){
        if(a[j]==c && b[j] ==N){
          cout << "POSSIBLE" << endl;
          return 0;
        }
      }
    }
  }

  if(from1 && toN) cout << "POSSIBLE" << endl ;
  else cout << "IMPOSSIBLE" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:46:6: error: 'from1' was not declared in this scope; did you mean 'fromfp'?
   46 |   if(from1 && toN) cout << "POSSIBLE" << endl ;
      |      ^~~~~
      |      fromfp
a.cc:46:15: error: 'toN' was not declared in this scope
   46 |   if(from1 && toN) cout << "POSSIBLE" << endl ;
      |               ^~~
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];
bool visited[200001];

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

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

    return;
}

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

    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-1] == true) cout << "POSSIBLE" << endl;
    else cout << "IMPOSSIBLE" << endl;

    return 0;
}
  


Compiler output:
/tmp/cc0QoXs3.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/cc0QoXs3.o
a.cc:(.text+0x35): relocation truncated to fit: R_X86_64_PC32 against symbol `visited' defined in .bss section in /tmp/cc0QoXs3.o
/tmp/cc0QoXs3.o: in function `main':
a.cc:(.text+0x26a): relocation truncated to fit: R_X86_64_PC32 against symbol `visited' defined in .bss section in /tmp/cc0QoXs3.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};

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

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

    return;
}

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

    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-1] == true) cout << "POSSIBLE" << endl;
    else cout << "IMPOSSIBLE" << endl;

    return 0;
}
  


Compiler output:
/tmp/cc3M39AD.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/cc3M39AD.o
a.cc:(.text+0x35): relocation truncated to fit: R_X86_64_PC32 against symbol `visited' defined in .bss section in /tmp/cc3M39AD.o
/tmp/cc3M39AD.o: in function `main':
a.cc:(.text+0x26a): relocation truncated to fit: R_X86_64_PC32 against symbol `visited' defined in .bss section in /tmp/cc3M39AD.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};

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

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

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

    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-1] == true) cout << "POSSIBLE" << endl;
    else cout << "IMPOSSIBLE" << endl;

    return 0;
}
  


Compiler output:
/tmp/cc1SrKaE.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/cc1SrKaE.o
a.cc:(.text+0x35): relocation truncated to fit: R_X86_64_PC32 against symbol `visited' defined in .bss section in /tmp/cc1SrKaE.o
/tmp/cc1SrKaE.o: in function `main':
a.cc:(.text+0x26a): relocation truncated to fit: R_X86_64_PC32 against symbol `visited' defined in .bss section in /tmp/cc1SrKaE.o
collect2: error: ld returned 1 exit status