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

#include <bits/stdc++.h>
using namespace std;
typedef bool boool;
typedef long long ll;
#define vl vector<ll>
#define vb vector<boool>
#define vs vector<string>
#define vp vector<pair<ll, ll>>
#define vvl vector<vector<ll>>
#define vvp vector<vector<pair<ll, ll>>>
#define mod 1000000007
#define all(x) x.begin(), x.end()
#define rep1(i, n) for (long long i=0; i<(long long)(n); i++)
#define rep2(i, s, e) for (long long i=(s); i<(long long)(e); i++)
#define GET_MACRO(_1,_2,_3,NAME,...) NAME
#define rep(...) GET_MACRO(__VA_ARGS__, rep2, rep1)(__VA_ARGS__)

struct edge{ll to, cost;};
typedef pair<ll,ll> P;
struct graph{
  ll V;
  vector<vector<edge> > G;
  vector<ll> d;

  graph(ll n){
    init(n);
  }

  void init(ll n){
    V = n;
    G.resize(V);
    d.resize(V);
    REP(i,V){
      d[i] = mod;
    }
  }

  void add_edge(ll s, ll t, ll cost){
    edge e1, e2;
    e1.to = t, e1.cost = cost;
    e2.to = s, e2.cost = cost;
    G[s].push_back(e1);
    G[t].push_back(e2);
  }

  void dijkstra(ll s){
    REP(i,V){
      d[i] = mod;
    }
    d[s] = 0;
    priority_queue<P,vector<P>, greater<P> > que;
    que.push(P(0,s));
    while(!que.empty()){
      P p = que.top(); que.pop();
      ll v = p.second;
      if(d[v]<p.first) continue;
      for(auto e : G[v]){
        if(d[e.to]>d[v]+e.cost){
          d[e.to] = d[v]+e.cost;
          que.push(P(d[e.to],e.to));
        }
      }
    }
  }
};

int main(){
  int n, m;
  cin >> n >> m;
  graph g(n);
  rep(i, m){
    int a, b;
    cin >> a >> b;
    a--; b--;
    g.add_edge(a,b,1);
  }
  g.dijkstra(0);
  if(g.d[n-1] == 2) cout << "POSSIBLE" << endl;
  else cout << "IMPOSSIBLE" << endl;
  return 0;
}


Compiler output:
a.cc: In member function 'void graph::init(ll)':
a.cc:33:9: error: 'i' was not declared in this scope
   33 |     REP(i,V){
      |         ^
a.cc:33:5: error: 'REP' was not declared in this scope
   33 |     REP(i,V){
      |     ^~~
a.cc: In member function 'void graph::dijkstra(ll)':
a.cc:47:9: error: 'i' was not declared in this scope
   47 |     REP(i,V){
      |         ^
a.cc:47:5: error: 'REP' was not declared in this scope
   47 |     REP(i,V){
      |     ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef bool boool;
typedef long long ll;
#define vl vector<ll>
#define vb vector<boool>
#define vs vector<string>
#define vp vector<pair<ll, ll>>
#define vvl vector<vector<ll>>
#define vvp vector<vector<pair<ll, ll>>>
#define mod 1000000007
#define all(x) x.begin(), x.end()
#define rep1(i, n) for (long long i=0; i<(long long)(n); i++)
#define rep2(i, s, e) for (long long i=(s); i<(long long)(e); i++)
#define GET_MACRO(_1,_2,_3,NAME,...) NAME
#define rep(...) GET_MACRO(__VA_ARGS__, rep2, rep1)(__VA_ARGS__)

struct edge{ll to, cost;};
typedef pair<ll,ll> P;
struct graph{
  ll V;
  vector<vector<edge> > G;
  vector<ll> d;

  graph(ll n){
    init(n);
  }

  void init(ll n){
    V = n;
    G.resize(V);
    d.resize(V);
    REP(i,V){
      d[i] = mod;
    }
  }

  void add_edge(ll s, ll t, ll cost){
    edge e1, e2;
    e1.to = t, e1.cost = cost;
    e2.to = s, e2.cost = cost;
    G[s].push_back(e1);
    G[t].push_back(e2);
  }

  void dijkstra(ll s){
    REP(i,V){
      d[i] = mod;
    }
    d[s] = 0;
    priority_queue<P,vector<P>, greater<P> > que;
    que.push(P(0,s));
    while(!que.empty()){
      P p = que.top(); que.pop();
      ll v = p.second;
      if(d[v]<p.first) continue;
      for(auto e : G[v]){
        if(d[e.to]>d[v]+e.cost){
          d[e.to] = d[v]+e.cost;
          que.push(P(d[e.to],e.to));
        }
      }
    }
  }
};

int main(){
  int n, m;
  cin >> n >> m;
  graph g(n);
  rep(i, m){
    int a, b;
    cin >> a >> b;
    a--; b--;
    g.add_edge(a,b,1);
  }
  g.dijkstra(s);
  if(g.d[n-1] == 2) cout << "POSSIBLE" << endl;
  else cout << "IMPOSSIBLE" << endl;
  return 0;
}

Compiler output:
a.cc: In member function 'void graph::init(ll)':
a.cc:33:9: error: 'i' was not declared in this scope
   33 |     REP(i,V){
      |         ^
a.cc:33:5: error: 'REP' was not declared in this scope
   33 |     REP(i,V){
      |     ^~~
a.cc: In member function 'void graph::dijkstra(ll)':
a.cc:47:9: error: 'i' was not declared in this scope
   47 |     REP(i,V){
      |         ^
a.cc:47:5: error: 'REP' was not declared in this scope
   47 |     REP(i,V){
      |     ^~~
a.cc: In function 'int main()':
a.cc:77:14: error: 's' was not declared in this scope
   77 |   g.dijkstra(s);
      |              ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
const int mxn=1e6;
vector <int> adj[mxn];
int visited[mxn];
ll dist[mxn];
queue <int> q;
void bfs(int start)
{
    q.push(start);
    visited[start]=1;
    dist[start]=0;
    while(!q.empty())
    {
        int u=q.front();
        q.pop();
       // cout<<u<<' ';
        for(int i=0;i<adj[u].size();i++)
        {
           int v= adj[u][i];
           if(!visited[v])
           {
               visited[v]=1;
               q.push(v);
               dist[v]=1+dist[u];
           }
        }
    }
}
int main()
{
    int n,m;
    cin>>n>>m;
    int u,v;
    for(int i=0;i<m;i++)
    {
        cin>>u>>v;
        adj[u].push_back(v);
        adj[v].push_back(u);
    }
    memset(visited,0,sizeof(visited));

    bfs(1);

        if dist[n]==2) cout<<"POSSIBLE"<<endl;
        else cout<<"IMPOSSIBLE"<<endl;
}


Compiler output:
a.cc:6:1: error: 'll' does not name a type
    6 | ll dist[mxn];
      | ^~
a.cc: In function 'void bfs(int)':
a.cc:12:5: error: 'dist' was not declared in this scope
   12 |     dist[start]=0;
      |     ^~~~
a.cc: In function 'int main()':
a.cc:45:12: error: expected '(' before 'dist'
   45 |         if dist[n]==2) cout<<"POSSIBLE"<<endl;
      |            ^~~~
      |            (
a.cc:46:9: error: 'else' without a previous 'if'
   46 |         else cout<<"IMPOSSIBLE"<<endl;
      |         ^~~~
Language: C++

#pragma GCC optimize("Ofast")
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define rep2(i,n) for(int i=0;i<=n;i++)
#define repr(i,a,n) for(int i=a;i<n;i++)
#define all(a) a.begin(),a.end()
#define P pair<long long,long long>
#define uni(e) e.erase(unique(e.begin(),e.end()),e.end())
#define double long double
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
int INF=1e10;
int MOD=1e9+7;
template<class T> void out(T a){cout<<a<<'\n';}
template<class T> void yesno(T b){if(b)out("yes");else out("no");}
template<class T> void YesNo(T b){if(b)out("Yes");else out("No");}
template<class T> void YESNO(T b){if(b)out("YES");else out("NO");}
template<class T> void noyes(T b){if(b)out("no");else out("yes");}
template<class T> void NoYes(T b){if(b)out("No");else out("Yes");}
template<class T> void NOYES(T b){if(b)out("NO");else out("YES");}
int keta(int a){
  double b=a;
  b=log10(b);
  int c=b;
  return c+1;
}
int kurai(int a,int b){
  int m=pow(10,b),n=pow(10,b-1);
  return (a%m)/n;
}
int ketawa(int a){
  int k=0;
  rep(i,keta(a)){
  k+=kurai(a,i+1);
  }
  return k;
}
int gcd(int a,int b){
  if(a%b==0)
    return b;
  return gcd(b,a%b);
}
int lcm(int a,int b){
    return a/gcd(a,b)*b;
}
int mid(int a,int b,int c){
  vector<int> k(3);
  k[0]=a;k[1]=b;k[2]=c;
  sort(all(k));
  return k[1];
}
bool sosuu(int a){
  bool b=1;
  if(a<=1)
    return 0;
  else{
  rep1(i,sqrt(a)-1){
  if(a%(i+1)==0)
  b=0;
  }
  return b;
  }
}
int modpow(int a,int b,int m=MOD){
 if(!b)return 1; if(b&1)return modpow(a,b-1,m)*a%m;
 int memo = modpow(a,b>>1,m);
 return memo*memo%m;
}
int fact_mod(int n) {
    int f=1; 
for(int i=2;i<n+1;i++) f=f*(i%MOD)% MOD;
    return f;
}
int mod_pow(int x,int n) {
    int res=1;
    while(n>0){
        if(n&1) res=(res*x)%MOD; 
        x=(x*x)%MOD;        
n>>=1; 
    }
    return res;
}
int c_mod(int n, int r) {
    if(r>n-r) r=n-r;
    if(r==0) return 1;
    int a=1;
    rep(i,r) 
a=a*((n-i)%MOD)%MOD;
    int b=mod_pow(fact_mod(r), MOD-2);
    return (a%MOD)*(b%MOD)%MOD;
}
signed main(){
  int a,b;
  cin>>a>>b;
  vector<int> c(b),d(b),e(b,0),f(b,0);
  rep(i,b)
    cin>>c[i]>>d[i];
  rep(i,b){
  if(c[i]==1)
    e[d[i]-1]++;
  }
  rep(i,b){
  if(d[i]==a){
    f[c[i]-1]++;
  }
  }
  bool p=0;
  rep(i,b){
  if(f[i]&&e[i])
    p++;
  }
  if(p){
  out("POSIBLE");
  }
  else
    out("IMPOSSIBLE");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:114:5: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
  114 |     p++;
      |     ^
Language: C++

include <bits/stdc++.h>

#define ll long long
#define ull unsigned long long
#define rep(i,n) for(int i=0;i<n;i++)
#define pb push_back
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
using namespace std;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n, m;
    cin >> n>> m;
    set<int> s1, s2;
    rep(i,m){
        int x, y;
        cin >> x >> y;
        if(x==1){
            s1.insert(y);
        }
        else if(y == 1){
            s1.insert(x);
        }
        else if(x == n){
            s2.insert(y);
        }
        else if(y == n){
            s2.insert(x);
        }
    }
    for(auto it : s1){
        if(s2.count(it)){
            cout << "POSSIBLE";
            return 0;
        }
    }
    cout << "IMPOSSIBLE";
    
    return 0;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:12:5: error: 'ios_base' has not been declared
   12 |     ios_base::sync_with_stdio(false);
      |     ^~~~~~~~
a.cc:13:5: error: 'cin' was not declared in this scope
   13 |     cin.tie(NULL);
      |     ^~~
a.cc:13:13: error: 'NULL' was not declared in this scope
   13 |     cin.tie(NULL);
      |             ^~~~
a.cc:1:1: note: 'NULL' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
  +++ |+#include <cstddef>
    1 | include <bits/stdc++.h>
a.cc:16:5: error: 'set' was not declared in this scope
   16 |     set<int> s1, s2;
      |     ^~~
a.cc:16:9: error: expected primary-expression before 'int'
   16 |     set<int> s1, s2;
      |         ^~~
a.cc:21:13: error: 's1' was not declared in this scope
   21 |             s1.insert(y);
      |             ^~
a.cc:24:13: error: 's1' was not declared in this scope
   24 |             s1.insert(x);
      |             ^~
a.cc:27:13: error: 's2' was not declared in this scope
   27 |             s2.insert(y);
      |             ^~
a.cc:30:13: error: 's2' was not declared in this scope
   30 |             s2.insert(x);
      |             ^~
a.cc:33:19: error: 's1' was not declared in this scope
   33 |     for(auto it : s1){
      |                   ^~
a.cc:34:12: error: 's2' was not declared in this scope
   34 |         if(s2.count(it)){
      |            ^~
a.cc:35:13: error: 'cout' was not declared in this scope
   35 |             cout << "POSSIBLE";
      |             ^~~~
a.cc:39:5: error: 'cout' was not declared in this scope
   39 |     cout << "IMPOSSIBLE";
      |     ^~~~
Language: C++

#include <bits/stdc++.h>

#define ll long long
#define ull unsigned long long
#define rep(i,n) for(int i=0;i<n;i++)
#define pb push_back
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
using namespace std;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n, m;
    cin >> n>> m;
    set<int> s2, s2;
    rep(i,m){
        int x, y;
        cin >> x >> y;
        if(x==1){
            s1.insert(y);
        }
        else if(y == 1){
            s1.insert(x);
        }
        else if(x == n){
            s2.insert(y);
        }
        else if(y == n){
            s2.insert(x);
        }
    }
    for(auto it : s1){
        if(s2.count(it)){
            cout << "POSSIBLE";
            return 0;
        }
    }
    cout << "IMPOSSIBLE";
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:18: error: redeclaration of 'std::set<int> s2'
   16 |     set<int> s2, s2;
      |                  ^~
a.cc:16:14: note: 'std::set<int> s2' previously declared here
   16 |     set<int> s2, s2;
      |              ^~
a.cc:21:13: error: 's1' was not declared in this scope; did you mean 's2'?
   21 |             s1.insert(y);
      |             ^~
      |             s2
a.cc:24:13: error: 's1' was not declared in this scope; did you mean 's2'?
   24 |             s1.insert(x);
      |             ^~
      |             s2
a.cc:33:19: error: 's1' was not declared in this scope; did you mean 's2'?
   33 |     for(auto it : s1){
      |                   ^~
      |                   s2
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vl = vector<ll>;
using vll = vector<vl>;
using Pll = pair<ll, ll>;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define all(v) v.begin(), v.end()
#define sz(x) ((int) x.size())
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define F first
#define S second
const int MOD = 1e9+7;
const ll INF = 2e15;
template<class T> void print(const T& t){ cout << t << endl; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}

int main(){
  ll n,m;
  cin >> n >> m;
  bool possible = false;
  vl dp1;
  vl dpn;
  rep(i,m){
    ll a, b;
    cin >> a >> b;
    if(a==1){
      dp1.pb(b);
    }
    else if(b==1){
      dp1.pb(a);
    }
    if(a==n){
      dpn.pb(b);
    }
    else if(b==n){
      dpn.pb(a);
    }
  }
  sort(all(dpn));
  rep(i, sz(dp1)){
    if(binary_search(all(dpn),dp1[i])){
      possible = true;
    }
  }
  if(possible){
    print("POSSIBLE");
  }
  else{
    print("IMPOSSIBLE");
  }
}

Compiler output:
a.cc:28:9: error: stray '\16' in program
   28 |   vl dpn<U+000E>;
      |         ^~~~~~~~
Language: C++

#include<iostream>
#include<vector>
#include <cmath>
#include <map>
#include <algorithm>
#include <string>
using namespace std;
int main(void){
  int N, M, a, b;
  cin >> N >> M;
  vector<set<int>> v(N + 1);
  for (int i = 0; i != M; ++i) {
    cin >> a >> b;
    v[a].insert(b);
    v[b].insert(a);
  }
 
  cout << (any_of(begin(v[1]), end(v[1]), [&](int s) { return v[s].count(N); })
               ? "POSSIBLE"
               : "IMPOSSIBLE")
       << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: 'set' was not declared in this scope
   11 |   vector<set<int>> v(N + 1);
      |          ^~~
a.cc:6:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>'
    5 | #include <algorithm>
  +++ |+#include <set>
    6 | #include <string>
a.cc:11:17: error: template argument 1 is invalid
   11 |   vector<set<int>> v(N + 1);
      |                 ^~
a.cc:11:17: error: template argument 2 is invalid
a.cc:14:6: error: invalid types 'int[int]' for array subscript
   14 |     v[a].insert(b);
      |      ^
a.cc:15:6: error: invalid types 'int[int]' for array subscript
   15 |     v[b].insert(a);
      |      ^
a.cc:18:26: error: invalid types 'int[int]' for array subscript
   18 |   cout << (any_of(begin(v[1]), end(v[1]), [&](int s) { return v[s].count(N); })
      |                          ^
a.cc:18:37: error: invalid types 'int[int]' for array subscript
   18 |   cout << (any_of(begin(v[1]), end(v[1]), [&](int s) { return v[s].count(N); })
      |                                     ^
a.cc: In lambda function:
a.cc:18:64: error: invalid types 'int[int]' for array subscript
   18 |   cout << (any_of(begin(v[1]), end(v[1]), [&](int s) { return v[s].count(N); })
      |                                                                ^
Language: C++

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

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

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

  vector<ll> cost(n + 1, -1);
  priority_queue<pair<int, int>> q;
  q.push({0, 1});
  cost[1] = 0;
  while (!q.empty()) {
    auto c = q.top().first;
    auto num = q.top().second;
    q.pop();

    for (size_t i = 0; i < s[num].size(); i++) {
      auto next = s[num][i];
      if (cost[next] == -1) {
        q.push({c + 1, next});
        cost[next] = c + 1;
      }
    }
    if (cost[n] != -1) break;
  }
  if (cost[n] == 2) {
    cout << "POSSIBLE" << endl;
  } else {
    cout << "IMPOSSIBLE" << endl;
  }
}


Compiler output:
a.cc:5:1: error: '::main' must return 'int'
    5 | ll main() {
      | ^~
Language: C++

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

int main()
{
    ll N, M; cin >> N >> M;
    vector<ll> a(N, 0);
    vector<ll> b(N, 0);
    rep(i,M) {
        ll A, B; cin >> A >> B;
        if (A == 1) {
            a[B-1] = 1;
        }
        else if (B == 1) {
            a[A-1] = 1;
        }
        if (A == N) {
            b[B-1] = 1;
        }
        else if (B == N) {
            b[A-1] = 1;
        }
    }
    rep(i,N) {
        if (a[i] == 1 && b[i] == 1) {
                cout << "POSSIBLE" << endl;
                exit(0);
            }
        }
    }
    cout << "IMPOSSIBLE" << endl;

}


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

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

int main()
{
    ll N, M; cin >> N >> M;
    vector<ll> a(N, 0);
    vector<ll> b(N, 0);
    rep(i,M) {
        ll A, B; cin >> A >> B;
        if (A == 1) {
            a[B-1] = 1;
        }
        else if (B == 1) {
            a[A-1] = 1;
        }
        if (A == N) {
            b[B-1] = 1;
        }
        else if (B == N) {
            b[A-1] = 1;
        }
    }
    rep(i,N)) {
        if (a[i] == 1 && b[i] == 1) {
                cout << "POSSIBLE" << endl;
                exit(0);
            }
        }
    }
    cout << "IMPOSSIBLE" << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:13: error: expected primary-expression before ')' token
   27 |     rep(i,N)) {
      |             ^
a.cc: At global scope:
a.cc:34:5: error: 'cout' does not name a type
   34 |     cout << "IMPOSSIBLE" << endl;
      |     ^~~~
a.cc:36:1: error: expected declaration before '}' token
   36 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
const int MOD=1000000007;

int main() {
  int n,m;
  cin >> n >> m;
  vector<vector<int>> data(m, vector<int>(2));
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < 2; j++) {
      cin >> data.at(i).at(j);
    }
  }
  sort(data.begin(), data.end())
  for (int i = 0; i < m; i++) {
      if(data.at(i).at(0)==1){
        for (int j = 0; j < m; j++){
          if(data[i][1]==data[j][0] && data[j][1]==n){
            cout << "POSSIBLE" << endl;
            return 0;
          }
        }
      }
      if(data.at(i).at(0)==2)
      break;
    }
    cout << "IMPOSSIBLE" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:33: error: expected ';' before 'for'
   15 |   sort(data.begin(), data.end())
      |                                 ^
      |                                 ;
   16 |   for (int i = 0; i < m; i++) {
      |   ~~~                            
a.cc:16:19: error: 'i' was not declared in this scope
   16 |   for (int i = 0; i < m; i++) {
      |                   ^
Language: C++

#include<stdio.h>
#include<iostream>
#include<vector>
#include<math.h>
#include<queue>
#include<map>
#include<algorithm>
#include<string.h>
#include<functional>
#include<limits.h>
#include<stdlib.h>
#include<string>
#include<unordered_map>
using namespace std;

#define intmax INT_MAX
#define lmax LONG_MAX
#define uintmax UINT_MAX
#define ulmax ULONG_MAX
#define llmax LLONG_MAX
#define ll long long
#define rep(i,a,N) for((i)=(a);(i)<(N);(i)++)
#define rrp(i,N,a) for((i)=(N)-1;(i)>=(a);(i)--)
#define llfor ll i,j,k
#define sc(a) cin>>a
#define pr(a) cout<<a<<endl
#define pY puts("YES")
#define pN puts("NO")
#define py puts("Yes")
#define pn puts("No")
#define pnn printf("\n")
#define sort(a) sort(a.begin(),a.end())
#define push(a,b) (a).push_back(b)
#define llvec vector<vector<ll>>
#define charvec vector<vector<char>>
#define sizeoof(a,b) (a,vector<ll>(b))
#define llpvec vector<pair<ll,ll>>
/*繰り上げ除算*/ll cei(ll x,ll y){ll ans=x/y;if(x%y!=0)ans++;return ans;}
/*最大公約数*/ll gcd(ll x,ll y){return y?gcd(y,x%y):x;}
/*最小公倍数*/ll lcm(ll x,ll y){return x/gcd(x,y)*y;}
/*n乗*/ll llpow(ll x,ll n){ll i,ans=1;rep(i,0,n)ans*=x;return ans;}
/*階乗*/ll fact(ll x){ll i,ans=1;rep(i,0,x)ans*=(x-i);return ans;}
/*nCr*/ll ncr(ll n,ll r){return fact(n)/fact(r)/fact(n-r);}
/*nPr*/ll npr(ll n,ll r){return fact(n)/fact(n-r);}
/*primejudge*/bool prime(ll a){if(a<=1)return false;ll i;for(i=2;i*i<=a;i++){if(a%i==0)return false;}return true;}
ll ans=0;llfor;///////////////////////////////////////////////////////////
int main(){
 ll n,m;
 sc(n);sc(m);
 ll a,b;
 llpvec c(m);
 ll mapb[200010],mapa[200010];
 ll memoa=0,memob=0;
 rep(i,0,m){
  sc(a);sc(b);
  //pr(memo);
  if((mapa[a]&&b==n)||(a==1&&mapb[b])){
   puts("POSSIBLE");
   returna 0;
  }
  if(a==1)mapa[b]=1;
  if(b==n)mapb[a]=1;
 }

 puts("IMPOSSIBLE");
  
return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:59:4: error: 'returna' was not declared in this scope
   59 |    returna 0;
      |    ^~~~~~~
Language: C++

#include<bits/stdc++.h>
#define ll long long int
using namespace std;



int main()
{
    ll n,k,x=-2,y=2000000,m;map<ll,ll>ml;
    cin>>n>>m;
    vector<pair<ll,ll>>v;
    for(int i=1;i<=m;i++){
        ll a,b;
        cin>>a>>b;
        v.push_back(make_pair(a,b));
    }
    sort(v.begin(),v.end());
    for(int i=0;i<v.size();i++){
        if(v[i].first==1)m[v[i].second]=1;
        else if(v[i].second==n&&m[v[i].first]){
            cout<<"POSSIBLE";return 0;
        }
    }
    cout<<"IMPOSSIBLE";

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:27: error: invalid types 'long long int[long long int]' for array subscript
   19 |         if(v[i].first==1)m[v[i].second]=1;
      |                           ^
a.cc:20:34: error: invalid types 'long long int[long long int]' for array subscript
   20 |         else if(v[i].second==n&&m[v[i].first]){
      |                                  ^
Language: C++

#include<bits/stdc++.h>
#define ll long long int
using namespace std;



int main()
{
    ll n,k,x=-2,y=2000000;
    cin>>n>>m;
    vector<pair<ll,ll>>v;
    for(int i=1;i<=m;i++){
        ll a,b;
        cin>>a>>b;
        v.push_back(make_pair(a,b));
    }
    sort(v.begin(),v.end());
    for(int i=0;i<v.size();i++){
        if(v[i].first==1)x=max(x,v[i].second);
        else if(v[i].second==n){
            y=min(y,v[i].first);
        }
    }
    if(x>=y)cout<<"POSSIBLE";
    cout<<"IMPOSSIBLE";

    return 0;
}


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

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main(){
  int n,m;
  cin >>n>>m;
  vector<pair<int,int>> a(m);
  vector<bool> c(n,false);
  rep(i,m){
    int a,b;
    cin >>a>>b;
    a.at(i)=make_pair(a,b);
    if(a==1){
      c.at(b-1)=true;
    }
  }
  sort(a.begin(),a.end());
  for( auto p:a){
    int d=a.first;
    int e=a.second;
    if(c.at(d-1)==true && e==n){
      cout <<"POSSIBLE";
      return 0;
    }
  }
  cout << "IMPOSSIBLE";
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:12:7: error: request for member 'at' in 'a', which is of non-class type 'int'
   12 |     a.at(i)=make_pair(a,b);
      |       ^~
a.cc:19:13: error: 'class std::vector<std::pair<int, int> >' has no member named 'first'
   19 |     int d=a.first;
      |             ^~~~~
a.cc:20:13: error: 'class std::vector<std::pair<int, int> >' has no member named 'second'
   20 |     int e=a.second;
      |             ^~~~~~
Language: C++

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

using namespace std;

int main(int argc, char const *argv[])
{
    int N, M;
    cin >> N >> M;
    vector<int> a, b;
    a.resize(M);
    b.resize(M);
    vector<bool> ftoi;
    vector<bool> itoN;
    ftoi.resize(N + 1);
    fill(ftoi.begin(), ftoi.end(), false);
    itoN.resize(N + 1);
    fill(itoN.begin(), itoN.end(),false);
    fill
    for (int i = 0; i < M; i++)
    {
        cin >> a[i];
        cin >> b[i];

        if (a[i] > b[i]) swap(a[i], b[i]);

        if (a[i] == 1)
        {
            ftoi[b[i]] = true;
        }else
        {
            ftoi[b[i]] = false;
        }
        if (b[i] == N)
        {
            itoN[a[i]] = true;
        }else
        {
            itoN[a[i]] = false;
        }
        
    }

    for (int i = 0; i < N; i++)
    {
        if (ftoi[i] & itoN[i])
        {
            cout << "POSSIBLE" << endl;
            return 0;
        }
        
    }
    
    cout << "IMPOSSIBLE" << endl;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:21:9: error: expected ';' before 'for'
   21 |     fill
      |         ^
      |         ;
   22 |     for (int i = 0; i < M; i++)
      |     ~~~  
a.cc:22:19: error: statement cannot resolve address of overloaded function
   22 |     for (int i = 0; i < M; i++)
      |                   ^
a.cc:22:21: error: 'i' was not declared in this scope
   22 |     for (int i = 0; i < M; i++)
      |                     ^
Language: C++

        #include <bits/stdc++.h>
        using namespace std;
        int main(){
			long long n,m,a[200005],b[200005],c[200005]={};
			cin>>n>>m;
			for(int i=0;i<m;i++){
				cin>>a[i]>>b[i];
				else if(b[i]==n){
					c[a[i]]=1;
					
				}
			}
			for(int i=0;i<m;i++){
				if(a[i]==1){
                    if(c[b[i]]==1){
					cout<<"POSSIBLE"<<endl;
					return(0);
                  }
                }
            }
			cout<<"IMPOSSIBLE"<<endl;
    		return(0);
        }

Compiler output:
a.cc: In function 'int main()':
a.cc:8:33: error: 'else' without a previous 'if'
    8 |                                 else if(b[i]==n){
      |                                 ^~~~
Language: C++

#include "bits/stdc++.h"
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep2(i, l, r) for (int i = (l); i < (r); i++)
#define ALL(x) (x).begin(), (x).end()     //昇順
#define RALL(x) (x).rbegin(), (x).rend()  // 降順
#define pri(x) cout << (x) << "\n"
#define pri2(x, y) cout << (x) << " " << (y) << "\n"
#define pri3(x, y, z) cout << (x) << " " << (y) << " " << (z) << "\n"
const long long mod = 1e9 + 7;
typedef long long ll;
typedef priority_queue<int> PQ;
typedef vector<long long> VL;
typedef vector<bool> VB;
typedef vector<int> VI;  // VI a(n);
typedef vector<double> VD;
typedef vector<string> VS;
typedef vector<char> VC;
typedef vector<VS> VSS;
typedef vector<VC> VCC;
typedef vector<VI> VII;  // VII a(n,VI(m)) n * m
typedef vector<VL> VLL;
typedef pair<int, int> PII;
typedef map<int, int> MP;  // MP a;
typedef vector<pair<ll, ll>> PS;

template <class T, class U>
bool chmax(T &a, U b) {
  if (a <= b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T, class U>
bool chmin(T &a, U b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
template <typename T>
ostream &operator<<(ostream &os, vector<T> &v) {
  os << "{";
  rep(i, (int)v.size()) { os << v[i] << (i < v.size() - 1 ? ", " : ""); }
  os << "}";
  return os;
}

// g++ -std=c++11 prac.cpp
// operator << (cout,a);
// chmin(min,a)
     
int main() {
  ll n, m, k, x, y , z = 0, h, ans=0, w, sum = 0, Max = -1, Min = 3e9+1;
  string u;
  bool ok=true;
  cin >> n >> m;
  VL a(m),b(m); VB ans(m,false);
  rep(i,m){
    cin >> a[i] >> b[i];
  }　
  // 1　から行ける場所
  rep(i,m){
    if(a[i]==1){
      ans[b[i]]=true;
    }
  }
  //1から行ける場所　からnに行ける場所
  rep(i,m){
    if(b[i]==n && ans[a[i]]){
      pri("POSSIBLE");
      return 0;
    }
  }
  pri("IMPOSSIBLE");
  return 0;
}


Compiler output:
a.cc:63:4: error: extended character 　 is not valid in an identifier
   63 |   }　
      |    ^
a.cc: In function 'int main()':
a.cc:60:20: error: conflicting declaration 'VB ans'
   60 |   VL a(m),b(m); VB ans(m,false);
      |                    ^~~
a.cc:56:32: note: previous declaration as 'll ans'
   56 |   ll n, m, k, x, y , z = 0, h, ans=0, w, sum = 0, Max = -1, Min = 3e9+1;
      |                                ^~~
a.cc:63:4: error: '\U00003000' was not declared in this scope
   63 |   }　
      |    ^~
a.cc:65:7: error: 'i' was not declared in this scope
   65 |   rep(i,m){
      |       ^
a.cc:3:35: note: in definition of macro 'rep'
    3 | #define rep(i, n) for (int i = 0; i < n; i++)
      |                                   ^
a.cc:72:22: error: invalid types 'll {aka long long int}[__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type {aka long long int}]' for array subscript
   72 |     if(b[i]==n && ans[a[i]]){
      |                      ^
Language: C++

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

bool matrix[200000+1][200000+1] = {false};
long long n, m;

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

    for(int i = 1;i <= m; i++){
        long long a, b;
        cin >> a >> b;

        matrix[a][b] = true;
        matrix[b][a] = true;
    }

    int distance[n+1];
    distance[1] = 0;

    bool flag = false;

    for(int i = 1; i <= n; i++){
        if(matrix[1][i] == true){
            if(matrix[i][n] == true){
                flag = true;
                break;
            }
        }
    }

    if(flag == true){
        printf("POSSIBLE\n");
    }
    else{
        printf("IMPOSSIBLE\n");
    }
    return 0;
    

   


}

Compiler output:
/tmp/ccgOaZ4q.o: in function `main':
a.cc:(.text+0x12): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccgOaZ4q.o
a.cc:(.text+0x2e): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccgOaZ4q.o
a.cc:(.text+0xb9): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccgOaZ4q.o
a.cc:(.text+0xc5): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccgOaZ4q.o
a.cc:(.text+0x143): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccgOaZ4q.o
a.cc:(.text+0x17f): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccgOaZ4q.o
collect2: error: ld returned 1 exit status
Language: C++

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

int main() {
  int n,m;
  cin >> n >> m;
  bool graph[][] = bool[200000][200000];
  for(int i=0; i<m; i++){
    int a,b;
    cin >> a >> b;
    graph[a-1][b-1] = true;
    graph[b-1][a-1] = true;
  }
  for(int i=0; i<n; i++){
    if(graph[0][i] && graph[i][n-1]){
      cout << "POSSIBLE" << endl;
      return;
    }
  }
  cout << "IMPOSSIBLE" << endl;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: declaration of 'graph' as multidimensional array must have bounds for all dimensions except the first
    7 |   bool graph[][] = bool[200000][200000];
      |        ^~~~~
a.cc:7:20: error: expected primary-expression before 'bool'
    7 |   bool graph[][] = bool[200000][200000];
      |                    ^~~~
a.cc:11:5: error: 'graph' was not declared in this scope; did you mean 'isgraph'?
   11 |     graph[a-1][b-1] = true;
      |     ^~~~~
      |     isgraph
a.cc:15:8: error: 'graph' was not declared in this scope; did you mean 'isgraph'?
   15 |     if(graph[0][i] && graph[i][n-1]){
      |        ^~~~~
      |        isgraph
a.cc:17:7: error: return-statement with no value, in function returning 'int' [-fpermissive]
   17 |       return;
      |       ^~~~~~
Language: C++

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

int main()
{
    int n,m;
    cin >> n >> m;
    vector<int> a(n),b(n),f(n),e(n);

    for (int i = 0; i < n; i++)
    {
        cin >> a[i] >> b[i];
        if(a[i] == 1)f.push_back(b[i]);
        if(b[i] == n)e.push_back(a[i]);
    }
    
    int i;
    for (i = 0; i < f.size(); i++)
    {
        if(binary_search(e.begin(),e.end(),f[i]))break;
    }
    
    if(i == f.size())cout << "IM";
    cout << "POSSIBLE"
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:23: error: expected ';' before '}' token
   24 |     cout << "POSSIBLE"
      |                       ^
      |                       ;
   25 | }
      | ~
Language: C++

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

int main(){
  int n, m; scanf("%d %d", &n, &m);
  vector<priority_queue<int>> v(n);
  rep(i, m){
    int a, b; scanf("%d %d", &a, &b); --a; --b;
    v[a].push(b);
    v[b].push(a);
  }
  bool b = 0;
 while(!v[0].empty()){
   int c = v[0].top();
    if(v[c].top == n-1){
      b = 1;
      break;
    }
   v[0].pop();
  }
  if(b) printf("POSSIBLE\n");
  else printf("IMPOSSIBLE\n");
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: invalid use of member function 'std::priority_queue<_Tp, _Sequence, _Compare>::const_reference std::priority_queue<_Tp, _Sequence, _Compare>::top() const [with _Tp = int; _Sequence = std::vector<int>; _Compare = std::less<int>; const_reference = const int&]' (did you forget the '()' ?)
   16 |     if(v[c].top == n-1){
      |                ()
Language: C++

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

int main(){
  int n, m; scanf("%d %d", &n, &m);
  vector<priority_queue> v(n);
  rep(i, m){
    int a, b; scanf("%d %d", &a, &b); --a; --b;
    v[a].push(b);
    v[b].push(a);
  }
  bool b = 0;
  for(int c: v[0]){
    if(v[c].top == n-1){
      b = 1;
      break;
    }
  }
  if(b) printf("POSSIBLE\n");
  else printf("IMPOSSIBLE\n");
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:24: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp, class _Alloc> class std::vector'
    7 |   vector<priority_queue> v(n);
      |                        ^
a.cc:7:24: note:   expected a type, got 'priority_queue'
a.cc:7:24: error: template argument 2 is invalid
a.cc:10:6: error: invalid types 'int[int]' for array subscript
   10 |     v[a].push(b);
      |      ^
a.cc:11:6: error: invalid types 'int[int]' for array subscript
   11 |     v[b].push(a);
      |      ^
a.cc:14:15: error: invalid types 'int[int]' for array subscript
   14 |   for(int c: v[0]){
      |               ^
a.cc:15:9: error: invalid types 'int[int]' for array subscript
   15 |     if(v[c].top == n-1){
      |         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
const ll MOD=1000000007;
const double PI=3.14159265358979;
const ll INF= pow(10,18);
typedef pair<ll,ll> P;
typedef vector<ll> vl;
typedef vector<vl> vvl;
#define FOR(i,a,b) for(ll i=a;i<b;i++)
#define rep(i,n) FOR(i,0,n)
string abc="abcdefghijklmnopqrstuvwxyz";
string ABC="ABCDEFGHIJKLMNOPQRSTUVWXYZ";

int main() {
  ll n,m;
  cin >> n >> m;
  vl a(m),b(m);
  rep(i,m){
    cin >> a[i] >> b[i];
  }
  vl memo(2*m,INF);
  ll j=0;
  rep(i,m){
    if(min(a[i],b[i])==1){
      memo[j]=max(a[i],b[i]);
      j++;
    }
  }
  rep(i,m){
    if(max(a[i],b[i])==n){
      memo[j]=min(a[i],b[i]);
      j++;
    }
  }
  sort(memo.begin(),memo.end());
  bool k=false;
  rep(i,2*m){
    if(memo[i]=INF)
      break;
    else(memo[i]==memo[i+1]){
      k=true;
      break;
    }
  }
  if(k){
    cout << "POSSIBLE" << endl;
  }
  else
    cout << "IMPOSSIBLE" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:29: error: expected ';' before '{' token
   41 |     else(memo[i]==memo[i+1]){
      |                             ^
      |                             ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
const ll MOD=1000000007;
const double PI=3.14159265358979;
const ll INF= pow(10,18);
typedef pair<ll,ll> P;
typedef vector<ll> vl;
typedef vector<vl> vvl;
#define FOR(i,a,b) for(ll i=a;i<b;i++)
#define rep(i,n) FOR(i,0,n)
string abc="abcdefghijklmnopqrstuvwxyz";
string ABC="ABCDEFGHIJKLMNOPQRSTUVWXYZ";

int main() {
  ll n,m;
  cin >> n >> m;
  vl a(m),b(m);
  rep(i,m){
    cin >> a[i] >> b[i];
  }
  vl memo(2*m,INF);
  ll j=0;
  rep(i,m){
    if(min(a[i],b[i])==1){
      memo[j]=max(a[i],b[i]);
      j++;
    }
  }
  rep(i,m){
    if(max(a[i],b[i])==N){
      memo[j]=min(a[i],b[i]);
      j++;
    }
  }
  sort(memo.begin(),memo.end());
  bool a=false;
  rep(i,2*m){
    if(memo[i]=INF)
      break;
    else(memo[i]==memo[i+1]){
      a=true;
      break;
    }
  }
  if(a){
    cout << "POSSIBLE" << endl;
  }
  else
    cout << "IMPOSSIBLE" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:24: error: 'N' was not declared in this scope
   31 |     if(max(a[i],b[i])==N){
      |                        ^
a.cc:37:8: error: conflicting declaration 'bool a'
   37 |   bool a=false;
      |        ^
a.cc:18:6: note: previous declaration as 'vl a'
   18 |   vl a(m),b(m);
      |      ^
a.cc:41:29: error: expected ';' before '{' token
   41 |     else(memo[i]==memo[i+1]){
      |                             ^
      |                             ;
a.cc:46:6: error: could not convert 'a' from 'vl' {aka 'std::vector<long long int>'} to 'bool'
   46 |   if(a){
      |      ^
      |      |
      |      vl {aka std::vector<long long int>}
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int N,M;
  cin>>N>>M;
  vector<pair<int,int>>A(M);
  for(int i=0;i<M;i++){
  int x,y;
    cin>>x>>y;
    A.at(i).first=x;
     A.at(i).second=y; 
  }
  set<int>S;
  for(int i=0;i<M;i++){
  if(A.at(i).first==1)
    S.insert(A.at(i).second);
  }
  string ans="IMPOSSIBLE";
  for(int i=0;i<M;i++){
  if(A.at(i).second==N && S.count(A.at(i).first){
   ans="POSSIBLE"; break;
  }
    }cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:49: error: expected ')' before '{' token
   20 |   if(A.at(i).second==N && S.count(A.at(i).first){
      |     ~                                           ^
      |                                                 )
a.cc:23:5: error: expected primary-expression before '}' token
   23 |     }cout<<ans<<endl;
      |     ^
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();
    int[] num = new num[n];
    for(int i = 0; i < m; i++) {
      int a = sc.nextInt() - 1;
      int b = sc.nextInt() - 1;
      if(a == 0) num[b]++;
      if(b == (n - 1)) num[a]++;
    }
    String ans = "IMPOSSIBLE";
    for(int i = 0; i < n; i++) {
      if(num[i] > 1) ans = "POSSIBLE";
    }
    System.out.println(ans);
  }
}

Compiler output:
Main.java:9: error: cannot find symbol
    int[] num = new num[n];
                    ^
  symbol:   class num
  location: class Main
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define rep2(i, a, n) for(ll i = a; i < (ll)(n); i++)
#define memi cout << endl
#define kono(n) cout << fixed << setprecision(n)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define hina cout << ' '
#define in(n) cin >> n
#define in2(n, m) cin >> n >> m
#define in3(n, m, l) cin >> n >> m >> l
#define out(n) cout << n
const ll mei = (ll)1e9 + 7;

int main(){
  ll n, a;
  in2(n, m);
  vector<ll> c(m), d(m), e(n);
  rep(i, m){
    in(a);
    c[i] = a - 1;
    in(a);
    d[i] = a - 1;
  }
  rep(i, m){
    if(c[i] == 0)
      e[d[i]]++;
    if(d[i] == n - 1)
      e[c[i]]++;
  }
  a = 0;
  rep(i, n){
    if(e[i] == 2)
      a++;
  }
  if(a)
    out("POSSIBLE");
  else
    out("IMPOSSIBLE");
  memi;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:10: error: 'm' was not declared in this scope
   19 |   in2(n, m);
      |          ^
a.cc:12:31: note: in definition of macro 'in2'
   12 | #define in2(n, m) cin >> n >> m
      |                               ^
Language: C++

#include <iostream>
#include <cmath>
#include <string>
#include <vector>
#include <cstdlib>
#include <map>
#include <queue>
#include <algorithm>
#include <stack>
#include <functional>
#define rep(i,j,n) for(i=j;i<(n);i++)
#define rrep(i,j,n) for(i=j;i>(n);i--)
typedef long long int lli;
//#define N 1000000007

using namespace std;

int main(){
    lli n,m,a,b;
    lli i;
    string ans="IMPOSSIBLE";
    vector<lli> v,w;
    cin>>n>>m;
    bool s[n],g[n];
    rep(i,0,n){
        s[i]=false;
        g[i]=false;1
    }
    rep(i,0,m){
        cin>>a>>b;
        if(a==1){
            s[b-1]=true;
        }
        if(b==n){
            g[a-1]=true;
        }
    }
    rep(i,0,n){
        if((s[i]==true)&&(g[i]==true)){
            ans="POSSIBLE";
            break;
        }
    }
    cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:21: error: expected ';' before '}' token
   27 |         g[i]=false;1
      |                     ^
      |                     ;
   28 |     }
      |     ~
Language: C++

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 ;
        assert(1<=a && a<b && b<=n);
        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:4:5: error: 'cin' was not declared in this scope
    4 |     cin>>n>>m;
      |     ^~~
a.cc:5:5: error: 'vector' was not declared in this scope
    5 |     vector<bool>vis(n+1,false);
      |     ^~~~~~
a.cc:5:12: error: expected primary-expression before 'bool'
    5 |     vector<bool>vis(n+1,false);
      |            ^~~~
a.cc:11:9: error: 'assert' was not declared in this scope
   11 |         assert(1<=a && a<b && b<=n);
      |         ^~~~~~
a.cc:1:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
  +++ |+#include <cassert>
    1 | int main ()
a.cc:14:16: error: 'vis' was not declared in this scope
   14 |             if(vis[b])
      |                ^~~
a.cc:16:13: error: 'vis' was not declared in this scope
   16 |             vis[b] = true;
      |             ^~~
a.cc:20:16: error: 'vis' was not declared in this scope
   20 |             if(vis[a])
      |                ^~~
a.cc:22:13: error: 'vis' was not declared in this scope
   22 |             vis[a] = true;
      |             ^~~
a.cc:26:9: error: 'cout' was not declared in this scope
   26 |         cout<<"IM";
      |         ^~~~
a.cc:27:5: error: 'cout' was not declared in this scope
   27 |     cout<<"POSSIBLE"<<endl;
      |     ^~~~
a.cc:27:23: error: 'endl' was not declared in this scope
   27 |     cout<<"POSSIBLE"<<endl;
      |                       ^~~~
Language: C++

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 ;
        assert(1<= a && a < b && b <= n);
        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:4:5: error: 'cin' was not declared in this scope
    4 |     cin>>n>>m;
      |     ^~~
a.cc:5:5: error: 'vector' was not declared in this scope
    5 |     vector<bool>vis(n+1,false);
      |     ^~~~~~
a.cc:5:12: error: expected primary-expression before 'bool'
    5 |     vector<bool>vis(n+1,false);
      |            ^~~~
a.cc:11:9: error: 'assert' was not declared in this scope
   11 |         assert(1<= a && a < b && b <= n);
      |         ^~~~~~
a.cc:1:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
  +++ |+#include <cassert>
    1 | int main ()
a.cc:14:16: error: 'vis' was not declared in this scope
   14 |             if(vis[b])
      |                ^~~
a.cc:16:13: error: 'vis' was not declared in this scope
   16 |             vis[b] = true;
      |             ^~~
a.cc:20:16: error: 'vis' was not declared in this scope
   20 |             if(vis[a])
      |                ^~~
a.cc:22:13: error: 'vis' was not declared in this scope
   22 |             vis[a] = true;
      |             ^~~
a.cc:26:9: error: 'cout' was not declared in this scope
   26 |         cout<<"IM";
      |         ^~~~
a.cc:27:5: error: 'cout' was not declared in this scope
   27 |     cout<<"POSSIBLE"<<endl;
      |     ^~~~
a.cc:27:23: error: 'endl' was not declared in this scope
   27 |     cout<<"POSSIBLE"<<endl;
      |                       ^~~~
Language: C++

#include<cstdio>
#include<iostream>
int a[1000010],b[1000010];
int n,m,i;
int c,d;
int main()
{
    cin>>n>>m;
    for(i=1;i<=m;i++)
    {
        scanf("%d%d",&c,&d);
        if(c==1)a[d]=1;
        if(d==n)b[c]=1;
    }
    for(i=1;i<=m;i++)
        if(a[i]==1&&b[i]==1)
        {
            printf("POSSIBLE\n");
            return 0;
        }
    printf("IMPOSSIBLE\n");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |     cin>>n>>m;
      |     ^~~
      |     std::cin
In file included from a.cc:2:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~