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


	int n,m;
	scanf("%d %d",&n,&m);
	int a[m],b[m];
	int temp = 0;	
	for(int i = 0; i < m; i++){
	 	scanf("%d %d",&a[i],&b[i]);
	}
	int ans = 0,cnt = 0;
	for(int i = 0; i < m; i++){
	 	if(a[i] == 1 && b[i] == 2){
	 	 	cnt++;
	 	 	temp = b[i];
	 	}
	 	if(a[i] == temp + 1){
	 	 	cnt++;
	 	 	temp = a[i];
	 	}
	 	if(temp == n){
	 		cnt++;
	 		ans = 1;
	   	}
	}

	if(ans == 1 && cnt <=2) cout << "POSSIBLE" << endl;
	else{
	 	cout << "IMPOSSIBLE" << endl;
	}
	                         

Compiler output:
a.cc:3:14: error: expected constructor, destructor, or type conversion before '(' token
    3 |         scanf("%d %d",&n,&m);
      |              ^
a.cc:4:15: error: size of array 'a' is not an integral constant-expression
    4 |         int a[m],b[m];
      |               ^
a.cc:4:20: error: size of array 'b' is not an integral constant-expression
    4 |         int a[m],b[m];
      |                    ^
a.cc:6:9: error: expected unqualified-id before 'for'
    6 |         for(int i = 0; i < m; i++){
      |         ^~~
a.cc:6:24: error: 'i' does not name a type
    6 |         for(int i = 0; i < m; i++){
      |                        ^
a.cc:6:31: error: 'i' does not name a type
    6 |         for(int i = 0; i < m; i++){
      |                               ^
a.cc:10:9: error: expected unqualified-id before 'for'
   10 |         for(int i = 0; i < m; i++){
      |         ^~~
a.cc:10:24: error: 'i' does not name a type
   10 |         for(int i = 0; i < m; i++){
      |                        ^
a.cc:10:31: error: 'i' does not name a type
   10 |         for(int i = 0; i < m; i++){
      |                               ^
a.cc:25:9: error: expected unqualified-id before 'if'
   25 |         if(ans == 1 && cnt <=2) cout << "POSSIBLE" << endl;
      |         ^~
a.cc:26:9: error: expected unqualified-id before 'else'
   26 |         else{
      |         ^~~~
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
 
 
public class Main {

  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    int target, num;
    String str = br.readLine();
    StringTokenizer st = new StringTokenizer(str);
    target = Integer.parseInt(st.nextToken());
    num =Integer.parseInt(st.nextToken());
    boolean A[] = new boolean[200001];
    boolean B[] = new boolean[200001];
    Arrays.fill(A,false);
    Arrays.fill(B,false);
    for (int i = 0; i < num; i++) {
      int tmp1, tmp2;
      str = br.readLine();
      st = new StringTokenizer(str);
      tmp1 = Integer.parseInt(st.nextToken());
      tmp2 = Integer.parseInt(st.nextToken());
      
      if (tmp1 == 1) {
        A[tmp2] = true;
      } else if (tmp2 == target) {
        B[tmp1] = true;
      }
    }
    for (int i = 0; i <= 200000; i++) {
        if (A[i] && B[i]) {
          System.out.println("POSSIBLE");
          return 0;
        }
    }
      System.out.println("IMPOSSIBLE");
  }
 
}

Compiler output:
Main.java:20: error: cannot find symbol
    Arrays.fill(A,false);
    ^
  symbol:   variable Arrays
  location: class Main
Main.java:21: error: cannot find symbol
    Arrays.fill(B,false);
    ^
  symbol:   variable Arrays
  location: class Main
Main.java:38: error: incompatible types: unexpected return value
          return 0;
                 ^
3 errors
Language: C++

#include <algorithm> 
#include <iostream> 
using namespace std; 
 
int main(){
long long int N,M,a[200000],b[200000],c=200001,d=200002;
cin>>N>>M;
for(int i=0;i<M;i++){
cin>>a[i]>>b[i];
}
for(int i=0;i<M;i++){
if(a[i]==1){
c=b[i];
}
for(int j=0;j<M;j++)
if(b[j]==N){
d=a[j];
}
if(c==d){
cout<<"POSSIBLE"<<endl;
return 0;
}
}
}
cout<<"IMPOSSIBLE"<<endl;
}

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

include <iostream>
using namespace std;
int main(void){
    int N,M,a[200000],b[200000],ke,ke2,flag=0,x=0;
    cin>>N>>M;
    for(int i=0;i<M;i++){
        cin>>a[i]>>b[i];
        if(b[i]==N)x=1;
    }
    if(x==0)cout<<"IMPOSSIBLE"<<endl;
    else{
        for(int i=0;i<M;i++){
            if(a[i]==1){
                ke=b[i];
                for(int j=0;j<M;j++){
                    if(a[j]==ke){
                        if(b[j]==N){
                            cout<<"POSSIBLE"<<endl;
                            ke2=j;
                            break;
                        }
                        if(b[j]!=N){
                            break;
                        }
                    }
                }
            }
            if(b[ke2]==N)break;
            if(i==M-1)cout<<"IMPOSSIBLE"<<endl;
        }
    }
    return 0;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin>>N>>M;
      |     ^~~
a.cc:10:13: error: 'cout' was not declared in this scope
   10 |     if(x==0)cout<<"IMPOSSIBLE"<<endl;
      |             ^~~~
a.cc:10:33: error: 'endl' was not declared in this scope
   10 |     if(x==0)cout<<"IMPOSSIBLE"<<endl;
      |                                 ^~~~
a.cc:18:29: error: 'cout' was not declared in this scope
   18 |                             cout<<"POSSIBLE"<<endl;
      |                             ^~~~
a.cc:18:47: error: 'endl' was not declared in this scope
   18 |                             cout<<"POSSIBLE"<<endl;
      |                                               ^~~~
a.cc:29:23: error: 'cout' was not declared in this scope
   29 |             if(i==M-1)cout<<"IMPOSSIBLE"<<endl;
      |                       ^~~~
a.cc:29:43: error: 'endl' was not declared in this scope
   29 |             if(i==M-1)cout<<"IMPOSSIBLE"<<endl;
      |                                           ^~~~
Language: C++

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

struct Fast {Fast(){std::cin.tie(0);ios::sync_with_stdio(false);}} fast;

typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef queue<int> qi;
typedef stack<int> si;
typedef deque<int> dqi;

#define reps(i, a, b) for (int i = a; i < b; ++i)
#define rep(i, n) reps(i, 0, n)
#define REPS(i, a, b) reps(i, a, b)
#define REP(i, n) rep(i, n)
#define deps(i, a, b) for (int i = a; i >= b; --i)
#define dep(i, n) deps(i, n, 0)
#define DEPS(i, a, b) deps(i, a, b)
#define DEP(i, n) dep(i, n)

#define pf push_front
#define pb push_back
#define mp make_pair
#define fst first
#define FST fst
#define sec second
#define SEC sec
#define sz(obj) ((int)(obj).size())
#define all(v) (v).begin(), (v).end()
#define ALL(v) all(v)

const int INF = 999999999;
const int MOD = 1e9 + 7;
const int dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0};

inline bool inside(int y, int x, int H, int W) {return y >= 0 && x >= 0 && y < H && x < W;}
inline int in() {int x; std::cin >> x; return x;}
template <typename T>
void print(std::vector<T>& v, char c = ' ') {
  REP(i, v.size()) {
    if (i != 0) std::cout << c;
    std::cout << v[i];
  }
  std::cout << endl;
}
template <typename T> void print(T x) { std::cout << x << '\n'; }

bool s[200005], tn[200005];
signed main()
{
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    if (a == 1) {
      s[b] = true;
    }
    if (b == n) {
      tn[a] == true;
    }
  }

  for (int i = 0; i <= n; i++) {
    if (s[i] and tn[i]) {
      printf("POSSIBLE\n");
      return 0;
    }
  }
  printf("IMPOSSIBLE\n")

    return (0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:71:25: error: expected ';' before 'return'
   71 |   printf("IMPOSSIBLE\n")
      |                         ^
      |                         ;
   72 | 
   73 |     return (0);
      |     ~~~~~~
Language: C++

#include<iostream>
#include<vector>
using namespace std;
int main(){
  vector<int> a;
  vector<int> b;
  int n,m;cin >> n >> m;
  for(int i=0; i<m; i++){
    int k1,k2;cin >> k1 >> k2;
    if(k1==n||k2==n){
      a.push_back(n);
      b.push_back(k2-n:k2?k1);
    }else if(k1==1||k2==1){
      a.push_back(1);
      b.push_back(k2-1:k2?k1);
    }else continue;
  }
  for(int i=2; i<m-1; i++){
    bool s=0,e=0;
    for(int j=0; j<a.size(); j++){
      if(i==b[j]){
        if(a[j]==1)s=true;
        else e=true;
      }
      if(s&&e){
        cout << "POSSIBLE\n";
        return 0;
      }
    }
  }
  cout << "IMPOSSIBLE\n";
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:23: error: found ':' in nested-name-specifier, expected '::'
   12 |       b.push_back(k2-n:k2?k1);
      |                       ^
      |                       ::
a.cc:12:22: error: 'n' is not a class, namespace, or enumeration
   12 |       b.push_back(k2-n:k2?k1);
      |                      ^
a.cc:12:29: error: expected ':' before ')' token
   12 |       b.push_back(k2-n:k2?k1);
      |                             ^
      |                             :
a.cc:12:29: error: expected primary-expression before ')' token
a.cc:15:23: error: expected ')' before ':' token
   15 |       b.push_back(k2-1:k2?k1);
      |                  ~    ^
      |                       )
Language: Java

import java.util.*;
import java.lang.*;

class Main {
  public static void main(String []_){
    Vector<int> bet = new Vector<int>();

    int n, m;
    int i;
    int a, b;
    int len;

    Scanner input = new Scanner(System.in);

    n = input.nextInt();
    m = input.nextInt();
    for(i=0; i<m; i++){
      a = input.nextInt();
      b = input.nextInt();
      if(a==1){
        if(bet.indexOf(b)){
          System.out.println("Possible");
          System.exit(0);
        }
        bet.add(b);
      }
      if(b==n){
        if(bet.indexOf(a)){
          System.out.println("Possible");
          System.exit(0);
        }
        bet.add(a);
      }
    }

    System.out.println("Inpossible");
    return 0;    
  }
}

Compiler output:
Main.java:5: error: as of release 9, '_' is a keyword, and may not be used as an identifier
  public static void main(String []_){
                                   ^
1 error
Language: C++

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

int i = 0, j = 0, ans = 0, tmp = 0,a,b;
int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int n ,m;
	cin >> n >> m;
	ans = 0;
	vector<int> s;
	vector<int> g;
	int sc = 0, gc = 0;
	int i = 0, j = 0, ans = 0, tmp = 0;
	for (i; i < m; ++i) {
		cin >> a >> b;
		if (a == 1) {
			s.push_back(b);
			sc++;
		}
		else if (b == n) {
			g.push_back(a);
			gc++;
		}
	}
	sort(s.begin(), s.end());
	sort(g.begin(), g.end());
	i = 0;
	j = 0;
	while (1) {
		if (i > sc - 1 || j > gc - 1) {
			break;
		}
		if ( s[i] == g[j]) {
			ans = 1;
			break;
		}
		if (s[i] < g[j]) {
			i++;
		}
		else {
			j++;
		}
	}



	if (ans == 0) {
		printf("IMPOSSIBLE\n");
	}
	else {
		printf("POSSIBLE\n");
	}
	cin >> a;
	return 0;
}

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

#include <cstdio>
#include <iostream>
#define zz b[j].x1-b[j].x0+b[i].x1-b[i].x0+1==n&&b[j].x1=b[i].x0
const int maxn = 200005;
using namespace std;
struct point {
    int x0, x1;
}a[maxn], b[maxn];
int main()
{
    int n, m, j = 1, nn, k = 1;
    scanf("%d%d", &n, &m);
    for (int i = 1; i <= m; i++){
        scanf("%d%d", &a[i].x0, &a[i].x1);
        if (a[i].x0 == 1 || a[i].x1 == n) {
            b[j++] = a[i];
        }
    }
    nn = j - 1;
    for (int j = 1; j <= nn / 2 + 1; j++)
        for (int i = 1; i <= nn; i++) {
            if (i != j && zz ) {
                printf("POSSIBLE");
                return 0;
            }
        }
    printf("IMPOSSIBLE");
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:3:48: error: lvalue required as left operand of assignment
    3 | #define zz b[j].x1-b[j].x0+b[i].x1-b[i].x0+1==n&&b[j].x1=b[i].x0
      |                                                ^
a.cc:22:27: note: in expansion of macro 'zz'
   22 |             if (i != j && zz ) {
      |                           ^~
Language: C++

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

int main(){
  int n,m;
  cin>>n>>m;
  vector<int> st,end;
  int a,b;
  for(int i=0;i<m;i++){
    cin>>a>>b;
    if(a=1){
      st.push_back(b);
    }
    if(b=n){
      end.push_back(a);
    }
  }
  for(int x : st){
    auto itr = find(end.begin(),end.end(),x);
    if(!itr==end.end()){
      cout<<"POSSIBLE"<<endl;
      return 0;
    }
  }
  cout<<"IMPOSSIBLE"<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:8: error: no match for 'operator!' (operand type is '__gnu_cxx::__normal_iterator<int*, std::vector<int> >')
   22 |     if(!itr==end.end()){
      |        ^~~~
a.cc:22:8: note: candidate: 'operator!(bool)' (built-in)
a.cc:22:8: note:   no known conversion for argument 1 from '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'bool'
Language: C++

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

int main(){
  int n,m;
  cin>>n>>m;
  vector<int> st,end;
  int a,b;
  for(int i=0;i<m;i++){
    cin>>a>>b;
    if(a=1){
      st.push_back(b);
    }
    if(b=n){
      end.push_back(a);
    }
  }
  for(int x : st){
    auto itr = find(end.begin(),end.end(),x);
    if(!itr==end.end()){
      cout<<"POSSIBLE"<<endl;
      return 0;
    }
  }
  cout<<"IMPOSSIBLE"<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:20: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
   20 |     auto itr = find(end.begin(),end.end(),x);
      |                ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
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:20:20: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   20 |     auto itr = find(end.begin(),end.end(),x);
      |                ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<cstdio>
int a[10000];
int b[10000];
int main()
{
	int n,m,A,B;
	int j,k,,i,x,y,temp;
	scanf("%d%d",&n,&m);
	{
		temp=0;
		j=0,k=0;
		for(i=0;i<m;i++)
		{
			scanf("%d%d",&A,&B);
			if(A==1) {
				a[j]=B;
				j++;
			}
			if(B==n) {
				b[k]=A;
				k++;
			}
		}
	    for(x=0;x<j;x++)
	    {
	    	for(y=0;y<k;y++)
	    	if(a[x]==b[y])
	    	{
	    		temp=1;
	    		break;
	    	}
	    }
	    if(temp) printf("POSSIBLE\n");
	    else printf("IMPOSSIBLE\n");
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: expected unqualified-id before ',' token
    7 |         int j,k,,i,x,y,temp;
      |                 ^
Language: C++

#include <iostream>
#include <cstdio>
using namespace std;
int a[200005],b[200005],c[200005];
int main()
{
    int n,m,i,j,k,l;
    int flag=0;
    while(scanf("%d%d",&n,&m)!=EOF)
    {
    	for(i=0;i<m;i++)
    	{
    	scanf("%d%d",&a[i],&b[i]);}
	
    	for(i=0,j=0,k=0;i<m;i++)
	    {if(a[i]==1&&a[i]!=n)
	    {
			 b[j++]=a[i];
        }
		if(a[i]==n)
	    {
    		 c[k++]=a[i];
    	}
	    }
	    sort(b,b+j);
	    sort(c,c+k);
	   	for(i=0;i<j&&l<k;)
	{
		if(b[i]==c[l]){flag=1;break;}
		else if(b[i]>c[l])l++;
		else if(b[i]<c[l])i++;
	}
	if(flag)printf("POSSIBLE\n");
	else printf("IMPOSSIBLE\n");	
    }
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:13: error: 'sort' was not declared in this scope; did you mean 'short'?
   25 |             sort(b,b+j);
      |             ^~~~
      |             short
Language: C

#include<stdio.h>

const int N=10000;
int a[N][N];


int main()
{
  int n,m,x;
  while(scanf("%d%d",&n,&m)!=EOF)
  {
      int flag=1;
      for(int i=0;i<m;i++)
        for(int j=0;j<2;j++)
      {
        scanf("%d",&a[i][j]);

      }

       for(int i=0;i<m;i++)
  {
      int x;
      if(a[i][0]==1)
      {
        x=a[i][1];
       for(int j=0;j<m;j++)
       {
           if(a[j][0]==x&&a[j][1]==n)
           {
                 printf("POSSIBLE\n");
                 flag=0;
           }
       }
      }



  }
  if(flag)
  {
     printf("IMPOSSIBLE\n");
  }


  }

}


Compiler output:
main.c:4:5: error: variably modified 'a' at file scope
    4 | int a[N][N];
      |     ^
main.c:4:5: error: variably modified 'a' at file scope
Language: C

#include<stdio.h>

const  int N=100;
int  a[N][N];
int main()
{
  int n,m,x;
  while(scanf("%d%d",&n,&m)!=EOF)
  {
      int flag=1;
      for(int i=0;i<m;i++)
        for(int j=0;j<2;j++)
      {
        scanf("%d",&a[i][j]);

      }

       for(int i=0;i<m;i++)
  {
      int x;
      if(a[i][0]==1)
      {
        x=a[i][1];
       for(int j=0;j<m;j++)
       {
           if(a[j][0]==x&&a[j][1]==n)
           {
                 printf("POSSIBLE\n");
                 flag=0;
           }
       }
      }



  }
  if(flag)
  {
     printf("IMPOSSIBLE\n");
  }


  }

}


Compiler output:
main.c:4:6: error: variably modified 'a' at file scope
    4 | int  a[N][N];
      |      ^
main.c:4:6: error: variably modified 'a' at file scope
Language: Java

import java.util.ArrayList;
import java.util.IdentityHashMap;
import java.util.Map;
import java.util.Scanner;

public class CopyOfMain {

	public static void main(String[] args) {
		
		Map<Integer ,Integer> map = new IdentityHashMap<Integer ,Integer>();
		ArrayList<Integer> list = new ArrayList<Integer>();
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		sc.nextLine();
		for (int i = 0; i < m; i++) {
			Integer a = new Integer(sc.nextInt());
			Integer b = new Integer(sc.nextInt());
			if (a == 1 || b == 1) {
				if (b < a) {
					map.put(b, a);
					list.add(b);
				} else {
					map.put(a, b);
					list.add(a);
				}
			} else if (a == n || b == n) {
				if (b > a) {
					map.put(b, a);
					list.add(b);
				} else {
					map.put(a, b);
					list.add(a);
				}
			}
			sc.nextLine();
		}
		sc.close();
		String result = "IMPOSSIBLE";
		boolean stopFlag = false;
		for (Integer intI : list) {
			if (intI == 1) {
				int middle = map.get(intI);
				for (Integer intSubI : list) {
					if (intSubI == n) {
//						int end = map.get(intSubI);
						if (map.get(intSubI) == middle) {
							result = "POSSIBLE";
							stopFlag = true;
							break;
						}
					}
				}
			}
			if (stopFlag) {
				break;
			}
		}
		System.out.println(result);
	}
}

Compiler output:
Main.java:6: error: class CopyOfMain is public, should be declared in a file named CopyOfMain.java
public class CopyOfMain {
       ^
Main.java:17: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
			Integer a = new Integer(sc.nextInt());
			            ^
Main.java:18: warning: [removal] Integer(int) in Integer has been deprecated and marked for removal
			Integer b = new Integer(sc.nextInt());
			            ^
1 error
2 warnings
Language: C++

#include <iostream>
using namespace std;
bool map[200001][200001];
int n,x,y,m,num=0;
int main()
{
	cin>>n>>m;
	for(int var1=1;var1<=m;var1++)
	{
		cin>>x>>y;
		map[x][y]=1;
	}
	for(int var1=1;var1<=n;var1++)
	{
		if(map[1][var1]==1&&map[var1][n]==1)
		{
			cout<<"POSSIBLE";
			num++;
			break;
		}
    }
	if(num==0) cout<<"IMPOSSIBLE";
	return 0;
}

Compiler output:
/tmp/ccAYnM1u.o: in function `main':
a.cc:(.text+0xb): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccAYnM1u.o
a.cc:(.text+0x27): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccAYnM1u.o
a.cc:(.text+0x42): relocation truncated to fit: R_X86_64_PC32 against symbol `x' defined in .bss section in /tmp/ccAYnM1u.o
a.cc:(.text+0x5e): relocation truncated to fit: R_X86_64_PC32 against symbol `y' defined in .bss section in /tmp/ccAYnM1u.o
a.cc:(.text+0x6f): relocation truncated to fit: R_X86_64_PC32 against symbol `x' defined in .bss section in /tmp/ccAYnM1u.o
a.cc:(.text+0x75): relocation truncated to fit: R_X86_64_PC32 against symbol `y' defined in .bss section in /tmp/ccAYnM1u.o
a.cc:(.text+0x9b): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccAYnM1u.o
a.cc:(.text+0xc7): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccAYnM1u.o
a.cc:(.text+0x10d): relocation truncated to fit: R_X86_64_PC32 against symbol `num' defined in .bss section in /tmp/ccAYnM1u.o
a.cc:(.text+0x116): relocation truncated to fit: R_X86_64_PC32 against symbol `num' defined in .bss section in /tmp/ccAYnM1u.o
a.cc:(.text+0x122): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
using namespace std;
bool map[200001][200001];
int n,x,y,m,num=0;
int main()
{
	cin>>n>>m;
	for(int var1=1;var1<=m;var1++)
	{
		cin>>x>>y;
		map[x][y]=1;
	}
	for(int var1=1;var1<=n;var1++)
	{
		if(map[1][var1]==1&&map[var1][n]==1)
		{
			cout<<"POSSIBLE";
			num++;
			break;
		}
    }
	if(num==0) cout<<"IMPOSSIBLE";
	return 0;
}

Compiler output:
/tmp/ccqLGAX0.o: in function `main':
a.cc:(.text+0xb): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccqLGAX0.o
a.cc:(.text+0x27): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccqLGAX0.o
a.cc:(.text+0x42): relocation truncated to fit: R_X86_64_PC32 against symbol `x' defined in .bss section in /tmp/ccqLGAX0.o
a.cc:(.text+0x5e): relocation truncated to fit: R_X86_64_PC32 against symbol `y' defined in .bss section in /tmp/ccqLGAX0.o
a.cc:(.text+0x6f): relocation truncated to fit: R_X86_64_PC32 against symbol `x' defined in .bss section in /tmp/ccqLGAX0.o
a.cc:(.text+0x75): relocation truncated to fit: R_X86_64_PC32 against symbol `y' defined in .bss section in /tmp/ccqLGAX0.o
a.cc:(.text+0x9b): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccqLGAX0.o
a.cc:(.text+0xc7): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccqLGAX0.o
a.cc:(.text+0x10d): relocation truncated to fit: R_X86_64_PC32 against symbol `num' defined in .bss section in /tmp/ccqLGAX0.o
a.cc:(.text+0x116): relocation truncated to fit: R_X86_64_PC32 against symbol `num' defined in .bss section in /tmp/ccqLGAX0.o
a.cc:(.text+0x122): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include<iostream>
#include <vector>

using namespace std;

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

	vector<int> a, b;

	for(int i = 0; i < m; i++)
	{
		int a_, b_;
		cin >> a_;
		cin >> b_;
		a.push_back(a_);
		b.push_back(b_);
	}

	if(m == 1)
	{
		cout << "IMPOSSIBLE" << endl;
		return 0;
	}

	auto it = a.begin();
	const auto end = a.end();
	for(it = find(it, end, 1); it != end; it = find(it, end, 1))
	{
		size_t i = distance(a.begin(), it);
		for (int u = 0; u < m; u++)
		{
			if (b[i] == a[u] && b[u] == n)
			{
				cout << "POSSIBLE" << endl;
				return 0;
			}
		}
	}

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


Compiler output:
a.cc: In function 'int main()':
a.cc:31:22: error: no matching function for call to 'find(__gnu_cxx::__normal_iterator<int*, std::vector<int> >&, const __gnu_cxx::__normal_iterator<int*, std::vector<int> >&, int)'
   31 |         for(it = find(it, end, 1); it != end; it = find(it, end, 1))
      |                  ~~~~^~~~~~~~~~~~
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:31:22: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   31 |         for(it = find(it, end, 1); it != end; it = find(it, end, 1))
      |                  ~~~~^~~~~~~~~~~~
a.cc:31:56: error: no matching function for call to 'find(__gnu_cxx::__normal_iterator<int*, std::vector<int> >&, const __gnu_cxx::__normal_iterator<int*, std::vector<int> >&, int)'
   31 |         for(it = find(it, end, 1); it != end; it = find(it, end, 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:31:56: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   31 |         for(it = find(it, end, 1); it != end; it = find(it, end, 1))
      |                                                    ~~~~^~~~~~~~~~~~
Language: C++

#include<iostream>
#include <vector>

using namespace std;

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

	vector<int> a, b;

	for(int i = 0; i < m; i++)
	{
		int a_, b_;
		cin >> a_;
		cin >> b_;
		a.push_back(a_);
		b.push_back(b_);
	}

	if(m == 1)
	{
		cout << "IMPOSSIBLE" << endl;
		return 0;
	}

	auto it = a.begin(), end = a.end();
	for(it = find(it, end, 1); it != end; it = find(it, end, 1))
	{
		size_t i = distance(a.begin(), it);
		for (int u = 0; u < m; u++)
		{
			if (b[i] == a[u] && b[u] == n)
			{
				cout << "POSSIBLE" << endl;
				return 0;
			}
		}
	}

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


Compiler output:
a.cc: In function 'int main()':
a.cc:30:22: error: no matching function for call to 'find(__gnu_cxx::__normal_iterator<int*, std::vector<int> >&, __gnu_cxx::__normal_iterator<int*, std::vector<int> >&, int)'
   30 |         for(it = find(it, end, 1); it != end; it = find(it, end, 1))
      |                  ~~~~^~~~~~~~~~~~
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:30:22: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   30 |         for(it = find(it, end, 1); it != end; it = find(it, end, 1))
      |                  ~~~~^~~~~~~~~~~~
a.cc:30:56: error: no matching function for call to 'find(__gnu_cxx::__normal_iterator<int*, std::vector<int> >&, __gnu_cxx::__normal_iterator<int*, std::vector<int> >&, int)'
   30 |         for(it = find(it, end, 1); it != end; it = find(it, end, 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:30:56: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   30 |         for(it = find(it, end, 1); it != end; it = find(it, end, 1))
      |                                                    ~~~~^~~~~~~~~~~~
Language: C++

#include<iostream>
#include<cstdio>
using namespace std;
int main(){
    int n,m;
    cin>>n>>m;
    int bWhenA1[m],aWhenBn[m];

    int j=0,k=0;
    for(int i=0;i<m;i++){
        int a,b;
        scanf("%d %d",&a,&b);
        if(a[i]==1)bWhenA1[j++]=b;
        if(b[i]==n)aWhenBn[k++]=a;
    }
    
    for(int i=0;i<j;i++){
        for(int l=0;l<k;l++){
            if(bWhenA1[i]==aWhenBn[l]){
                ans++;
                break;
            }
        }
        if(ans>0)break;
    }
    if(ans>0)cout<<"POSSIBLE"<<endl;
    else cout<<"IMPOSSIBLE"<<endl;
 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: invalid types 'int[int]' for array subscript
   13 |         if(a[i]==1)bWhenA1[j++]=b;
      |             ^
a.cc:14:13: error: invalid types 'int[int]' for array subscript
   14 |         if(b[i]==n)aWhenBn[k++]=a;
      |             ^
a.cc:20:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   20 |                 ans++;
      |                 ^~~
      |                 abs
a.cc:24:12: error: 'ans' was not declared in this scope; did you mean 'abs'?
   24 |         if(ans>0)break;
      |            ^~~
      |            abs
a.cc:26:8: error: 'ans' was not declared in this scope; did you mean 'abs'?
   26 |     if(ans>0)cout<<"POSSIBLE"<<endl;
      |        ^~~
      |        abs
Language: C++

#include<iostream>
#include<stdio.h>
#include<algorithm>
using namespace std;

int main(){
unsigned  l,p,*s,*g,t[2],i[3]={0,0,0};
bool f = false;

scanf("%d%d",&l,&p);
s = new unsigned[p];
g = new unsigned[p];

for(int j=0;j<p;j++){
 scanf("%d%d",t,t+1);
// cin >> t[0] >> t[1];
 if(t[0]==1){
  s[i[0]]=t[1];i[0]++;
 }else if(t[1]==l){
  g[i[1]]=t[0];i[1]++;
}
}
sort(s,s+i[0]);
sort(g,g+i[1]);
unsigned cnt = l - i[0]+i[1];
if(i[0]<i[1])
for(int j=0;j<i[0];j++){
 for(int k=i[3];k<i[1];k++){
  if(s[j]==g[k]){f=true;break;}
 else if(s[j]>g[k])i[3]++;
}
else
for(int j=0;j<i[1];j++){
 for(int k=i[3];k<i[0];k++){
  if(g[j]==s[k]){f=true;break;}
 else if(g[j]>s[k])i[3]++;
}
  cnt--;
  if(!cnt){f=true;break;}
}

if(!f)
cout << "IM";
cout << "POSSIBLE";
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:1: error: 'else' without a previous 'if'
   32 | else
      | ^~~~
a.cc:46:2: error: expected '}' at end of input
   46 | }
      |  ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

#include <cstdio>
#include <iostream>
const int maxn = 200000 + 10;
using namespace std;
struct point {
    int x0, x1;
}a[maxn], b[maxn];
int main()
{
    int n, m, j = 1, nn;
    scanf("%d%d", &n, &m);
    for (int i = 1; i <= m; i++){
        scanf("%d%d", &a[i].x0, &a[i].x1);
        if (a[i].x0 == 1 || a[i].x1 == n) {
            b[j++] = a[i];
        }
    }
    nn = j - 1;
    for (int j = 1; j <= nn / 2; j++) {
        for (int i = 1; i <= nn; i++) {
            if (i != j && (b[j].x1 == b[i].x0 || b[j].x0 == b[i].x1){
                printf("POSSIBLE\n");
                return 0;
            }
        }
    }
    printf("IMPOSSIBLE\n");
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:69: error: expected ')' before '{' token
   21 |             if (i != j && (b[j].x1 == b[i].x0 || b[j].x0 == b[i].x1){
      |                ~                                                    ^
      |                                                                     )
a.cc:25:9: error: expected primary-expression before '}' token
   25 |         }
      |         ^
Language: C++

#include<cmath>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
const int maxn=200000+10;
bool  a[maxn][maxn],n,m;
bool check()
{
	for(long i=n-1;i>=1;i--)
	{
		if(a[n][i]==true)
		{
			if(a[i][1]==true)
				return true;	
		}	
	}
	return false;
}
int main()
{
	
	cin>>n;
	cin>>m;
	//cout<<n<<m<<endl;
	long i;
	memset(a,0,sizeof(a));
	for(i=0;i<m;i++)
	{
		long x,y;
		cin>>x;
		cin>>y;
		a[x][y]=true;
		a[y][x]=true;
	}
	if(check())
		cout<<"POSSIBLE"<<endl;
	else
		cout<<"IMPOSSIBLE"<<endl;
		
}

Compiler output:
/tmp/cc2Ln0pN.o: in function `check()':
a.cc:(.text+0x7): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc2Ln0pN.o
a.cc:(.text+0x1c): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc2Ln0pN.o
/tmp/cc2Ln0pN.o: in function `main':
a.cc:(.text+0x8b): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc2Ln0pN.o
a.cc:(.text+0xa4): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/cc2Ln0pN.o
a.cc:(.text+0x157): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/cc2Ln0pN.o
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include <vector>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;
typedef pair<int, int> P;
typedef pair<llong, llong> LP;
typedef pair<int, P> PP;
typedef pair<llong, LP> LPP;

int dy[]={0, 0, 1, -1};
int dx[]={1, -1, 0, 0};

vector< vector< int> > input(2000001);
int N, M;


int main(){
    cin >> N >> M;
    REP(i, M){
        int a, b;
        cin >> a >> b;
        input[a].pb(b);
    }
    int flag = 0;
    REP(i, 200001){
        REP(j, input[i].size()){
            if(count(input[input[1][i]].begin(), input[input[1][i]].end(), N) > 0){
                flag = 1;
            }
        }
    }
    if(flag){
        cout << "POSSIBLE" << endl;
    }else{
        cout << "IMPOSSIBLE" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:16: error: 'count' was not declared in this scope
   35 |             if(count(input[input[1][i]].begin(), input[input[1][i]].end(), N) > 0){
      |                ^~~~~
Language: C++

#include<cmath>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
const long maxn=200000+10;
long  a[maxn][maxn],n,m;
int check()
{
	for(long i=n-1;i>=1;i--)
	{
		if(a[n][i]==1)
		{
			if(a[i][1]==1)
				return 1;	
		}	
	}
	return 0;
}
int main()
{
	
	cin>>n;
	cin>>m;
	//cout<<n<<m<<endl;
	long i;
	memset(a,0,sizeof(a));
	for(i=0;i<m;i++)
	{
		long x,y;
		cin>>x;
		cin>>y;
		a[x][y]=1;
		a[y][x]=1;
	}
	if(check())
		cout<<"POSSIBLE"<<endl;
	else
		cout<<"IMPOSSIBLE"<<endl;
		
}

Compiler output:
/tmp/ccxeOGQp.o: in function `check()':
a.cc:(.text+0x7): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccxeOGQp.o
a.cc:(.text+0x18): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccxeOGQp.o
/tmp/ccxeOGQp.o: in function `main':
a.cc:(.text+0x84): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccxeOGQp.o
a.cc:(.text+0x9d): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccxeOGQp.o
a.cc:(.text+0x167): relocation truncated to fit: R_X86_64_PC32 against symbol `m' defined in .bss section in /tmp/ccxeOGQp.o
collect2: error: ld returned 1 exit status
Language: C++

#include "stdafx.h"
#include <stdio.h>
#include <string.h>
#include <iostream>

using namespace std;

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

	int a, b;
	int rma = 0, rmb;
	bool flag = false;
	while (cin >> a >> b) {
		if (b == N) {
			rma = a;
			if (a == 1) {
				flag = true;
				break;
			}
		}
		else if (a == 1) {
			rmb = b;
			if (rma == rmb) {
				flag = true;
				break;
			}
		}

	}
	if (flag == true) {
		cout << "POSSIBLE";
	}
	else {
		cout << "IMPOSSIBLE";
	}
	return 0;
}

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

#include<cstdio>
int num[200000][2]
int a[10];
int b[10];
int main()
{
	int n,m;
	int j,k,x,y,temp;
	while(scanf("%d%d",&n,&m)!=EOF)
	{
		j=0,k=0;
		temp=0;
		for(int i=0;i<m;i++)
		{
		scanf("%d%d",&num[i][0],&num[i][1]);
		if(num[i][0]==1){
			a[j]=num[i][1];
			j++;
		}
		if(num[i][1]==n)
		{
			b[k]=num[i][0];
			k++;
		}
	    }
	    for(x=0;x<j;x++)
	    {
	    	for(y=0;y<k;y++)
	    	if(a[x]==b[y]) temp=1;
	    }
	    if(temp) printf("POSSIBLE\n");
	    else printf("IMPOSSIBLE\n");
	}
	return 0;
}

Compiler output:
a.cc:3:1: error: expected initializer before 'int'
    3 | int a[10];
      | ^~~
a.cc: In function 'int main()':
a.cc:15:31: error: 'num' was not declared in this scope; did you mean 'enum'?
   15 |                 scanf("%d%d",&num[i][0],&num[i][1]);
      |                               ^~~
      |                               enum
a.cc:17:25: error: 'a' was not declared in this scope
   17 |                         a[j]=num[i][1];
      |                         ^
a.cc:29:20: error: 'a' was not declared in this scope
   29 |                 if(a[x]==b[y]) temp=1;
      |                    ^
Language: C++

#include "stdafx.h"
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
#define REP(i, a, n) for(int i=a; i<n; i++)

bool flag[200001];
int main()
{
	int N, M;
	cin >> N >> M;
	vector<vector<int>> route(N);
	REP(i, 0, M) {
		int a, b;
		cin >> a >> b;
		a--;
		b--;
		route[a].push_back(b);
		route[b].push_back(a);
	}

	REP(i, 0, route[0].size()) {
		flag[route[0][i]] = true;
	}
	bool possible = false;
	REP(i, 0, route[N - 1].size()) {
		if (flag[route[N - 1][i]]) possible = true;
	}

	if (possible) cout << "POSSIBLE" << endl;
	else cout << "IMPOSSIBLE" << endl;
	return 0;
}

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

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

int dp[103];

const int INF = 0x3f3f3f3f;
const int MAXN = 1000010;
struct qnode{
    int v;
    int c;
    qnode(int _v=0,int _c=0):v(_v),c(_c){}
    bool operator < (const qnode &r) const
        {
            return c > r.c;
        }
};
struct Edge
{
    int v,cost;
    Edge(int _v=0,int _cost=0):v(_v),cost(_cost){}
};
vector<Edge>E[MAXN];
bool vis[MAXN];
int dist[MAXN];
void Dijkstra(int n,int start)//点的编号从1开始
{
    memset(vis,false,sizeof(vis));
    for(int i = 1; i <= n; i++) dist[i] = INF;
    priority_queue <qnode> que;
    while(!que.empty()) que.pop();
    dist[start] = 0;
    que.push(qnode(start,0));
    qnode tmp;
    while(!que.empty())
    {
        tmp = que.top();
        que.pop();
        int u = tmp.v;
        if(vis[u]) continue;
        vis[u] = true;
        for(int i = 0; i < E[u].size(); i++)
        {
            int v = E[tmp.v][i].v;
            int cost = E[u][i].cost;
            if(!vis[v]&&dist[v]>dist[u] + cost)
            {
                dist[v] = dist[u] + cost;
                que.push(qnode(v,dist[v]));
            }
        }
    }
}
void addedge(int u,int v,int w)
{
    E[u].push_back(Edge(v,w));
}


int main()
{
    freopen("/Users/ecooodt/Desktop/c++ and acm/_集训/atcode/1/1.txt","r",stdin);
    int cnt = 0;
    int a,b;
    int n = 0;
//    for(int i = 0 ; i < )
    while(~scanf("%d%d",&a,&b))
    {
        addedge(a,b,1);
        cnt ++;
        n = max(b,n);
    }
    Dijkstra(n,1);
//    printf("%d\n",n);
    int t = dist[n];
    if(t > 2)
    {
        printf("IMPOSSIBLE\n");
//        printf("%d",t);
    }

    else
    {
        printf("POSSIBLE\n");
//        printf("%d",t);
    }
}

Compiler output:
a.cc: In function 'void Dijkstra(int, int)':
a.cc:29:5: error: 'memset' was not declared in this scope
   29 |     memset(vis,false,sizeof(vis));
      |     ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <queue>
  +++ |+#include <cstring>
    4 | using namespace std;
Language: C++

#include<stdio.h>
 
int main()
{
	int N, M;
	int ship[200000][2];//ship[from][to]
	scanf("%d %d", &N, &M);
	int i, list[200000] = {}, j = 0;
	for ( i = 0; i < M; i++)
	{
		scanf("%d %d", &ship[i][0], &ship[i][1]);
		if (ship[i][0] == 1)
		{
			list[j] = ship[i][1];
			j++;
		}
	}
 
	for(i=0;i<M;i++)
		if (ship[i][1]==N)
		{
			for ( j = 0; list[j]; j++)
			{
				if (ship[i][0]==list[j])
				{
					printf("POSSIBLE");
					return 0;
				}
			}
		}
 
	printf("IMPOSSIBLE");
	return 0;
}

Compiler output:
a.cc:2:1: error: extended character   is not valid in an identifier
    2 |  
      | ^
a.cc:18:1: error: extended character   is not valid in an identifier
   18 |  
      | ^
a.cc:31:1: error: extended character   is not valid in an identifier
   31 |  
      | ^
a.cc:2:1: error: '\U000000a0' does not name a type
    2 |  
      | ^
Language: C++

#include <iostream>
#include <cstdio>
using namespace std;
int a[200005];
int b[200005];
int c[200005];
int main()
{
	int m,n;
	while(~scanf("%d%d",&n,&m))
	{
		memset(c,0,sizeof(c));
		memset(a,0,sizeof(a));
		memset(b,0,sizeof(b));
		for(int i=0;i<m;++i)
		{
			scanf("%d%d",&a[i],&b[i]);
			if(a[i] == 1)
				c[b[i]]++;
			if(a[i] == n)
				c[b[i]]++;
			if(b[i] == 1)
				c[a[i]]++;
			if(b[i] == n)
				c[a[i]]++;
		}
		int flag = 0;
		for(int i=0;i<n;++i)
		{
			if(c[i] >= 2)
			{
				flag = 1;
				break;
			}
		}
		if(flag)
			printf("POSSIBLE\n");
		else
			printf("IMPOSSIBLE\n");
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: 'memset' was not declared in this scope
   12 |                 memset(c,0,sizeof(c));
      |                 ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <cstdio>
  +++ |+#include <cstring>
    3 | using namespace std;
Language: C++

#include<iostream>
int N, M;
int a[2000000], b[2000000];
int P[2000000], Q[2000000];
int count;
int ans=0;

int solve() {
	for (int i = 0; i < count; i++) {
		for (int j = 0; j < M; j++) {
			if (a[j] == P[i] && b[j] == N) {
				ans = 1;
				return 0;
			}
		}
	}
}
int main() {
	std::cin >> N >> M;
	for (int i = 0; i < M; i++) {
		std::cin >> a[i] >> b[i];
		if (a[i] == 1) {
			P[count] = b[i];
			count++;
		}
	solve();
	if (ans == 1) {
		std::cout << "POSSIBLE" << "\n";
	}
	else {
		std::cout << "IMPOSSIBLE" << "\n";
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:2: error: expected '}' at end of input
   34 | }
      |  ^
a.cc:18:12: note: to match this '{'
   18 | int main() {
      |            ^
a.cc: In function 'int solve()':
a.cc:17:1: warning: control reaches end of non-void function [-Wreturn-type]
   17 | }
      | ^
Language: C

#include <stdio.h>
int main(void){
    int n,m;
    int a[200000]={0};
    int b[200000]={0};
    int c[200000]={0};
    int i,j;
    int flag = 0;
    int cnt = 0;
    int cnt_b = 0;
    scanf("%d %d",&n,&m);
    for(i=0;i<m;i++){
        scanf("%d %d",&a[i],&b[i]);
    }
    for(i=0;i<m;i++){
        if(a[i] == 1){
            c[cnt++] = i;
        }
    }
    for(i=0;i<m;i++){
      if(b[i] == n){
        d[cnt_b++] = i;
      }
    }
    for(i=0;i<cnt;i++){
      for(j=0;j<cnt_b;j++){
        if(c[i] == d[j]){
          printf("POSSIBLE");
          return 0;
        }
      }
    }
    if(flag == 0){
        printf("IMPOSSIBLE");
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:9: error: 'd' undeclared (first use in this function)
   22 |         d[cnt_b++] = i;
      |         ^
main.c:22:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
int main(void){
    int n,m;
    int a[200000]={0};
    int b[200000]={0};
    int c[200000]={0};
    int i,j;
    int flag = 0;
    scanf("%d %d",&n,&m);
    for(i=0;i<m;i++){
        scanf("%d %d",&a[i],&b[i]);
    }
    int cnt = 0;
    for(i=0;i<m;i++){
        if(a[i] == 1){
            c[cnt++] = i;
        }
    }
    int cnt_b = 0;
    for(i=0;i<m;i++){
      if(b[i] == n){
        d[cnt_b++] = i;
      }
    }
    int cnt_b = 0;
    for(i=0;i<cnt;i++){
      for(j=0;j<cnt_b;j++){
        if(c[i] == d[j]){
          printf("POSSIBLE");
          return 0;
        }
      }
    }
    if(flag == 0){
        printf("IMPOSSIBLE");
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:9: error: 'd' undeclared (first use in this function)
   22 |         d[cnt_b++] = i;
      |         ^
main.c:22:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:9: error: redefinition of 'cnt_b'
   25 |     int cnt_b = 0;
      |         ^~~~~
main.c:19:9: note: previous definition of 'cnt_b' with type 'int'
   19 |     int cnt_b = 0;
      |         ^~~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#define maxN 2000000

using namespace std;

int N,M;
int ED[maxN][maxN];
bool e_flg=false;

void dfs(int n, int c){
    if(e_flg) return;
    if(c==2 && n==N){
        cout<<"POSSIBLE"<<endl;
        e_flg=true;
        return;
    }
    for(int i = 1; i <= N; i++){
        if(i==n) continue;
        else if(ED[n][i]==1) dfs(i,c+1);
    }
}

int main(void){
    cin.sync_with_stdio(false);
    cin>>N>>M;
    for(int i = 1; i <= N; i++){
        ED[i][i] = 0;
    }
    for(int i = 0; i < M; i++){
        int a,b;
        cin>>a>>b;
        ED[a][b] = 1;
    }
    dfs(1,0);
    if(e_flg==false) cout<<"IMPOSSIBLE"<<endl;
    return 0;
}

Compiler output:
/tmp/cc1pWZcn.o: in function `dfs(int, int)':
a.cc:(.text+0x11): relocation truncated to fit: R_X86_64_PC32 against symbol `e_flg' defined in .bss section in /tmp/cc1pWZcn.o
a.cc:(.text+0x5b): relocation truncated to fit: R_X86_64_PC32 against symbol `e_flg' defined in .bss section in /tmp/cc1pWZcn.o
/tmp/cc1pWZcn.o: in function `main':
a.cc:(.text+0x1b7): relocation truncated to fit: R_X86_64_PC32 against symbol `e_flg' defined in .bss section in /tmp/cc1pWZcn.o
collect2: error: ld returned 1 exit status