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

#include<iostream>
using namespace std;
#include<queue>
#include<cstdio>
#include<hash_map>
#include<map>
#include<set> 
typedef long long LL;
queue<LL> team;
inline LL getint()
{
	LL w = 0, q = 0;
	char c = getchar();
	while ((c<'0' || c>'9') && c != '-') c = getchar();
	if (c == '-') q = 1, c = getchar();
	while (c >= '0'&&c <= '9') w = w * 10 + c - '0', c = getchar();
	return q ? -w : w;
}
struct data
{
	LL sj;
	LL bh;
	bool operator<(const data &b)const
	{
		if (this->sj == b.sj) return this->bh>b.bh;
		return this->sj<b.sj;
	}
};
set<struct data> preset;
hash_map<LL, LL> maps;
int n, k;
int main()
{
	set<struct data>::iterator pt;
	int rq = 0;
	//cin>>n>>k;
	n = getint();
	k = getint();
	LL pre;
	int ml;
	LL dx;
	struct data mx;
	for (int i = 1; i <= n; i++)
	{
		//scanf("%d",&ml);
		ml = getint();
		if (ml == 1)
		{
			dx = getint();
			//	scanf("%lld",&dx);
			struct data np;
			np.bh = dx; np.sj = maps[dx];
			preset.erase(np);
			maps[dx]++;
			np.sj = maps[dx];
			preset.insert(np);
			team.push(dx);
			if (team.size() == k + 1)
			{
				pre = team.front();
				np.bh = pre; np.sj = maps[pre];
				preset.erase(np);
				team.pop();
				maps[pre]--;
				if (maps[pre] == 0) continue;
				np.sj = maps[pre];
				preset.insert(np);
			}
		}
		if (ml == 2)
		{
			pt = preset.end();
			--pt;
			int bh = (*pt).bh;
			//	cout<<bh<<endl;
			printf("%d\n", bh);
		}
	}
	return 0;
}


Compiler output:
In file included from /usr/include/c++/14/backward/hash_map:60,
                 from a.cc:5:
/usr/include/c++/14/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp]
   32 | #warning \
      |  ^~~~~~~
a.cc:30:1: error: 'hash_map' does not name a type
   30 | hash_map<LL, LL> maps;
      | ^~~~~~~~
a.cc: In function 'int main()':
a.cc:52:45: error: 'maps' was not declared in this scope
   52 |                         np.bh = dx; np.sj = maps[dx];
      |                                             ^~~~
Language: C++

#include<cstdio>
using namespace std;
typedef long long ll;
ll n=50;
int main()
{
    ll k;
    scanf("%lld",&k);
    printf("50\n");
    while(n--)
    {
        printf("%lld",49-i+((49-i+k)/50));
        if(n)
            printf(" ");
        else
            printf("\n");
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:26: error: 'i' was not declared in this scope
   12 |         printf("%lld",49-i+((49-i+k)/50));
      |                          ^
Language: C

#include<stdio.h>
int four(int k){
k=k+4;
return k;
}
int one(int k){
k=k-1;
return k;
}
int main(void){
long long int k;
scanf("%lld",&k);
printf("4\n");
long longint a[4]={0,1,2,3},i,n,m;
n=k/4;
m=k%4;
if(m==0){
a[0]=0+n;
a[1]=1+n;
a[2]=2+n;
a[3]=3+n;
}
if(m==1){
a[0]=4+n;
a[1]=0+n;
a[2]=1+n;
a[3]=2+n;
}
if(m==2){
a[0]=3+n;
a[1]=4+n;
a[2]=0+n;
a[3]=1+n;
}
if(m==3){
a[0]=2+n;
a[1]=3+n;
a[2]=4+n;
a[3]=0+n;
}
printf("%lld %lld %lld %lld\n",a[0],a[1],a[2],a[3]);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'a'
   14 | long longint a[4]={0,1,2,3},i,n,m;
      |              ^
main.c:14:14: error: 'a' undeclared (first use in this function)
main.c:14:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:19: error: expected expression before '{' token
   14 | long longint a[4]={0,1,2,3},i,n,m;
      |                   ^
main.c:15:1: error: 'n' undeclared (first use in this function)
   15 | n=k/4;
      | ^
main.c:16:1: error: 'm' undeclared (first use in this function)
   16 | m=k%4;
      | ^
Language: C

#include<stdio.h>
int four(int k){
k=k+4;
return k;
}
int one(int k){
k=k-1;
return k;
}
int main(void){
long long int k;
scanf("%lld",&k);
printf("4\n");
int a[4]={0,1,2,3},i,n,m;
n=k/4;
m=k%4;
if(m==0){
a[0]=0+n
a[1]=1+n
a[2]=2+n
a[3]=3+n
}
if(m==1){
a[0]=4+n
a[1]=0+n
a[2]=1+n
a[3]=2+n
}
if(m==2){
a[0]=3+n
a[1]=4+n
a[2]=2+n
a[3]=1+n
}
if(m==3){
a[0]=2+n
a[1]=3+n
a[2]=1+n
a[3]=5+n
}
printf("%d %d %d %d\n",a[0],a[1],a[2],a[3]);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:9: error: expected ';' before 'a'
   18 | a[0]=0+n
      |         ^
      |         ;
   19 | a[1]=1+n
      | ~        
main.c:24:9: error: expected ';' before 'a'
   24 | a[0]=4+n
      |         ^
      |         ;
   25 | a[1]=0+n
      | ~        
main.c:30:9: error: expected ';' before 'a'
   30 | a[0]=3+n
      |         ^
      |         ;
   31 | a[1]=4+n
      | ~        
main.c:36:9: error: expected ';' before 'a'
   36 | a[0]=2+n
      |         ^
      |         ;
   37 | a[1]=3+n
      | ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long ll;
int main (){
  ll k,a,b;
  cin >> k;
  a=k/3+2;
  b=k%3;
  ll d1[]={-1,-1,3};
  ll d2[]={-2,2,2};
  cout<<"3"<<endl;
  if(b==0){
    for(ll i=0;i<3;i++){
      if(i==0)
        cout<<a;
      else
        cout<<" "<<a-i;
    }
    cout<<endl;
  }
  if(b==1){
    for(ll i=0;i<3;i++){
      if(i==0)
        cout<<a+d1[i];
      else
        cout<<" "<<a-i+d1[i];
    }
    cout<<endl;
  }
  if(b==2){
    for(ll i=0;i<3;i++){
      if(i==0)
        cout<<a+d2[i];
      else
        cout<<" "<<a-i+d2[i];
    }
    cout<<endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: narrowing conversion of '-1' from 'int' to 'll' {aka 'long long unsigned int'} [-Wnarrowing]
    9 |   ll d1[]={-1,-1,3};
      |            ^~
a.cc:9:15: error: narrowing conversion of '-1' from 'int' to 'll' {aka 'long long unsigned int'} [-Wnarrowing]
    9 |   ll d1[]={-1,-1,3};
      |               ^~
a.cc:10:12: error: narrowing conversion of '-2' from 'int' to 'll' {aka 'long long unsigned int'} [-Wnarrowing]
   10 |   ll d2[]={-2,2,2};
      |            ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll main (){
  ll k,a,b;
  cin >> k;
  a=k/3+2;
  b=k%3;
  ll d1[]={-1,-1,3};
  ll d2[]={-2,2,2};
  cout<<"3"<<endl;
  if(b==0){
    for(ll i=0;i<3;i++){
      if(i==0)
        cout<<a;
      else
        cout<<" "<<a-i;
    }
    cout<<endl;
  }
  if(b==1){
    for(ll i=0;i<3;i++){
      if(i==0)
        cout<<a+d1[i];
      else
        cout<<" "<<a-i+d1[i];
    }
    cout<<endl;
  }
  if(b==2){
    for(ll i=0;i<3;i++){
      if(i==0)
        cout<<a+d2[i];
      else
        cout<<" "<<a-i+d2[i];
    }
    cout<<endl;
  }
  return 0;
}


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

#include <bits/stdc++.h>
 
using namespace std;
 
long long k, x[50];
 
int main() {
	scanf("%lld", &k);
	printf("50\n");
	for (int i = 0; i < 50; i++)
		x[i] = 50 + k / 50;
	for (int i = 0; i < (50 - k % 50); i++)
		for (int j = 0; j < 50; j++)
			if (i == j)
				x[j] -= 50;
			else
				x[j]++;
	for (int i = 0; i < 50; i++)
		printf("%lld%c", x[i], i == 49 ? '\n' : ' ');
	return 0;
}
Submission

Compiler output:
a.cc:22:1: error: 'Submission' does not name a type
   22 | Submission
      | ^~~~~~~~~~
Language: C++

#include <iostream>
#include <fstream>
#include <algorithm>
#include <string>
#include <cstring>
#include <map>
#include <vector>
#include <cmath>
#include <bitset>
#include <set>
#include <complex>
#include <queue>
#include <stack>


#define mp make_pair
#define pb push_back

typedef long long ll;
typedef long double ld;

using namespace std;

const ld pi = acos(-1.0);
const ld e  = exp(1.0);

const int N = 50;
ll k;
ll a[N];

void invstep(){
	ll* x = min_element(a, a+N);
	(*x) = (*x) + N;
	for(int i =0; i<N; i++) if(a+i != x) a[i]--;
}

int main(){
	
	cin >> k;
	for(int i=0; i<N; i++) a[i] = i;
	for(int i=0; i<N; i++) a[i] += (k/N);
	for(int i=0; i<k%N; i++) invstep();
	printf("%d\n", N)
	for(int i=0; i<N; i++){
		printf("%lld", a[i]);
		if(i<N-1) printf(" ");
	}
	printf("\n");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:26: error: expected ';' before 'for'
   43 |         printf("%d\n", N)
      |                          ^
      |                          ;
   44 |         for(int i=0; i<N; i++){
      |         ~~~               
a.cc:44:22: error: 'i' was not declared in this scope; did you mean 'pi'?
   44 |         for(int i=0; i<N; i++){
      |                      ^
      |                      pi
Language: C++

#include <cstdio>
#include <algorithm>
#include <cmath>
#include <vector>
#include <list>
#include <string>
#include <map>
#include <unordered_map>
#include <queue>
#include <functional>
using namespace std;

typedef long long ll;

ll k;
ll res[51];

int main() {
	cin >> k;
	ll n = 50;
	for (ll i = 0; i < n; i++) res[i] = i;
	for (ll i = 0; i < k%n; i++) {
		for (ll j = 0; j < n; j++) {
			if (i == j) res[j] += n;
			else res[j] -= 1;
		}
	}
	cout << n << endl;
	for (ll i = 0; i < n; i++) {
		cout << res[i];
		if (i != n - 1) cout << " ";
	}
	cout << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: 'cin' was not declared in this scope
   19 |         cin >> k;
      |         ^~~
a.cc:11:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
   10 | #include <functional>
  +++ |+#include <iostream>
   11 | using namespace std;
a.cc:28:9: error: 'cout' was not declared in this scope
   28 |         cout << n << endl;
      |         ^~~~
a.cc:28:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:28:22: error: 'endl' was not declared in this scope
   28 |         cout << n << endl;
      |                      ^~~~
a.cc:11:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
   10 | #include <functional>
  +++ |+#include <ostream>
   11 | using namespace std;
Language: C++

#include<stdio.h>
#include<string.h>
#include<algorithm>
using namespace std;
#define ll long long int
ll a[55];
int main()
{
   ll n;
   while(~scanf("%lld",&n))
   {
       for(int i=1;i<=50;i++)a[i]=i;
       for(int i=1;i<=50;i++)a[i]+=(n-50)/50;
       (n-50)%=50; 
       for(int i=50;i>=1;i--)
       {
           if(n>0)n--,a[i]++;
       }
       printf("50\n");
       for(int i=1;i<=50;i++)
       {
           if(i>1)printf(" ");
            printf("%lld",a[i]);
       }
       printf("\n");
   }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:10: error: lvalue required as left operand of assignment
   14 |        (n-50)%=50;
      |        ~~^~~~
Language: C++

#include<cstdio>
using namespace std;
int main()
{
    long long k;
    scanf("%lld",&k);
    if(k&1) prinf("%lld %lld",k>>1,(k>>1)+2LL);
    else printf("%lld %lld",k>>1,(k>>1)+1LL);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: 'prinf' was not declared in this scope; did you mean 'printf'?
    7 |     if(k&1) prinf("%lld %lld",k>>1,(k>>1)+2LL);
      |             ^~~~~
      |             printf
Language: C++

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


using namespace std;

typedef int64_t ll;

typedef vector<ll> vll;


struct Solution {
    void solve(std::istream& in, std::ostream& out) {
        ll K;
        in >> K;
        vll a(50, 100000000000001000);
        ll j = 0;
        while(true)
        {
            ll sum = -1;
            rep(i, 50) sum += a[i];
            if (sum == 50) {
                j++;
                if (j == 50) break;
            }
            else if (sum > 50) {
                a[j] /= 2;
            }
            else {
                a[j] *= 2;
            }
        }
        
        out << 50 << endl;
        rep (i, 50) out << a[i] << " ";
    }
};

void solve(std::istream& in, std::ostream& out)
{
    out << std::setprecision(12);
    Solution solution;
    solution.solve(in, out);
}


#include <fstream>
#include <iostream>


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

    istream& in = cin;


    ostream& out = cout;

    solve(in, out);
    return 0;
}


#include <Windows.h>




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

#if 1
  #include <bits/stdc++.h>
#else
  #include "../../../../bits/stdc++.h"
#endif

#define FOR(i,a,b) for(int i = (a);i < (b);i++)
#define RFOR(i,a,b) for(int i = (b)-1;i >= (a);i--)
#define REP(i,n) FOR(i,0,(n))
#define RREP(i,n) RFOR(i,0,(n))

using namespace std;

typedef pair<int, int> P;
typedef long long ll;
#define pb push_back
#define mp make_pair
#define ft first
#define sd second

ll K;
ll a[50];

int main(){
  cin.tie(0);
  
  cin>>K;

  ll k = K/2 + 1;
  if(k<10000000000000000) {
    cout<<2<<endl;
    ll k = K/2 + 1;
    if(K%2==0) {
      cout<<k<<' '<<k<<endl;
    }else {
      cout<<k+1<<' '<<k-1<<endl;
    }
  }else {
    ll k1 = K/50, k2 = K%50;
    if(k2==0) {
      REP(i, 50)a[i] = 50+k1-1;
    }else {
      REP(i, 50)a[i] = 50+k1;
      REP8(i, 50-k2) {
        REP(j, 50) {
          if(j<i)a[j] - 50;
          a[j] ++;
        }
      }
    }
    cout<<50<<endl;
    REP(i, 50)cout<<a[i]<<' ';
    cout<<endl;
  }


  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:44:12: error: 'i' was not declared in this scope
   44 |       REP8(i, 50-k2) {
      |            ^
a.cc:44:7: error: 'REP8' was not declared in this scope; did you mean 'REP'?
   44 |       REP8(i, 50-k2) {
      |       ^~~~
      |       REP
Language: C++

#include<stdio.h>
#include<string.h>
#include<algorithm>
using namespace std;
#define ll __int64
ll a[55];
int main()
{
   ll n;
   while(~scanf("%lld",&n))
   {
       for(int i=1;i<=50;i++)a[i]=i;
       for(int i=1;i<=50;i++)a[i]+=n/50;
       n%=50;
       for(int i=50;i>=1;i--)
       {
           if(n>0)n--,a[i]++;
       }
       printf("50\n");
       for(int i=1;i<=50;i++)
       {
           if(i>1)printf(" ");
            printf("%lld",a[i]);
       }
       printf("\n");
   }
}


Compiler output:
a.cc:5:12: error: '__int64' does not name a type; did you mean '__int64_t'?
    5 | #define ll __int64
      |            ^~~~~~~
a.cc:6:1: note: in expansion of macro 'll'
    6 | ll a[55];
      | ^~
a.cc: In function 'int main()':
a.cc:5:12: error: '__int64' was not declared in this scope; did you mean '__int64_t'?
    5 | #define ll __int64
      |            ^~~~~~~
a.cc:9:4: note: in expansion of macro 'll'
    9 |    ll n;
      |    ^~
a.cc:10:25: error: 'n' was not declared in this scope
   10 |    while(~scanf("%lld",&n))
      |                         ^
a.cc:12:30: error: 'a' was not declared in this scope
   12 |        for(int i=1;i<=50;i++)a[i]=i;
      |                              ^
a.cc:13:30: error: 'a' was not declared in this scope
   13 |        for(int i=1;i<=50;i++)a[i]+=n/50;
      |                              ^
a.cc:17:23: error: 'a' was not declared in this scope
   17 |            if(n>0)n--,a[i]++;
      |                       ^
a.cc:23:27: error: 'a' was not declared in this scope
   23 |             printf("%lld",a[i]);
      |                           ^
Language: C++

#include<cstdio>
using namespace std;
int main()
{
    long long k;
    scanf("%lld',&k);
    if(k&1) prinf("%lld %lld",k>>1,(k>>1)+2LL);
    else printf("%lld %lld",k>>1,(k>>1)+1LL);
    return 0;
}


Compiler output:
a.cc:6:11: warning: missing terminating " character
    6 |     scanf("%lld',&k);
      |           ^
a.cc:6:11: error: missing terminating " character
    6 |     scanf("%lld',&k);
      |           ^~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:5: error: expected primary-expression before 'if'
    7 |     if(k&1) prinf("%lld %lld",k>>1,(k>>1)+2LL);
      |     ^~
a.cc:8:5: error: 'else' without a previous 'if'
    8 |     else printf("%lld %lld",k>>1,(k>>1)+1LL);
      |     ^~~~
Language: C++

#if 1
  #include <bits/stdc++.h>
#else
  #include "../../../../bits/stdc++.h"
#endif

#define FOR(i,a,b) for(int i = (a);i < (b);i++)
#define RFOR(i,a,b) for(int i = (b)-1;i >= (a);i--)
#define REP(i,n) FOR(i,0,(n))
#define RREP(i,n) RFOR(i,0,(n))

using namespace std;

typedef pair<int, int> P;
typedef long long ll;
#define pb push_back
#define mp make_pair
#define ft first
#define sd second

ll K;
ll a[50];

int main(){
  cin.tie(0);
  
  cin>>K;

  ll k = K/2 + 1;
  if(k<10000000000000000) {
    cout<<2<<endl;
    ll k = K/2 + 1;
    if(K%2==0) {
      cout<<k<<' '<<k<<endl;
    }else {
      cout<<k+1<<' '<<k-1<<endl;
    }
  }else {
    ll k1 = K/50, k2 = K%50;
    if(k2==0) {
      REP(i, 50)a[i] = 50+k1-1;
    }else {
      REP(i, 50)a[i] = 50+k1;
      REP8(i, N-k2) {
        REP(j, 50) {
          if(j<i)a[j] - 50;
          a[j] ++;
        }
      }
    }
    cout<<50<<endl;
    REP(i, 50)cout<<a[i]<<' ';
    cout<<endl;
  }


  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:44:12: error: 'i' was not declared in this scope
   44 |       REP8(i, N-k2) {
      |            ^
a.cc:44:15: error: 'N' was not declared in this scope
   44 |       REP8(i, N-k2) {
      |               ^
a.cc:44:7: error: 'REP8' was not declared in this scope; did you mean 'REP'?
   44 |       REP8(i, N-k2) {
      |       ^~~~
      |       REP
Language: C++

#if 1
  #include <bits/stdc++.h>
#else
  #include "../../../../bits/stdc++.h"
#endif

#define FOR(i,a,b) for(int i = (a);i < (b);i++)
#define RFOR(i,a,b) for(int i = (b)-1;i >= (a);i--)
#define REP(i,n) FOR(i,0,(n))
#define RREP(i,n) RFOR(i,0,(n))

using namespace std;

typedef pair<int, int> P;
typedef long long ll;
#define pb push_back
#define mp make_pair
#define ft first
#define sd second

ll K;
ll a[50];

int main(){
  cin.tie(0);
  
  cin>>K;

  ll k = K/2 + 1;
  if(k<10000000000000000) {
    cout<<2<<endl;
    ll k = K/2 + 1;
    if(K%2==0) {
      cout<<k<<' '<<k<<endl;
    }else {
      cout<<k+1<<' '<<k-1<<endl;
    }
  }else {
    ll k1 = K/N, k2 = K%N;
    if(k2==0) {
      REP(i, 50)a[i] = N+k1-1;
    }else {
      REP(i, 50)a[i] = N+k1;
      REP8(i, N-k2) {
        REP(j, 50) {
          if(j<i)a[j] - N;
          a[j] ++;
        }
      }
    }
    cout<<50<<endl;
    REP(i, 50)cout<<a[i]<<' ';
    cout<<endl;
  }


  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:39:15: error: 'N' was not declared in this scope
   39 |     ll k1 = K/N, k2 = K%N;
      |               ^
a.cc:40:8: error: 'k2' was not declared in this scope; did you mean 'k1'?
   40 |     if(k2==0) {
      |        ^~
      |        k1
a.cc:44:12: error: 'i' was not declared in this scope
   44 |       REP8(i, N-k2) {
      |            ^
a.cc:44:7: error: 'REP8' was not declared in this scope; did you mean 'REP'?
   44 |       REP8(i, N-k2) {
      |       ^~~~
      |       REP
Language: C++

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

using namespace std;

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

  long k;
  cin >> k;

  long n = k / 50;
  long m = k % 50;

  vector<long> ans(50, max(50 * n - m, 0));
  for (int i = 0; i < m; i++) {
    ans[i] += 50;
  }

  cout << 50 << endl;
  for (int i = 0; i < 50; i++) {
    cout << ans[i];
    if (i != 49) cout << " ";
  }
  cout << endl;
  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:18:27: error: no matching function for call to 'max(long int, int)'
   18 |   vector<long> ans(50, max(50 * n - m, 0));
      |                        ~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:18:27: note:   deduced conflicting types for parameter 'const _Tp' ('long int' and 'int')
   18 |   vector<long> ans(50, max(50 * n - m, 0));
      |                        ~~~^~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:4:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:18:27: note:   mismatched types 'std::initializer_list<_Tp>' and 'long int'
   18 |   vector<long> ans(50, max(50 * n - m, 0));
      |                        ~~~^~~~~~~~~~~~~~~
Language: C++

#include "math.h"
#include<vector>
#include<queue>	
using namespace std;
vector<vector<int>> edges;
vector<int> mark;
vector<int> d;
queue<int> q;
long long int n,m;
void BFS(int start){
	q.push(start);
	d[start]=0;
	mark[start]=1;
	while(!q.empty()){
		int v=q.front();
		q.pop();
		for(int i=0;i<edges[v].size();i++){
			if(mark[edges[v][i]]!=1){
				d[edges[v][i]]=d[v]+1;
				mark[edges[v][i]]=1;
				q.push(edges[v][i]);
			}

		}

	}
}
using namespace std;
int main(){
	cin>>n;
	cout<<"50"<<endl;
	int k;
	cout<<"0 ";
	
		for(int i=0;i<49;i++){
			cout<<n/50+49+n%50<<" ";
			if(n%50!=0){
				n--;
			}
		}

	cin>>n;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:9: error: 'cin' was not declared in this scope
   30 |         cin>>n;
      |         ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include<queue>
  +++ |+#include <iostream>
    4 | using namespace std;
a.cc:31:9: error: 'cout' was not declared in this scope
   31 |         cout<<"50"<<endl;
      |         ^~~~
a.cc:31:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:31:21: error: 'endl' was not declared in this scope
   31 |         cout<<"50"<<endl;
      |                     ^~~~
a.cc:4:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    3 | #include<queue>
  +++ |+#include <ostream>
    4 | using namespace std;
Language: Java

import java.io.*;
import java.util.*;
import java.util.stream.IntStream;

class Test {
	
	FastScanner _in;
	PrintWriter _out;
 
	void solve() {
		long k = _in.nextLong();
		
		if (k == 0) {
		    _out.println(2);
		    _out.println("1 1");
		} else if (k == 1) {
		    _out.println(2);
		    _out.println("2 0");
		}
		
		long i;
		
		_out.println(k + 1);
		
		LongStream.rangeClosed(1, k).parallel().forEach((j) -> {
		    _out.print("0 ");
		});
		
		_out.println(k * (k + 1));
	}
	
	void run() throws Exception {
		_in = new FastScanner();
		_out = new PrintWriter(System.out);
 
		solve();
		
		_out.close();
	}
 
	public static void main(String[] args) throws Exception {
		new Test().run();
	}
	
	class FastScanner {
		BufferedReader _br;
		StringTokenizer _st;
		
		public FastScanner(String fileName) {
			try {
				_br = new BufferedReader(new FileReader(fileName));
			} catch (FileNotFoundException e) {
				// Error
			}
		}
		
		public FastScanner() {
			_br = new BufferedReader(new InputStreamReader(System.in));
		}
		
		String nextToken() {
			while (_st == null || !_st.hasMoreElements()) {
				try {
					_st = new StringTokenizer(_br.readLine());
				} catch (IOException e) {
					throw new InputMismatchException();
				}
			}
			
			return _st.nextToken();
		}
		
		String next() {
			return nextToken();
		}
		
		short nextShort() {
			return Short.parseShort(nextToken());
		}
		
		int nextInt() {
			return Integer.parseInt(nextToken());
		}
		
		long nextLong() {
			return Long.parseLong(nextToken());
		}
		
		float nextFloat() {
			return Float.parseFloat(nextToken());
		}
		
		double nextDouble() {
			return Double.parseDouble(nextToken());
		}
	}
 
} 

Compiler output:
Main.java:25: error: cannot find symbol
		LongStream.rangeClosed(1, k).parallel().forEach((j) -> {
		^
  symbol:   variable LongStream
  location: class Test
1 error
Language: C++

#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;
int main()
{
    int N=50;
    long long base,offset,K;
    scanf("%lld",&K);
    base=L/N;
    offset=L%N;
    printf("%lld",base+offset);
    for(int i=2;i<=N;i++)
        printf(" %lld",base);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: 'L' was not declared in this scope
   13 |     base=L/N;
      |          ^
Language: C++

#include<iostream>	// 入出力
#include<stdio.h>	// printf()が使える小数は%fで
#include<math.h>	// 数学の関数
#include<vector>	// 配列
#include<string>	// 文字列
#include<map>		// 連想配列
#include<stack>		// スタック
#include<queue>		// キュー
#include<algorithm> // ソートとか

using namespace std;

using ll = long long;

int main()
{
	ll K; cin >> K;

	ll N = K;

	if (K >= 10) { N = 10; }
	if (K == 0) { cout << "4\n3 3 3 3" << endl; return 0; }
	if (K == 1) { cout << "3\n1 0 3" << endl; return 0; }

	vector<ll> a(N, -K);

	a[0] = N - 1 - K;

	ll tuika = (K*(N + 1)) / (N);
	ll amari = (K*(N + 1)) % (N);

	for (int i = 0; i < N; ++i)
	{
		a[i] += tuika;
	}
	a[0] += amari;

	cout << N << endl;
	for (int i = 0; i < N; ++i)
	{
		cout << a[i] << " " << flush;
	}
	cout << endl;


	return 0;


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

#include<cstring>
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<queue>
#include<cmath>
#include<map>
#include<sstream>
#define rep(i,l,r) for (int i=l;i<=r;i++)
#define down(i,l,r) for (int i=l;i>=r;i--)
#define clr(x,y) memset(x,y,sizeof(x))
#define maxn 500500
#define inf 1152921504606846976
#define ll long long
#define mm 1000000007
#define eps 1e-9
#define low(x) x&(-x)
#define pb push_back
#define PII pair<int,int>
using namespace std;

ll read(){
    ll x=0,f=1; char ch=getchar();
    while (!isdigit(ch)) {if (ch=='-') f=-1; ch=getchar();}
    while (isdigit(ch)){x=x*10+ch-'0'; ch=getchar();}
    return x*f;
}
ll k;
int main(){
//	freopen("in.txt","r",stdin);
//	freopen("out.txt","w",stdout);
	k=read();
	if (k==1) {
		puts("2");
		puts("2 0");
	}
	else if (k<=10000000000000000){
		puts("2");
		printf("%lld 1",k);
	}
	else {
		ll n=k/10000000000000000;
		m=k%10000000000000000;
		if (m!=0) n++;
		printf("%lld\n",n);
		rep(i,1,n-1) printf("%lld ",10000000000000000);
		printf("%lld\n",m+n-1);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:17: error: 'm' was not declared in this scope
   43 |                 m=k%10000000000000000;
      |                 ^
Language: C++

#include <stdio.h>
#include <algorithm>
#include <math.h>
#include <string.h>
#include <conio.h>
#define INF 123456789
#define MOD 1000000007




int main()
{

	long long int N;
	scanf("%lld", &N);

	printf("2\n");

	printf("%lld 0\n", N / 2 + N);

	_getch();
	return 0;
}

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

#include<iostream>
#define MAX 10000000000000999l
using namespace std;
int main(){
	long long int k;
	cin>>k;
	
	cout<<"50"<<endl;
	for(int i=1;i<=50;i++){
		cout<<()(k<MAX*i)?49:49+k-MAX*i);
		if(i-50)cout<<" ";
	}
	cout<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:24: error: expected primary-expression before ')' token
   10 |                 cout<<()(k<MAX*i)?49:49+k-MAX*i);
      |                        ^
Language: C++

#include<iostream>
#include<vector>
using namespace std;
 
vector<int>graph[200005];
 
int main() {
	int n, m; cin >> n >> m;
	for (int i = 0, a, b; i < m; i++) {
		cin >> a >> b; a--; b--;
		graph[a].push_back(b);
		graph[b].push_back(a);
	}
	for (int i = 0; i < graph[0].size(); i++) {
		int v = graph[0][i];
		for (int j = 0; j < graph[v].size(); j++) {
			int u = graph[v][j];
			if (u == n - 1) {
				cout << "POSSIBLE" << endl;
				return 0;
			}
		}
	}
	cout << "IMPOSSIBLE" << endl;
 
	return 0;
}
#include<iostream>
#include<vector>
using namespace std;

vector<int>graph[200005];

int main() {
	int n, m; cin >> n >> m;
	for (int i = 0, a, b; i < m; i++) {
		cin >> a >> b; a--; b--;
		graph[a].push_back(b);
		graph[b].push_back(a);
	}
	for (int i = 0; i < graph[0].size(); i++) {
		int v = graph[0][i];
		for (int j = 0; j < graph[v].size(); j++) {
			int u = graph[v][j];
			if (u == n - 1) {
				cout << "POSSIBLE" << endl;
				return 0;
			}
		}
	}
	cout << "IMPOSSIBLE" << endl;

	return 0;
}

Compiler output:
a.cc:32:12: error: redefinition of 'std::vector<int> graph [200005]'
   32 | vector<int>graph[200005];
      |            ^~~~~
a.cc:5:12: note: 'std::vector<int> graph [200005]' previously declared here
    5 | vector<int>graph[200005];
      |            ^~~~~
a.cc:34:5: error: redefinition of 'int main()'
   34 | int main() {
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main() {
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
vector<int>graph[200005];
int main() 
{
	int n, m; cin >> n >> m;
	for (int i = 0, a, b; i < m; i++)
 {
		cin >> a >> b; a--; b--;
		graph[a].push_back(b);
		graph[b].push_back(a);
	}
	for (int i = 0; i < graph[0].size(); i++) {
		int v = graph[0][i];
		for (int j = 0; graph[v].size();j++) {
			int u = graph[v][j];
			if (u == n - 1) {
				cout<<"POSSIBLE<<endl;
				return 0;
			}
		}
	}
	cout << "IMPOSSIBLE" << endl;
 
	return 0;
}


Compiler output:
a.cc:18:39: warning: missing terminating " character
   18 |                                 cout<<"POSSIBLE<<endl;
      |                                       ^
a.cc:18:39: error: missing terminating " character
   18 |                                 cout<<"POSSIBLE<<endl;
      |                                       ^~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:19:33: error: expected primary-expression before 'return'
   19 |                                 return 0;
      |                                 ^~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <unordered_map>
#include <map>
#include <algorithm>
#include <set>
#include <unordered_set>
#include <deque>
#include <cmath>
#include <stack>
#include <queue>
#include <string>
#include <locale>
#include <iomanip>
#include <memset>

#define nl '\n'

using namespace std;

int n, m, a, b;

queue<pair <int, int> > Q; //distance, node
int dist[200005];
vector<int> G[200005];

int main(){

    cin >> n >> m;

    for(int i = 0; i < m; i++){
        cin >> a >> b;
        G[a].push_back(b);
        G[b].push_back(a);
    }

    int SOURCE = 1;

    memset(dist, -1, sizeof(dist));

    Q.push(make_pair(0, SOURCE));

    while(!Q.empty()){
        int d = Q.front().first, u = Q.front().second;
        Q.pop();
        if(dist[u] != -1) continue;
        dist[u] = d; //the shortest distance to node u is d
        for(int i = 0; i < G[u].size(); i++){
            Q.push(make_pair(d+1, G[u][i]));
        }
    }

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


}

//g++ -std=c++14 comp.cpp -o b; ./b.exe
//g++ -std=c++14 comp.cpp && ./a.out

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

#include <iostream>
#include <vector>
#include <unordered_map>
#include <map>
#include <algorithm>
#include <set>
#include <unordered_set>
#include <deque>
#include <cmath>
#include <stack>
#include <queue>
#include <string>
#include <locale>
#include <iomanip>
#include <memeset>

#define nl '\n'

using namespace std;

int n, m, a, b;

queue<pair <int, int> > Q; //distance, node
int dist[200005];
vector<int> G[200005];

int main(){

    cin >> n >> m;

    for(int i = 0; i < m; i++){
        cin >> a >> b;
        G[a].push_back(b);
        G[b].push_back(a);
    }

    int SOURCE = 1;

    memset(dist, -1, sizeof(dist));

    Q.push(make_pair(0, SOURCE));

    while(!Q.empty()){
        int d = Q.front().first, u = Q.front().second;
        Q.pop();
        if(dist[u] != -1) continue;
        dist[u] = d; //the shortest distance to node u is d
        for(int i = 0; i < G[u].size(); i++){
            Q.push(make_pair(d+1, G[u][i]));
        }
    }

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


}

//g++ -std=c++14 comp.cpp -o b; ./b.exe
//g++ -std=c++14 comp.cpp && ./a.out

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

#include <iostream>
#include <vector>
#include <unordered_map>
#include <map>
#include <algorithm>
#include <set>
#include <unordered_set>
#include <deque>
#include <cmath>
#include <stack>
#include <queue>
#include <string>
#include <locale>
#include <iomanip>

#define nl '\n'

using namespace std;

int n, m, a, b;

queue<pair <int, int> > Q; //distance, node
int dist[200005];
vector<int> G[200005];

int main(){

    cin >> n >> m;

    for(int i = 0; i < m; i++){
        cin >> a >> b;
        G[a].push_back(b);
        G[b].push_back(a);
    }

    int SOURCE = 1;

    memset(dist, -1, sizeof(dist));

    Q.push(make_pair(0, SOURCE));

    while(!Q.empty()){
        int d = Q.front().first, u = Q.front().second;
        Q.pop();
        if(dist[u] != -1) continue;
        dist[u] = d; //the shortest distance to node u is d
        for(int i = 0; i < G[u].size(); i++){
            Q.push(make_pair(d+1, G[u][i]));
        }
    }

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


}

//g++ -std=c++14 comp.cpp -o b; ./b.exe
//g++ -std=c++14 comp.cpp && ./a.out

Compiler output:
a.cc: In function 'int main()':
a.cc:38:5: error: 'memset' was not declared in this scope
   38 |     memset(dist, -1, sizeof(dist));
      |     ^~~~~~
a.cc:15:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   14 | #include <iomanip>
  +++ |+#include <cstring>
   15 |
Language: C++

#include <iostream>
using namespace std;

vector<int> *adj;
bool vis[200007] = {};
int n;

bool dfs(int v, int depth){
  if(depth == 2) return (v == n-1);
  if(vis[v]) return false;
  vis[v] = 1;
  bool r = false;
  for(auto& u : adj[v]){
    r |= dfs(u, depth+1);
  }
  return r;
}

int main(){
  int e, a, b;
  cin >> n >> e;
  adj = new vector<int>[n];
  while(e--){
    cin >> a >> b;
    a--; b--;
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  cout << (dfs(0, 0) ? "POSSIBLE" : "IMPOSSIBLE") << '\n';
}
  

Compiler output:
a.cc:4:1: error: 'vector' does not name a type
    4 | vector<int> *adj;
      | ^~~~~~
a.cc: In function 'bool dfs(int, int)':
a.cc:13:17: error: 'adj' was not declared in this scope
   13 |   for(auto& u : adj[v]){
      |                 ^~~
a.cc: In function 'int main()':
a.cc:22:3: error: 'adj' was not declared in this scope
   22 |   adj = new vector<int>[n];
      |   ^~~
a.cc:22:13: error: 'vector' does not name a type
   22 |   adj = new vector<int>[n];
      |             ^~~~~~
a.cc:22:20: error: expected primary-expression before 'int'
   22 |   adj = new vector<int>[n];
      |                    ^~~
Language: C++

#include<bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
#define ll long long
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define FORR(i,a,b)for(ll i=(a);i<=(b);i++)
#define repR(i,n) for(ll i=n-1;i>=0;i--)
#define all(v)(v).begin(),(v).end()
#define rall(v)(v).rbegin(),(v).rend()
#define F first
#define S second
#define pb push_back
#define pu push
#define COUT(x) cout<<(x)<<endl
#define PQ priority_queue<ll>
#define PQR priority_queue<ll,vector<ll>,greater<ll>>
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define mp make_pair
#define maxs(x,y) (x = max(x,y))
#define mins(x,y) (x = min(x,y))
#define sz(x) (int)(x).size()
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const ll MOD = 1000000007LL;
const ll INF = 1LL << 60;
using vll = vector<ll>;
using vvll = vector<vll>;
using vstr = vector<string>;
using pll = pair<ll, ll>;
using vpll = vector<pll>;
int main(){
  ll n,m;
  cin>>n>>m;
  vll fi(200010);
  vll la(200010);
  rep(i,m){
    ll a,b;
    cin>>a>>b;
    if(a==1){
      fi[b]++;
    }
    if(b==n){
      la[a]++;
    }
  }
  vll ab(200010);
  rep(i,200010){
    ab[i]=a[i]+b[i];
  }
  ll cu=0;
  rep(i,200010){
    if(ab[i]==2){
      COUT("POSSIBLE");
      cu++;
    }
  }
  if(cu==0) COUT("IMPOSSIBLE");
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:52:11: error: 'a' was not declared in this scope
   52 |     ab[i]=a[i]+b[i];
      |           ^
a.cc:52:16: error: 'b' was not declared in this scope
   52 |     ab[i]=a[i]+b[i];
      |                ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pint = pair<int,  int>;
using pll = pair<ll, ll>;
using edge = pair<int, ll>;
using graph = vector<vector<int>>; 
using WeightedGraph = vector<vector<edge>>;
const ll INF = 1LL << 60;
const int INF32 = 1 << 29;
const ll MOD = 1000000007;

int main() {
  int n,m;cin >> n>> m;
  graph G(n);
  for(int i = 0; i < n; ++i){ 
    int a,b;cin >> a>> b;
    G[a].push_back(b);
  }
  strong ans="IMPOSSIBLE";
  for(int i = 0; i < G[1].size(); ++i){
    if(G[1][i]==n)ans="POSSIBLE";
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:3: error: 'strong' was not declared in this scope
   21 |   strong ans="IMPOSSIBLE";
      |   ^~~~~~
a.cc:23:19: error: 'ans' was not declared in this scope; did you mean 'abs'?
   23 |     if(G[1][i]==n)ans="POSSIBLE";
      |                   ^~~
      |                   abs
a.cc:25:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   25 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

#include <bits/stdc++.h>

using namespace std;
using ll =long long;
using db = double;
using vll = vector<long long>;

template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
#define che(a,string) cout<<"//"<<string <<"=="<<(a)<<"//" <<endl;
#define SORT(a) sort((a).begin(),(a).end())
#define rSORT(a) reverse((a).begin(),(a).end())
#define For(i, a, b)    for(int i = (a) ; i < (b) ; ++i)
#define rep(i, n)       For(i, 0, n)
#define leftunique(a) {SORT(a);(a).erase(unique((a).begin(),(a).end()),(a).end());}
//leftuniqueは配列から同じ要素のものを取り除く 例 4 6 2 1 3 4 1 2 なら 1 2 3 4 6 になる
#define debug(x)  cout << #x << " = " << (x) << endl;
bool IsInt(double a){int b = a/1;if(a==b){return true;}else {return false;}}
bool coY() {cout <<"POSSIBLE"<<endl;}
bool coN(){cout <<"IMPOSSIBLE"<<endl;}
const int mod = 1e9 + 7;
const ll INF = 1LL << 60;
//ここから書き始める

int main()
{
	int n,m;
	cin >> n>> m;
	int latte[200000] = {}, malta[200000] ={};
	rep(i,m){
		int a , b;
		cin >> a >> b;
		--a,--b;
		if(a==0) latte[b] = true;
		if(b==n-1) malta[a] = true;
	}

	rep(i,n){
		if(latte[i] && malta[i]){
			coY();
			return 0 ;
		}
	}
	else coN();
}


Compiler output:
a.cc: In function 'bool coY()':
a.cc:19:37: warning: no return statement in function returning non-void [-Wreturn-type]
   19 | bool coY() {cout <<"POSSIBLE"<<endl;}
      |                                     ^
a.cc: In function 'bool coN()':
a.cc:20:38: warning: no return statement in function returning non-void [-Wreturn-type]
   20 | bool coN(){cout <<"IMPOSSIBLE"<<endl;}
      |                                      ^
a.cc: In function 'int main()':
a.cc:44:9: error: 'else' without a previous 'if'
   44 |         else coN();
      |         ^~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
int main(){
	int n,m;
	cin>>n>>m;
	if(m==1){
		cout<<"IMPOSSIBLE"<<endl;
		return 0;
	}
	int a[200000];
	int b[200000];
	int sum=0;
	for(int i=0;i<m;i++){
		cin>>a[i]>>b[i];
		if(a[i]==1){
			sum++;
		}
	}
	for(int i=0;i<m;i++){
		for(int j=i;j<m;j++){
		if(a[i]>a[j]){
			int temp1=a[i];
			a[i]=a[j];
			int a[j]=temp1;
			int temp2=b[i];
			b[i]=b[j];
			int b[j]=temp2;
		}	
		}
	}
	
	for(int i=0;i<sum;i++){
		for(int j=0;j<m;j++){
			if(a[j]==b[i]&&b[j]==n){
				cout<<"POSSIBLE"<<endl;
				return 0;
			}
		}
	}
	cout<<"IMPOSSIBLE"<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:34: error: array must be initialized with a brace-enclosed initializer
   26 |                         int a[j]=temp1;
      |                                  ^~~~~
a.cc:29:34: error: array must be initialized with a brace-enclosed initializer
   29 |                         int b[j]=temp2;
      |                                  ^~~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
int main(){
	int n,m;
	cin>>n>>m;
	if(m==1){
		cout<<"IMPOSSIBLE"<<endl;
		return 0;
	}
	int a[200000];
	int b[200000];
	int sum=0;
	for(int i=0;i<m;i++){
		cin>>a[i]>>b[i];
		if(a[i]==1){
			sum++;
		}
	}
	for(int i=0;i<m;i++){
		if(a[i]>a[j]){
			int temp1=a[i];
			a[i]=a[j];
			int a[j]=temp1;
			int temp2=b[i];
			b[i]=b[j];
			int b[j]=temp2;
		}
	}
	
	for(int i=0;i<sum;i++){
		for(int j=0;j<m;j++){
			if(a[j]==b[i]&&b[j]==n){
				cout<<"POSSIBLE"<<endl;
				return 0;
			}
		}
	}
	cout<<"IMPOSSIBLE"<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:27: error: 'j' was not declared in this scope
   22 |                 if(a[i]>a[j]){
      |                           ^
Language: C++

#include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
int main(){
	int n,m;
	cin>>n>>m;
	int a[200000];
	int b[200000];
	for(int i=0;i<m;i++){
		cin>>a[i]>>b[i];3 
	}
	for(int i=0;i<m;i++){
		if(a[i]==1){
			for(int j=0;j<m;j++){
				if(a[j]==b[i]&&b[j]==n){
					cout<<"POSSIBLE"<<endl;
					return 0;
				}
				cout<<"IMPOSSIBLE"<<endl;
				return 0;
			}
		}	
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:34: error: expected ';' before '}' token
   11 |                 cin>>a[i]>>b[i];3
      |                                  ^
      |                                  ;
   12 |         }
      |         ~
Language: C++

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

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

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

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


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

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

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

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

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


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