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

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define fo(a,b) for(int a=0;a<b;a++)
#define Sort(a) sort(a.begin(),a.end())
#define rev(a) reverse(a.begin(),a.end())
 int wari(int a,int b) {
   if(a%b==0)
     return a/b;
   else
     return a/b+1;
 }
 int keta(int a){//桁数
  double b=a;
  b=log10(b);
  int c=b;
  return c+1;
 }
 int souwa(int a){
  return a*(a+1)/2;
 }
 int lcm(int a,int b){//最小公倍数
  int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return d*e/f;
    }
  int gcm(int a,int b){//最大公約数
      int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return f;
  }
signed main(){
  int a,b,e,f=0,g;
  cin>>a>>b;
  vector<pair<int,int>> c(b)
  fo(i,b)
    cin>>c[i].first>>c[i].second;
  Sort(c);
  vector<int> d;
  fo(i,b){
    if(c[i].first==1)
      d.push_back(c[i].second);
    else
      break;
  }
  int l=0,r=d.size()-1;
  fo(i,b){
    e=1;
    if(c[i].second==a)
      while(e){
        g=(r+l)/2;
        if(d[g]==c[i].first){
          f=1;
          break;
        }
        else{
          if(l==g&&r==g)
            break;
          if(d[g]<c[i].first)
            l=g;
          else
            r=g;
        }
      }
  }
  if(f)
    cout<<"POSSIBLE"<<endl;
  else
    cout<<"IMPOSSIBLE"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:17: error: expected ',' or ';' before 'for'
    4 | #define fo(a,b) for(int a=0;a<b;a++)
      |                 ^~~
a.cc:62:3: note: in expansion of macro 'fo'
   62 |   fo(i,b)
      |   ^~
a.cc:62:6: error: 'i' was not declared in this scope
   62 |   fo(i,b)
      |      ^
a.cc:4:29: note: in definition of macro 'fo'
    4 | #define fo(a,b) for(int a=0;a<b;a++)
      |                             ^
Language: C

#include <stdio.h>

int main(void){
  int n,m,a,b;
  int fl[200001]={0};
  scanf("%d %d",&n,&m);
  for(int i=0;i<m;i++){
    scanf("%d %d",&a,&b);
    if(a==1){
      fl[b]=fl[b]+1;
    }
    if(b==n){
      fl[a]|=fl[a]+1;
    }
  }
  for(i=1;i<=n;i++){
    if(fl[i]==2){
      printf("POSSIBLE\n");
      break;
    }
  }
  printf("IMPOSSIBLE\n");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:7: error: 'i' undeclared (first use in this function)
   16 |   for(i=1;i<=n;i++){
      |       ^
main.c:16:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<bits/stdc++.h>
#define itn int
#define REP(i,n) for(int i=0;i<n;i++)
#define IREP(i,n) for(int i=n-1;i>=0;i--)
#define FOR(i,k,n) for(int i=k;i<n;i++)
#define REPEACH(itr,k) for(auto itr : k)
#define MOD 1000000007

using namespace std;
typedef long long ll;

const ll INF = 1LL<<60;
typedef pair<double,int> P;

vector<vector<int>> v(200000,vector<int>());
bool ans(int x){
	if(x==n){
		return true;
	}
	REP(i,v[x].size()){
		return ans(v[x][i]);
	}
}
int main(){
	int n,m;
	cin >> n >> m;
	REP(i,n){
		int a,b;
		cin >> a >> b;
		v[a].push_back(b);
		v[b].push_back(a);
	}
	REP(i,v[0].size()){
		bool a=ans(v[0][i]);
		if(a==true){
			cout << "POSSIBLE" << endl;
			return 0;
		}
	}
	cout << "IMPOSSIBLE" << endl;
}

Compiler output:
a.cc: In function 'bool ans(int)':
a.cc:17:15: error: 'n' was not declared in this scope
   17 |         if(x==n){
      |               ^
a.cc:23:1: warning: control reaches end of non-void function [-Wreturn-type]
   23 | }
      | ^
Language: C++

#include<bits/stdc++.h>
#define itn int
#define REP(i,n) for(int i=0;i<n;i++)
#define IREP(i,n) for(int i=n-1;i>=0;i--)
#define FOR(i,k,n) for(int i=k;i<n;i++)
#define REPEACH(itr,k) for(auto itr : k)
#define MOD 1000000007

using namespace std;
typedef long long ll;

const ll INF = 1LL<<60;
typedef pair<double,int> P;

vector<vector<int>> v(200000,vector<int>());
bool ans(int x){
	if(x==n){
		return true;
	}
	REP(i,v[x].size()){
		return ans(v[x][i]);
	}
}
int main(){
	int n,m;
	cin >> n >> m;
	REP(i,n){
		int a,b;
		cin >> a >> b;
		v[a].push_back(b);
		v[b].push_back(a);
	}
	REP(i,v[0].size()){
		bool a=ans(v[0][i]);
		if(a==true){
			cout << "POSSIBLE" << endl
			return 0;
		}
	}
	cout << "IMPOSSIBLE" << endl;
}

Compiler output:
a.cc: In function 'bool ans(int)':
a.cc:17:15: error: 'n' was not declared in this scope
   17 |         if(x==n){
      |               ^
a.cc: In function 'int main()':
a.cc:36:51: error: expected ';' before 'return'
   36 |                         cout << "POSSIBLE" << endl
      |                                                   ^
      |                                                   ;
   37 |                         return 0;
      |                         ~~~~~~                     
a.cc: In function 'bool ans(int)':
a.cc:23:1: warning: control reaches end of non-void function [-Wreturn-type]
   23 | }
      | ^
Language: C++

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

int main() {
  int N,M;
  cin >> N >> M;
  vector<int> a;
  pair<int,int> pe[M];
  map<int,int> mp;
  for(int i=0;i<M;i++){
    int p,q;
    cin >> p >> q;
    pe[i]=make_pair(p,q);
    if(p==1)mp[q]++;
  }
  for(int i=0;i<M;i++){
    if(pe.second==N)mp[pe.first]++;
  }
  bool ans=false;
  for(auto x:mp){
    if(x.second==2)ans=true;
  }
  if(ans)cout << "POSSIBLE";
  else cout << "IMPOSSIBLE";
}






Compiler output:
a.cc: In function 'int main()':
a.cc:17:11: error: request for member 'second' in 'pe', which is of non-class type 'std::pair<int, int> [M]'
   17 |     if(pe.second==N)mp[pe.first]++;
      |           ^~~~~~
a.cc:17:27: error: request for member 'first' in 'pe', which is of non-class type 'std::pair<int, int> [M]'
   17 |     if(pe.second==N)mp[pe.first]++;
      |                           ^~~~~
Language: C++

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

int main() {
  int n, m;
  cin >> n >> m;
  vector<bool> c(n + 1, false), d(n + 1, false);

  for (int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    if (x == 1) c[y] = true;
    if (y == n) d[x] = true;
    for (int i = 0; i <= n; i++) {
      if (c[i] && d[i]) {
        cout << "POSSIBLE" << endl;
        return 0;
      }
    }
    cout << "IMPOSSIBLE" << endl;
  }

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

#include<iostream>
#include<string>
#include<algorithm>
#include<bits/stdc++.h>
#include<vector>
 
using namespace std;


int main(){
	int N,M,count=0; cin >> N >> M;
	int a[M+10],b[M+10],c[M+10]={};
	for(int i=0; i<M; i++){
		 cin >> a[i] >> b[i];
		if(a[i]==1){
			c[count]=b[i];
			count+=1;
	}
	for(int i=0; i<=count; i++){
		if(c[i]!=0){
		for(int j=0; j<M; j++){
			if(c[i]==a[j]){
				if(b[j]==N){
					cout << "POSSIBLE" << endl;
					return 0;
				}
			}
		}
		}
	}
	cout << "IMPOSSIBLE" << endl;
}

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

/* package whatever; // don't place package name! */

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

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args)
	{
		Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int m = sc.nextInt();

    ArrayList<Integer>[] adj = new ArrayList[n];
    for(int i=0;i<n;i++) adj[i] = new ArrayList<Integer>();

    for(int i=0;i<m;i++) {
      int a = sc.nextInt() - 1;
      int b = sc.nextInt() - 1;
      adj[a].add(b);
      adj[b].add(a);
    }

    Queue<Integer> q = new LinkedList<Integer>();
    q.add(1);
    int cnt = 0;

    boolean[] vis = new boolean[n];

    bfs:
    while(!q.isEmpty()) {
        int cur = q.poll();
        for(int next : adj[cur]) {
          if(next == n - 1) {
            break bfs;
          }
          if(!vis[next]) {
            cnt++;
          }
        }
    }

    System.out.println(cnt == 2 ? "POSSIBLE" : "IMPOSSIBLE");
  }
}

Compiler output:
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Language: Java

/* package whatever; // don't place package name! */

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

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int m = sc.nextInt();

    ArrayList<Integer>[] adj = new ArrayList[n];
    for(int i=0;i<n;i++) adj[i] = new ArrayList<Integer>();

    for(int i=0;i<m;i++) {
      int a = sc.nextInt() - 1;
      int b = sc.nextInt() - 1;
      adj[a].add(b);
      adj[b].add(a);
    }

    Queue<Integer> q = new LinkedList<Integer>();
    q.add(1);
    int cnt = 0;

    boolean[] vis = new boolean[n];

    bfs:
    while(!q.isEmpty()) {
        int cur = q.poll();
        for(int next : adj[cur]) {
          if(next == n - 1) {
            break bfs;
          }
          if(!vis[next]) {
            cnt++;
          }
        }
    }

    System.out.println(cnt == 2 ? "POSSIBLE" : "IMPOSSIBLE");
  }
}


Compiler output:
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Language: Java

/* package whatever; // don't place package name! */

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

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int m = sc.nextInt();

    ArrayList<Integer>[] adj = new ArrayList[n];
    for(int i=0;i<n;i++) adj[i] = new ArrayList<Integer>();

    for(int i=0;i<m;i++) {
      int a = sc.nextInt() - 1;
      int b = sc.nextInt() - 1;
      adj[a].add(b);
      adj[b].add(a);
    }

    Queue<Integer> q = new LinkedList<>();
    q.add(1);
    int cnt = 0;

    boolean[] vis = new boolean[n];

    bfs:
    while(!q.isEmpty()) {
        int cur = q.poll();
        for(int next : adj[cur]) {
          if(next == n - 1) {
            break bfs;
          }
          if(!vis[next]) {
            cnt++;
          }
        }
    }

    System.out.println(cnt == 2 ? "POSSIBLE" : "IMPOSSIBLE");
  }
}

Compiler output:
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Language: C++

#include <iostream>
using namespace std;
int  n, m, cnt = 0, a[101010], b[101010], k, l, q[2e5], p[2e5];
int main()
{
	cin >> n >> m;
	for(int t = 0; t < n; t++)
	{
		q[t] = 0;
		p[t] = 0;
	}
	for(int i = 0; i < m; i++)
	{
		cin >> k >> l;
		if(k == 1)	q[l + 1] = 1;
		else if(l == 1) q[k + 1] = 1; 
		if(l == n) p[k + 1] = 1;
		else if(k == n) p[l + 1] = 1;
	}
	for(int j = 0; j < n ; j++)
	{
		if(q[j + 1] == 1 && p[j + 1] == 1)
		{
			cnt++;
			break;
		} 
	}
	if(cnt > 0) cout << "POSSIBLE" << endl;
	else cout << "IMPOSSIBLE" << endl;
	return 0;
}

Compiler output:
a.cc:3:51: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
    3 | int  n, m, cnt = 0, a[101010], b[101010], k, l, q[2e5], p[2e5];
      |                                                   ^~~
a.cc:3:51: error: could not convert '2.0e+5' from 'double' to 'long unsigned int'
    3 | int  n, m, cnt = 0, a[101010], b[101010], k, l, q[2e5], p[2e5];
      |                                                   ^~~
      |                                                   |
      |                                                   double
a.cc:3:51: error: size of array 'q' has non-integral type 'double'
a.cc:3:59: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
    3 | int  n, m, cnt = 0, a[101010], b[101010], k, l, q[2e5], p[2e5];
      |                                                           ^~~
a.cc:3:59: error: could not convert '2.0e+5' from 'double' to 'long unsigned int'
    3 | int  n, m, cnt = 0, a[101010], b[101010], k, l, q[2e5], p[2e5];
      |                                                           ^~~
      |                                                           |
      |                                                           double
a.cc:3:59: error: size of array 'p' has non-integral type 'double'
Language: C++

Dreamoon has a string s and a pattern string p. He first removes exactly x characters from s obtaining string s' as a result. Then he calculates  that is defined as the maximal number of non-overlapping substrings equal to p that can be found in s'. He wants to make this number as big as possible.

More formally, let's define  as maximum value of  over all s' that can be obtained by removing exactly x characters from s. Dreamoon wants to know  for all x from 0 to |s| where |s| denotes the length of string s.

Compiler output:
a.cc:1:112: warning: multi-character literal with 135 characters exceeds 'int' size of 4 bytes
    1 | Dreamoon has a string s and a pattern string p. He first removes exactly x characters from s obtaining string s' as a result. Then he calculates  that is defined as the maximal number of non-overlapping substrings equal to p that can be found in s'. He wants to make this number as big as possible.
      |                                                                                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:3:19: warning: multi-character literal with 41 characters exceeds 'int' size of 4 bytes
    3 | More formally, let's define  as maximum value of  over all s' that can be obtained by removing exactly x characters from s. Dreamoon wants to know  for all x from 0 to |s| where |s| denotes the length of string s.
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:1:1: error: 'Dreamoon' does not name a type
    1 | Dreamoon has a string s and a pattern string p. He first removes exactly x characters from s obtaining string s' as a result. Then he calculates  that is defined as the maximal number of non-overlapping substrings equal to p that can be found in s'. He wants to make this number as big as possible.
      | ^~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int N, M;
vector<vector<int>> connect;
vector<bool> vsited;
bool DFS(int curr, num) {
	if (curr == N) return true;
	if (num >= 3) return false;
	for (int n : connect[curr]) {
		if (visited[n]) continue;
		if (DFS(n, num + 1)) {
			return true;
		}
		return false;
	}
}

int main() {
	cin >> N >> M;
	connect = vector<vector<int>>(N + 1, vector<int>);
	visited = vector<bool>(N + 1, false);
	for (int i = 0; i < M; i++) {
		int a, b;
		cin >> a >> b;
		connect[a].push_back(b);
		cinnect[b].push_back(a);
	}
	if (dfs(1, 1)) cout << "POSSIBLE" << endl;
	else cout << "IMPOSSIBLE" << endl;
	return 0;
}

Compiler output:
a.cc:6:20: error: 'num' has not been declared
    6 | bool DFS(int curr, num) {
      |                    ^~~
a.cc: In function 'bool DFS(int, int)':
a.cc:8:13: error: 'num' was not declared in this scope; did you mean 'enum'?
    8 |         if (num >= 3) return false;
      |             ^~~
      |             enum
a.cc:10:21: error: 'visited' was not declared in this scope; did you mean 'vsited'?
   10 |                 if (visited[n]) continue;
      |                     ^~~~~~~
      |                     vsited
a.cc:11:28: error: 'num' was not declared in this scope; did you mean 'enum'?
   11 |                 if (DFS(n, num + 1)) {
      |                            ^~~
      |                            enum
a.cc: In function 'int main()':
a.cc:20:38: error: expected primary-expression before '(' token
   20 |         connect = vector<vector<int>>(N + 1, vector<int>);
      |                                      ^
a.cc:20:57: error: expected primary-expression before ')' token
   20 |         connect = vector<vector<int>>(N + 1, vector<int>);
      |                                                         ^
a.cc:21:9: error: 'visited' was not declared in this scope; did you mean 'vsited'?
   21 |         visited = vector<bool>(N + 1, false);
      |         ^~~~~~~
      |         vsited
a.cc:26:17: error: 'cinnect' was not declared in this scope; did you mean 'connect'?
   26 |                 cinnect[b].push_back(a);
      |                 ^~~~~~~
      |                 connect
a.cc:28:13: error: 'dfs' was not declared in this scope; did you mean 'ffs'?
   28 |         if (dfs(1, 1)) cout << "POSSIBLE" << endl;
      |             ^~~
      |             ffs
a.cc: In function 'bool DFS(int, int)':
a.cc:16:1: warning: control reaches end of non-void function [-Wreturn-type]
   16 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

int ans[200000];
int main(){
    int n,m;
    cin >> n >> m;

    memset(ans,0,sizeof(ans));

    int is1,is2;
    for(int i = 0;i < m;i++){
        cin >> is1 >> is2;

        if(is1==1) ans[is2]++;
        else if(is2==1) ans[is1]++;
        else if(is1==n) ans[is2]++;
        else if(is2==n) ans[is1]++;
    }
    for(int i = 1;i < n;i++){
        if(ans[i]==2){
            cout << "POSSIBLE";
            return 0;
        }
    }
    cout << "IMPOSSIBLE";
}


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

#include<bits/stdc++.h>

using namespace std;
typedef long long ll;
int a[200001][200001];
int p,q;

bool check = false;
void dfs(int now,int depth){
    if(now==p){
        check = true;
        return;
    }
    if(depth==2||check)return;
    for(int i=1;i<=p;++i){
        if(a[now][i]==1)dfs(i,depth+1);
    }
    return;
}

int main(){
    
    cin >> p >> q;
    int x,y;
    for(int i=0;i<q;++i){
        cin >> x >> y;
        a[x][y] = 1;
        a[y][x] = 1;
    }
    for(int i=1;i<=p;i++){
        for(int j=1;j<=p;j++){
            cout << a[i][j] << " ";
        }
        cout << endl;
    }
    
    dfs(1,0);
    if(check)cout << "POSSIBLE" << endl;
    else cout << "IMPOSSIBLE" << endl;
    return 0;
}

Compiler output:
/tmp/ccbwthqI.o: in function `dfs(int, int)':
a.cc:(.text+0x10): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccbwthqI.o
a.cc:(.text+0x1b): relocation truncated to fit: R_X86_64_PC32 against symbol `check' defined in .bss section in /tmp/ccbwthqI.o
a.cc:(.text+0x2b): relocation truncated to fit: R_X86_64_PC32 against symbol `check' defined in .bss section in /tmp/ccbwthqI.o
a.cc:(.text+0x80): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccbwthqI.o
/tmp/ccbwthqI.o: in function `main':
a.cc:(.text+0x99): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccbwthqI.o
a.cc:(.text+0xb5): relocation truncated to fit: R_X86_64_PC32 against symbol `q' defined in .bss section in /tmp/ccbwthqI.o
a.cc:(.text+0x154): relocation truncated to fit: R_X86_64_PC32 against symbol `q' defined in .bss section in /tmp/ccbwthqI.o
a.cc:(.text+0x1c9): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccbwthqI.o
a.cc:(.text+0x1f1): relocation truncated to fit: R_X86_64_PC32 against symbol `p' defined in .bss section in /tmp/ccbwthqI.o
a.cc:(.text+0x210): relocation truncated to fit: R_X86_64_PC32 against symbol `check' defined in .bss section in /tmp/ccbwthqI.o
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
int main(){
  int n,m;
  bool b1[n+10] =｛false};
  bool b2[n+10] =｛false};
  cin >> n >> m;
  for(int i=0; i<m; i++){
    int a,b;
    cin >> a >> b;
    if(a>b) swap(a,b);
    if(a==1) b1[b]=true;
    if(b==n) b2[a]=true;
  }
  for(int i=1; i<=m; i++){
    if(b1[i]==true && b2[i]==true){
      cout << "POSSIBLE" << endl;
    }
    return 0;
  }
  cout << "IMPOSSIBLE" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:18: error: '\U0000ff5bfalse' was not declared in this scope
    4 |   bool b1[n+10] =｛false};
      |                  ^~~~~~~
a.cc: At global scope:
a.cc:5:11: error: 'n' was not declared in this scope
    5 |   bool b2[n+10] =｛false};
      |           ^
a.cc:5:18: error: '\U0000ff5bfalse' was not declared in this scope
    5 |   bool b2[n+10] =｛false};
      |                  ^~~~~~~
a.cc:5:25: error: expected declaration before '}' token
    5 |   bool b2[n+10] =｛false};
      |                         ^
a.cc:6:3: error: 'cin' does not name a type
    6 |   cin >> n >> m;
      |   ^~~
a.cc:7:3: error: expected unqualified-id before 'for'
    7 |   for(int i=0; i<m; i++){
      |   ^~~
a.cc:7:16: error: 'i' does not name a type
    7 |   for(int i=0; i<m; i++){
      |                ^
a.cc:7:21: error: 'i' does not name a type
    7 |   for(int i=0; i<m; i++){
      |                     ^
a.cc:14:3: error: expected unqualified-id before 'for'
   14 |   for(int i=1; i<=m; i++){
      |   ^~~
a.cc:14:16: error: 'i' does not name a type
   14 |   for(int i=1; i<=m; i++){
      |                ^
a.cc:14:22: error: 'i' does not name a type
   14 |   for(int i=1; i<=m; i++){
      |                      ^
a.cc:20:3: error: 'cout' does not name a type
   20 |   cout << "IMPOSSIBLE" << endl;
      |   ^~~~
a.cc:21:1: error: expected declaration before '}' token
   21 | }
      | ^
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[] s = new int[2*M];
  int[] ps = new int[2*M];
  int counter = 0;
  for(int i = 0;i < 2*M;i++){
    s[i] = sc.nextInt();
  }
  for(int i = 0;i < 2*M -1;i += 2){
    if(s[i] == 1){
      ps[counter] = s[i];
      ps[counter+1] = s[i+1];
      counter += 2;
    }
  }
  int ncounter = 0;
  for(int i = 1;i < 2*M;i += 2){
    if(s[i] == N){
      ps[counter+2 + ncounter] = s[i-1];
      ps[counter+3 + ncounter] = s[i];
      ncounter += 2;
    }
  }
  boolean possible = false;
  out:
  for(int i = 0;i < counter+1;i += 2){
      for(int j = counter+3;j < counter + ncounter +2;j += 2){
        if(ps[i] = ps[j]){
          possible = true;
          break out;
        }
      }
    }
  System.out.println(possible ? "POSSIBLE":"IMPOSSIBLE");
}}


Compiler output:
Main.java:32: error: incompatible types: int cannot be converted to boolean
        if(ps[i] = ps[j]){
                 ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
#define IOS ios_base::sync_with_stdio(0); cin.tie(0)
#define ALL(a) a.begin(),a.end()
#define SZ(a) ((int)a.size())
#define F first
#define S second
#define REP(i,n) for(int i=0;i<((int)n);i++)
#define pb push_back
#define MP(a,b) make_pair(a,b)
#define SORT_UNIQUE(c) (sort(c.begin(),c.end()), c.resize(distance(c.begin(),unique(c.begin(),c.end()))))
#define GET_POS(c,x) (lower_bound(c.begin(),c.end(),x)-c.begin())
#ifdef leowang
#define debug(...) do{\
	fprintf(stderr,"%s - %d : (%s) = ",__PRETTY_FUNCTION__,__LINE__,#__VA_ARGS__);\
	_DO(__VA_ARGS__);\
}while(0)
template<typename I> void _DO(I&&x){cerr<<x<<endl;}
template<typename I,typename...T> void _DO(I&&x,T&&...tail){cerr<<x<<", ";_DO(tail...);}
#else
#define debug(...)
#endif
template<typename T1,typename T2>
ostream& operator<<(ostream& out,pair<T1,T2> P){
	out<<'('<<P.F<<','<<P.S<<')';
	return out;
}
//}}}
const ll maxn=300005;
const ll maxlg=__lg(maxn)+2;
const ll INF64=8000000000000000000LL;
const int INF=2000000000;
const ll MOD=ll(1e9+7);
const double PI=acos(-1);
//const ll p=880301;
//const ll P=31;
/*
ll mypow(ll a,ll b){
	ll res=1LL;
	while(b){
		if(b&1) res=res*a%MOD;
		else a=a*a%MOD;
		b>>=1;
	}
	return res;
}
*/
set<int> st;
vector<int> v;
int main()
{
	//IOS;
	int n,m;
	cin>>n>>m;
	while(m--){
		int u,v;
		cin>>u>>v;
		if(u==1) st.insert(v);
		if(v==n) v.pb(u);
	}
	for(int a:v){
		if(st.count(a)){
			cout<<"POSSIBLE";
			return 0;
		}
	}
	cout<<"IMPOSSIBLE";
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: error: request for member 'push_back' in 'v', which is of non-class type 'int'
   12 | #define pb push_back
      |            ^~~~~~~~~
a.cc:62:28: note: in expansion of macro 'pb'
   62 |                 if(v==n) v.pb(u);
      |                            ^~
Language: C

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

int main(void) {
    int n, m, d[200000];
    vector<int> g[200000];
    cin >> n >> m;
    for (int i = 0; i < m; i++) {
        int a, b;
        cin >> a >> b;
        a--, b--;
        g[a].push_back(b);
    }
    queue<int> q;
    for (int i = 0; i < n; i++)
        d[i] = 3;
    d[0] = 0;
    q.push(0);
    while (!q.empty()) {
        int p = q.front(); q.pop();
        for (int i = 0; i < g[p].size(); i++) {
            if (d[g[p][i]] == 3) {
                d[g[p][i]] = d[p] + 1;
                q.push(g[p][i]);
            }
        }
    }
    cout << (d[n - 1] == 2 ? "POSSIBLE" : "IMPOSSIBLE") << endl;
}

Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <map>
#include <math.h>
#include <iomanip>
using namespace std;
typedef long long int ll;
int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	ll n, m, pair<ll, ll>p[200020];
	cin >> n >> m;
	for (int i = 0; i < m; i++)cin >> p[i].first >> p[i].second;
	sort(p, p + n);
	bool s[200020] = {}, ans = 0;
	for (int i = 0; i < m; i++) {
		if (p[i].first == 1)s[p[i].second] = 1;
		if (s[p[i].first] && p[i].second == n) {
			ans = 1;
			break;
		}
	}
	if (ans)cout << "POSSIBLE" << endl;
	else cout << "IMPOSSIBLE" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:30: error: invalid declarator before 'p'
   12 |         ll n, m, pair<ll, ll>p[200020];
      |                              ^
a.cc:14:43: error: 'p' was not declared in this scope
   14 |         for (int i = 0; i < m; i++)cin >> p[i].first >> p[i].second;
      |                                           ^
a.cc:15:14: error: 'p' was not declared in this scope
   15 |         sort(p, p + n);
      |              ^
Language: C++

use std::io;
use std::cmp;
use std::mem;

fn read_line() -> String{
    let mut s = String::new();
    io::stdin().read_line(&mut s).unwrap();
    s
}

fn read_ints() -> Vec<i64>{
    let s = read_line();
    let split:Vec<&str> = s.trim().split(" ").collect();
    split.iter().map(|&x| x.to_string().parse().unwrap()).collect()
}

fn main(){
    let temp = read_ints();
    let n = temp[0];
    let m = temp[1];
    let mut v = Vec::new();
    
    for _i in 0..m{
        let temp = read_ints();
        let a = temp[0];
        let b = temp[1];
        
        if a == 1 || a == n {
            match v.iter().find(|&&x| x==b){
                Some(_) => {println!("POSSIBLE");return;},
                None    => {v.push(b);}
            }
        }else if b == 1 || b == n {
            match v.iter().find(|&&x| x==a){
                Some(_) => {println!("POSSIBLE");return;},
                None    => {v.push(a);}
            }
        }
    }
    println!("IMPOSSIBLE");
}


Compiler output:
a.cc:23:15: error: too many decimal points in number
   23 |     for _i in 0..m{
      |               ^~~~
a.cc:1:1: error: 'use' does not name a type
    1 | use std::io;
      | ^~~
a.cc:2:1: error: 'use' does not name a type
    2 | use std::cmp;
      | ^~~
a.cc:3:1: error: 'use' does not name a type
    3 | use std::mem;
      | ^~~
a.cc:5:1: error: 'fn' does not name a type
    5 | fn read_line() -> String{
      | ^~
a.cc:11:1: error: 'fn' does not name a type
   11 | fn read_ints() -> Vec<i64>{
      | ^~
a.cc:17:1: error: 'fn' does not name a type
   17 | fn main(){
      | ^~
Language: C++

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        HashMap<Integer, List<Integer>> hmap = new HashMap<>();
        for (Integer i=0; i<m; i++) {
            int a = sc.nextInt();
            int b = sc.nextInt();

            List<Integer> listA = hmap.get(a);
            if (listA != null) {
                listA.add(b);
            } else {
                listA = new ArrayList<>();
                listA.add(b);
            }
            hmap.put(a, listA);

            List<Integer> listB = hmap.get(b);
            if (listB != null) {
                listB.add(a);
            } else {
                listB = new ArrayList<>();
                listB.add(a);
            }
            hmap.put(b, listB);
        }

        List<Integer> list1 = hmap.get(1);
        List<Integer> listn = hmap.get(n);
        
        for (Integer med : list1) {
            if (listn.contains(med)) {
                System.out.println("POSSIBLE");
                return;
            }
        }
    System.out.println("IMPOSSIBLE");
    }
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.ArrayList;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.HashMap;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.util.List;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import java.util.Scanner;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: expected unqualified-id before 'public'
    6 | public class Main {
      | ^~~~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <array>
#include <math.h>
#include <set>
#include <stdlib.h>
#include <string>
#include <vector>

#define INT_MAX 2000000000
#define MOD 1000000007
#define ll long long
#define rep(i,a,b) for(i = (a); i < (b); i++)
#define bitget(a,b) (((a) >> (b)) & 1)
#define int_64 _int64
#define int_32 _int32
#define int_16 _int16
#define int_8 _int8

using namespace std;

int i, j, k;

int main() {
	int n, m;
	int a[200000], b[200000];
	cin >> n >> m;
	rep(i, 0, m)
		cin >> a[i] >> b[i];
	int_8 c[2][200001] = {};
	rep(i, 0, m) {
		if (a[i] == 1)
			c[1][b[i]] = 1;
		else if (a[i] == n)
			c[0][b[i]] = 1;
		if (b[i] == 1)
			c[1][a[i]] = 1;
		else if (b[i] == n)
			c[0][a[i]] = 1;
	}
	int flag=0;
	rep(i, 0, n) {
		if ((c[0][i] & c[1][i]) == 1) {
			flag = 1;
		}
	}
	if (flag==1)
		cout << "POSSIBLE" << endl;
	else
		cout << "IMPOSSIBLE" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:15: error: '_int8' was not declared in this scope
   18 | #define int_8 _int8
      |               ^~~~~
a.cc:30:9: note: in expansion of macro 'int_8'
   30 |         int_8 c[2][200001] = {};
      |         ^~~~~
a.cc:33:25: error: 'c' was not declared in this scope
   33 |                         c[1][b[i]] = 1;
      |                         ^
a.cc:35:25: error: 'c' was not declared in this scope
   35 |                         c[0][b[i]] = 1;
      |                         ^
a.cc:37:25: error: 'c' was not declared in this scope
   37 |                         c[1][a[i]] = 1;
      |                         ^
a.cc:39:25: error: 'c' was not declared in this scope
   39 |                         c[0][a[i]] = 1;
      |                         ^
a.cc:43:22: error: 'c' was not declared in this scope
   43 |                 if ((c[0][i] & c[1][i]) == 1) {
      |                      ^
Language: C++

#include <iostream>
#include <algorithm>
#include <array>
#include <math.h>
#include <set>
#include <stdlib.h>
#include <string>
#include <vector>

#define INT_MAX 2000000000
#define MOD 1000000007
#define ll long long
#define rep(i,a,b) for(i = (a); i < (b); i++)
#define bitget(a,b) (((a) >> (b)) & 1)
#define int64 _int64
#define int32 _int32
#define int16 _int16
#define int8 _int8

using namespace std;

int i, j, k;

int main() {
	int n, m;
	int a[200000], b[200000];
	cin >> n >> m;
	rep(i, 0, m)
		cin >> a[i] >> b[i];
	int8 c[2][200001] = {};
	rep(i, 0, m) {
		if (a[i] == 1)
			c[1][b[i]] = 1;
		else if (a[i] == n)
			c[0][b[i]] = 1;
		if (b[i] == 1)
			c[1][a[i]] = 1;
		else if (b[i] == n)
			c[0][a[i]] = 1;
	}
	int flag=0;
	rep(i, 0, n) {
		if ((c[0][i] & c[1][i]) == 1) {
			flag = 1;
		}
	}
	if (flag==1)
		cout << "POSSIBLE" << endl;
	else
		cout << "IMPOSSIBLE" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:14: error: '_int8' was not declared in this scope; did you mean 'int8'?
   18 | #define int8 _int8
      |              ^~~~~
a.cc:30:9: note: in expansion of macro 'int8'
   30 |         int8 c[2][200001] = {};
      |         ^~~~
a.cc:33:25: error: 'c' was not declared in this scope
   33 |                         c[1][b[i]] = 1;
      |                         ^
a.cc:35:25: error: 'c' was not declared in this scope
   35 |                         c[0][b[i]] = 1;
      |                         ^
a.cc:37:25: error: 'c' was not declared in this scope
   37 |                         c[1][a[i]] = 1;
      |                         ^
a.cc:39:25: error: 'c' was not declared in this scope
   39 |                         c[0][a[i]] = 1;
      |                         ^
a.cc:43:22: error: 'c' was not declared in this scope
   43 |                 if ((c[0][i] & c[1][i]) == 1) {
      |                      ^
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int main(){
    int n, m;
    cin >> n >> m;
    vector<vector<bool>> edges(n, vector<bool>(n, false));

    for(int i=0;i<m;i++){
        int a, b;
        cin >> a >> b;
        a--,  b--;
        edges[a][b] = edge[b][a] = true;
    }
    bool flag = false;
    for(int i=1;i<n-1;i++){
        if(edges[0][i] && edges[i][n-1])
            flag = true;
    }
    cout << (flag?"POSSIBLE":"IMPOSSIBLE") << endl;


    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:23: error: 'edge' was not declared in this scope; did you mean 'edges'?
   15 |         edges[a][b] = edge[b][a] = true;
      |                       ^~~~
      |                       edges
Language: C++

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


int main(){
  int N,M,a,b;
  vector <int> u,v;
  cin>>N>>M;
  for(int i=0;i<M;i++){
    cin>>a>>b;
    if(a==1){
      u.push_back(b);
    }
    if(b==N){
      v.push_back(a);
    }
    int i=0,j=0;
    sort(u.begin(),u.end());
    sort(v.begin(),v.end());
    for(i;i<u.size();i++){
      if(u[i]==u[i+1]){
        continue;
      }
      for(j;j<v.size() && v[j]<=u[i] ;j++){
        if(u[i]==v[j]){
          cout<<"POSSIBLE"<<endl;
          return 0;
        }
      }
    }
  }
  cout<<"IMPOSSIBLE"<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: redeclaration of 'int i'
   19 |     int i=0,j=0;
      |         ^
a.cc:11:11: note: 'int i' previously declared here
   11 |   for(int i=0;i<M;i++){
      |           ^
Language: C++

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

int main(){
    int n,m,s[200001],g[200001],i,ans=0,x,y;
    for(i=0;i<200001;i++){
        s[i] = 0;
        g[i] = 0;
    }
    scanf("%d %d",&n,&m);
    for(i=0;i<m;i++){
        scanf("%d %d",&x,&y);
        if(x==1){
            s[y] ++;
        }
        if(y==n){
            g[x] ++;
        }
    }
    for(i=1;i<n;i++){
        if((s[i]==1) && (g[i]==1){
            ans = 1;
            break;
        }
    }
    if(ans == 1){
        printf("POSSIBLE\n");
    } else {
        printf("IMPOSSIBLE\n");
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:34: error: expected ')' before '{' token
   21 |         if((s[i]==1) && (g[i]==1){
      |           ~                      ^
      |                                  )
a.cc:25:5: error: expected primary-expression before '}' token
   25 |     }
      |     ^
Language: C++

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

int main(){
    int n,m,s[200001],g[200001],i,ans=0,x,y;
    for(i=0;i<200001;i++){
        s[i] = 0;
        g[i] = 0;
    }
    scanf("%d %d",&n,&m);
    for(i=0;i<m;i++){
        scanf("%d %d",&x,&y);
        if(x==1){
            s[y] ++;
        }
        if(y==n){
            g[x] ++;
        }
    }
    for(i=1;i<n;i++){
        if((s[i]==1) && (g[i]==1){
            ans = 1;1
            break;
        }
    }
    if(ans == 1){
        printf("POSSIBLE\n");
    } else {
        printf("IMPOSSIBLE\n");
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:34: error: expected ')' before '{' token
   21 |         if((s[i]==1) && (g[i]==1){
      |           ~                      ^
      |                                  )
a.cc:25:5: error: expected primary-expression before '}' token
   25 |     }
      |     ^
Language: C++

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

int main(){
    int n,m,s[200001],g[200001],i,ans=0,x,y;
    for(i=0;i<200001;i++){
        s[i] = 0;
        g[i] = 0;
    }
    scanf("%d %d",&n,&m);
    for(i=0;i<m;i++){
        scanf("%d %d",&x,&y);
        if(x==1){
            s[y] ++;
        }
        if(y==n){
            g[x] ++;
        }
    }
    for(i=1;i<n;i++){
        if(s[i]==1 && g[i]==1){
            ans = 1;1
            break;
        }
    }
    if(ans == 1){
        printf("POSSIBLE\n");
    } else {
        printf("IMPOSSIBLE\n");
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:22: error: expected ';' before 'break'
   22 |             ans = 1;1
      |                      ^
      |                      ;
   23 |             break;
      |             ~~~~~
Language: C++

include<bits/stdc++.h>

using namespace std;

int main(){
        int N, M;
        cin>>N>>M;
        bool suc=false;
        bool st[200010]={0}, gl[200010]={0};
        for(int i=0;i<M;i++){
                int a, b;
                cin>>a>>b;
                if(a==1)
                        st[b]=true;
                else if(b==N)
                        gl[a]=true;
        }
        for(int i=2;i<=200000&&!suc;i++){
                if(st[i]&&gl[i])
                        suc=true;
        }
        if(suc)
                cout<<"POSSIBLE"<<endl;
        else
                cout<<"IMPOSSIBLE"<<endl;
        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:7:9: error: 'cin' was not declared in this scope
    7 |         cin>>N>>M;
      |         ^~~
a.cc:23:17: error: 'cout' was not declared in this scope
   23 |                 cout<<"POSSIBLE"<<endl;
      |                 ^~~~
a.cc:23:35: error: 'endl' was not declared in this scope
   23 |                 cout<<"POSSIBLE"<<endl;
      |                                   ^~~~
a.cc:25:17: error: 'cout' was not declared in this scope
   25 |                 cout<<"IMPOSSIBLE"<<endl;
      |                 ^~~~
a.cc:25:37: error: 'endl' was not declared in this scope
   25 |                 cout<<"IMPOSSIBLE"<<endl;
      |                                     ^~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <cstdio>
using namespace std;
int n,m,i,j,ans,hu;
vector<int> bi[200005];
bool vis[200005]; 
int main()
{
	cin>>n;
	for (i=1;i<=n;i++)
	{
		cin>>x;
		bi[x].push_back(i);
	}
	for (i=1;i<=n;i++)
	{
		if (!vis[i])
		{
			 dfs(i);
		}
	}
	if (!hu)
	{
		cout<<"POSSIBLE";
		return 0;
	}
	

Compiler output:
a.cc:8:1: error: 'vector' does not name a type
    8 | vector<int> bi[200005];
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:15:22: error: 'x' was not declared in this scope
   15 |                 cin>>x;
      |                      ^
a.cc:16:17: error: 'bi' was not declared in this scope; did you mean 'i'?
   16 |                 bi[x].push_back(i);
      |                 ^~
      |                 i
a.cc:22:26: error: 'dfs' was not declared in this scope; did you mean 'ffs'?
   22 |                          dfs(i);
      |                          ^~~
      |                          ffs
a.cc:29:10: error: expected '}' at end of input
   29 |         }
      |          ^
a.cc:11:1: note: to match this '{'
   11 | {
      | ^
Language: C++

#include <iostream>
#include <vector>

using namespace std;

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

	vector<int> v1, v2;
	v1.reserve(m);
	v2.reserve(m);

	int a, b;
	for(auto i = 0; i < m; ++i) {
		cin >> a >> b;
		if(a == 1) {
			v1.pushback(b);
		}
		if(b == n) {
			v2.reserve(a);
		}
	}

	for(auto x : v1) {
		for(auto y : v2) {
			if(x == y) {
				cout << "POSSIBLE" << endl;
				return 0;
			}
		}
	}

	cout << "INPOSSIBLE" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:28: error: 'class std::vector<int>' has no member named 'pushback'; did you mean 'push_back'?
   19 |                         v1.pushback(b);
      |                            ^~~~~~~~
      |                            push_back
Language: C++

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


long long f(vector<long long> a){
	int idx = max_element(a.begin(),a.end()) - a.begin();
	if( a[idx] < a.size() ) return 0;
	a[idx] -= a.size();
	a[idx^1] += 1;
	return 1 + f(a);
}

int main(){
	long long N;
	cin >> N;
	vector<long long> a(50,49 + N / 50);
	for(int i = 0 ; i < N % 50 ; i++){
		sort(a.begin(),a.end());
		a[0] += 50;
		for(int j = 1 ; j < 50 ; j++)
			a[j] -= 1;
	}
	cout << 50 << endl;
	for(int i = 0 ; i < 50 ; i++) cout << a[i] << (i + 1 == "\n" : " ");
	// 4 4 4 4 | 4
	// 5 5 5 0 | 3
	// 1 6 6 1 | 2
	// 2 2 7 2 | 1
	// 3 3 3 3 | 0
	// 3 3 3 3  


}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:62: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   27 |         for(int i = 0 ; i < 50 ; i++) cout << a[i] << (i + 1 == "\n" : " ");
      |                                                        ~~~~~~^~~~~~~
a.cc:27:69: error: expected ')' before ':' token
   27 |         for(int i = 0 ; i < 50 ; i++) cout << a[i] << (i + 1 == "\n" : " ");
      |                                                       ~             ^~
      |                                                                     )
Language: C++

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


long long f(vector<long long> a){
	int idx = max_element(a.begin(),a.end()) - a.begin();
	if( a[idx] < a.size() ) return 0;
	a[idx] -= a.size();
	a[idx^1] += 1;
	return 1 + f(a);
}

int main(){
	long long N;
	cin >> N;
	vector<long long> a(50,49 + N / 50);
	for(int i = 0 ; i < N % 50 ; i++){
		sort(a.begin(),a.end());
		a[0] += 50;
		for(int j = 1 ; j < 50 ; j++)
			a[j] -= 1;
	}
	cout << 50 << endl;
	for(int i = 0 ; i < 50 ; i++) cout << a[i] << " ";
	// 4 4 4 4 | 4
	// 5 5 5 0 | 3
	// 1 6 6 1 | 2
	// 2 2 7 2 | 1
	// 3 3 3 3 | 0
	// 3 3 3 3  


}

Compiler output:
a.cc: In function 'long long int f(std::vector<long long int>)':
a.cc:8:19: error: 'max_element' was not declared in this scope
    8 |         int idx = max_element(a.begin(),a.end()) - a.begin();
      |                   ^~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:20:17: error: 'sort' was not declared in this scope; did you mean 'short'?
   20 |                 sort(a.begin(),a.end());
      |                 ^~~~
      |                 short
Language: C++

#include <algorithm>
using namespace std;

bool can[3][200000];
int n, m;
int v[200000];
int to[200000];

int main() {
	ios_base::sync_with_stdio(0);
	cin >> n >> m;
	for (int i = 0; i < m; i++) {
		cin >> v[i] >> to[i];
		v[i]--;
		to[i]--;
	}
	
	for (int i = 0; i < n; i++) {
		can[0][i] = can[1][i] = can[2][i] = 0;
	}
	can[0][0] = 1;
	
	for (int i = 0; i < 2; i++) {
		for (int j = 0; j < m; j++) {
			if (can[i][v[j]]) {
				can[i + 1][to[j]] = 1;
			}
			if (can[i][to[j]]) {
				can[i + 1][v[j]] = 1;
			}
		}
	}
	if (can[2][n - 1]) {
		cout << "POSSIBLE";
	} else {
		cout << "IMPOSSIBLE";
	}
	
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'ios_base' has not been declared
   10 |         ios_base::sync_with_stdio(0);
      |         ^~~~~~~~
a.cc:11:9: error: 'cin' was not declared in this scope
   11 |         cin >> n >> m;
      |         ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <algorithm>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:34:17: error: 'cout' was not declared in this scope
   34 |                 cout << "POSSIBLE";
      |                 ^~~~
a.cc:34:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:36:17: error: 'cout' was not declared in this scope
   36 |                 cout << "IMPOSSIBLE";
      |                 ^~~~
a.cc:36:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <algorithm>
using namespace std;

bool can[200000];
int n, m;
int v[200000];
int to[200000];

int main() {
	ios_base::sync_with_stdio(0);
	cin >> n >> m;
	for (int i = 0; i < m; i++) {
		cin >> v[i] >> to[i];
		v[i]--;
		to[i]--;
	}
	
	for (int i = 0; i < n; i++) {
		can[i] = 0;
	}
	can[0] = 1;
	for (int i = 0; i < 2; i++) {
		for (int j = 0; j < m; j++) {
			if (can[v[j]]) {
				can[to[j]] = 1;
			}
			if (can[to[j]]) {
				can[v[j]] = 1;
			}
		}
	}
	if (can[n - 1]) {
		cout << "POSSIBLE";
	} else {
		cout << "IMPOSSIBLE";
	}
	
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'ios_base' has not been declared
   10 |         ios_base::sync_with_stdio(0);
      |         ^~~~~~~~
a.cc:11:9: error: 'cin' was not declared in this scope
   11 |         cin >> n >> m;
      |         ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <algorithm>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:33:17: error: 'cout' was not declared in this scope
   33 |                 cout << "POSSIBLE";
      |                 ^~~~
a.cc:33:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:35:17: error: 'cout' was not declared in this scope
   35 |                 cout << "IMPOSSIBLE";
      |                 ^~~~
a.cc:35:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  vector<int> next;
  vector<int> bef;
  longlong n,m;
  cin>>n>>m;
  for (int i; i<m;i++){
    int a,b;
    cin>>a>>b;
    if (a==1) next.push_back(b);
    if (b==n) bef.push_back(a);
  }
  int l1,l2;
  int ans=0;
  l1=next.size();
  l2=bef.size();
  for (int i;i<l1;i++){
    for (int j;j<l2;j++){
      if (next[i]==bef[j]){
	ans=1; break;
      }
    }
  }
  if (ans==0) printf ("IMPOSSIBLE");
  if (ans==1) printf ("POSSIBLE");
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'longlong' was not declared in this scope
    6 |   longlong n,m;
      |   ^~~~~~~~
a.cc:7:8: error: 'n' was not declared in this scope; did you mean 'yn'?
    7 |   cin>>n>>m;
      |        ^
      |        yn
a.cc:7:11: error: 'm' was not declared in this scope; did you mean 'tm'?
    7 |   cin>>n>>m;
      |           ^
      |           tm