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

#include<bits/stdc++.h>
#include<unordered_set>
#include<unordered_map>
#include <iostream>
#include <string>
#include <cmath>
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;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 vb = vector<bool>;
using vvb = vector<vb>;
using vvll = vector<vll>;
using vstr = vector<string>;
using pll = pair<ll, ll>;
using vc = vector<char>;
using vvc = vector<vc>;
ll dx[4]={0,1,0,-1};
ll dy[4]={1,0,-1,0};
ll gcd(ll a, ll b) { return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) { return a/gcd(a,b)*b;}
int main(){
  ll n,k;
  cin>>n>>k;
  vll a(n);
  rep(i,n) cin>>a[i];
  sort(all(a));
  ll l=a[i];
  rep(i,n){
    l=gcd(a[i],l);
  }
  if(l!=1){
    if(k%l!=0){
      COUT("IMPOSSIBLE");
    }
    else if(k>a[n-1]){
      COUT("IMPOSSIBLE");
    }
    COUT("POSSIBLE");
  }
  else{
    if(k>a[n-1]){
      COUT("IMPOSSIBLE");
    }
    else{
      COUT("POSSIBLE");
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:50:10: error: 'i' was not declared in this scope
   50 |   ll l=a[i];
      |          ^
Language: C++

#include<bits/stdc++.h>

using namespace std;

using ll = long long;

int main(void) {
    ll n, k;
    cin >> n >> k;
    vector<ll> a(n);
    for(auto &e: a) cin >> e;

    ll g = 0;
    for(auto &e: a) g = __gcd(g, e);
    
    cout << any_of(a.begin(), a.end(), [&](ll x){return (x-k)%g == 0}) ? "POSSIBLE" : "IMPOSSIBLE" << endl;
}


Compiler output:
a.cc: In lambda function:
a.cc:16:69: error: expected ';' before '}' token
   16 |     cout << any_of(a.begin(), a.end(), [&](ll x){return (x-k)%g == 0}) ? "POSSIBLE" : "IMPOSSIBLE" << endl;
      |                                                                     ^
      |                                                                     ;
a.cc: In function 'int main()':
a.cc:16:100: error: invalid operands of types 'const char [11]' and '<unresolved overloaded function type>' to binary 'operator<<'
   16 |     cout << any_of(a.begin(), a.end(), [&](ll x){return (x-k)%g == 0}) ? "POSSIBLE" : "IMPOSSIBLE" << endl;
      |                                                                                       ~~~~~~~~~~~~~^~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int n,k,a,pyy,h;
int main()
{
    cin>>n>>k>>a;h=a;
    for(int i=2;i<=n;i++)
    {
        cin>>pyy;
        a=__gcd(a,pyy);
        h=max(ak,h);
    }
    if(k%a==0&&k<=h)cout<<"POSSIBLE";
    else cout<<"IMPOSSIBLE";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: 'ak' was not declared in this scope; did you mean 'k'?
   11 |         h=max(ak,h);
      |               ^~
      |               k
Language: C++

#include <bits/stdc++.h>

#define rep(i, n) for (ll i=0;i<(n); i++)

using namespace std;
typedef long long ll;
typedef pair<ll, ll> pi;



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

  //    cout << "a";
  vector<ll> a(n);
  
  rep(i,n)    cin >> a.at(i);

  int flag = 0;
  ll tmp = *min_element(a.begin(), a.end());
  ll tmp_max = *max_element(a.begin(), a.end());

  if (k>tmp_max) {
      cout << "IMPOSSIBLE" << endl;
      return 0;      
  }

  ll tmp = a.at(0);
  rep(i, n) {
    tmp = __gcd(tmp, a.at(i));
  }
  
  
  if (k%tmp=0) {
    cout << "POSSIBLE" << endl;
    return 0;
  }
  else {
      cout << "IMPOSSIBLE" << endl;
      return 0;
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:6: error: redeclaration of 'll tmp'
   29 |   ll tmp = a.at(0);
      |      ^~~
a.cc:21:6: note: 'll tmp' previously declared here
   21 |   ll tmp = *min_element(a.begin(), a.end());
      |      ^~~
a.cc:35:8: error: lvalue required as left operand of assignment
   35 |   if (k%tmp=0) {
      |       ~^~~~
Language: C++

#include <bits/stdc++.h>

#define rep(i, n) for (ll i=0;i<(n); i++)

using namespace std;
typedef long long ll;
typedef pair<ll, ll> pi;



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

  //    cout << "a";
  vector<ll> a(n);
  
  rep(i,n)    cin >> a.at(i);

  int flag = 0;
  ll tmp = *min_element(a.begin(), a.end());
  ll tmp_max = *max_element(a.begin(), a.end());

  if (k>tmp_max) {
      cout << "IMPOSSIBLE" << endl;
      return 0;      
  }

  ll tmp = a.at(0);
  rep(i, n) {
    tmp = __gcd(tmp, a.at(i))
  }
  
  
  if (k%tmp=0) {
    cout << "POSSIBLE" << endl;
    return 0;
  }
  else {
      cout << "IMPOSSIBLE" << endl;
      return 0;
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:6: error: redeclaration of 'll tmp'
   29 |   ll tmp = a.at(0);
      |      ^~~
a.cc:21:6: note: 'll tmp' previously declared here
   21 |   ll tmp = *min_element(a.begin(), a.end());
      |      ^~~
a.cc:31:30: error: expected ';' before '}' token
   31 |     tmp = __gcd(tmp, a.at(i))
      |                              ^
      |                              ;
   32 |   }
      |   ~                           
a.cc:35:8: error: lvalue required as left operand of assignment
   35 |   if (k%tmp=0) {
      |       ~^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
long gcd(long a,long b){
  long tmp = a;
  if(a<b){
    a = b;
    b = tmp;
  }
  if(a%b==0)return b;
  else return gcd(b,a%b);
}
int main(){
  int n;
  long k;
  cin >> n >> k;
  vector<long>a(n);
  int i;
  for(i=0;i<n;i++){
    cin >> a[i];
  }
  long gcdd = a[0];
  long maxx = a[0]
  for(i=1;i<n;i++){
    gcdd = gcd(gcdd,a[i]);
    if(maxx < a[i])maxx = a[i];
  }
  if(k%gcdd == 0 && k<=maxx)cout<<"POSSIBLE"<<endl;
  else cout << "IMPOSSIBLE" << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:3: error: expected ',' or ';' before 'for'
   23 |   for(i=1;i<n;i++){
      |   ^~~
a.cc:23:18: error: expected ';' before ')' token
   23 |   for(i=1;i<n;i++){
      |                  ^
      |                  ;
Language: C++

#include<bits/stdc++.h>
#include<iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <set>
#include <queue>
#include <deque>
#include <map>
#include <stack>
#include<bitset>
#include<list>
#include<cassert>
#include<numeric>

using namespace std;

const long long N = 1e5 + 5;

long long mini = 1e9 + 7;
long long dp[N];
long long dp2[N];
bool mark[N];
bool check = false;
vector<pair<long long, long long>> graph[N];
vector<edge > vec;
long long n, m;
long long ans;

void dfs(long long v)
{
	mark[v] = true;
	dp[v] = 1;
	for (long long i = 0; i < graph[v].size(); i++)
	{
		long long u = graph[v][i].first;
		if (!mark[u])
		{
			dfs(u);
			dp[v] += dp[u];
		}
	}
}

void dfs2(long long v)
{
	mark[v] = true;
	for (long long i = 0; i < graph[v].size(); i++)
	{
		long long u = graph[v][i].first;
		long long w = graph[v][i].second;
		if (!mark[u])
		{
			long long cnt1 = dp[u];
			long long cnt2 = n - dp[u];
			if (cnt1 == cnt2)
			{
				check = true;
				cnt1 = 2 * cnt1 - 1;
			}
			else
			{
				cnt1 = 2 * min(cnt1, cnt2);
			}
			ans += cnt1 * w;
			dfs2(u);
		}
	}
}


int main() 
{
	cin >> n;
	for (long long i = 0; i < n - 1; i++)
	{
		long long u, v, w;
		cin >> u >> v >> w;
		graph[u - 1].push_back({v - 1, w});
		graph[v - 1].push_back({u - 1, w});
		mini = min(mini, w);
	}
	dfs(0);
	memset(mark, 0, sizeof mark);
	dfs2(0);
	if (!check)
	{
		ans -= mini;
	}
	cout << ans << endl;


	
}





Compiler output:
a.cc:26:8: error: 'edge' was not declared in this scope
   26 | vector<edge > vec;
      |        ^~~~
a.cc:26:13: error: template argument 1 is invalid
   26 | vector<edge > vec;
      |             ^
a.cc:26:13: error: template argument 2 is invalid
Language: C++

def gcm(a,b):
  a,b = max(a,b),min(a,b)
  while b != 0:
    a,b = b,a%b
  return a
n,k = map(int,input().split())
a = list(map(int,input().split()))
m = max(a)
g = a[0]
for i in a[1:]:
  g = gcm(g,i)
if m >= k and (m-k)%g == 0:
  print('POSSIBLE')
else:
  print('IMPOSSIBLE')

Compiler output:
a.cc:13:9: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   13 |   print('POSSIBLE')
      |         ^~~~~~~~~~
a.cc:15:9: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
   15 |   print('IMPOSSIBLE')
      |         ^~~~~~~~~~~~
a.cc:1:1: error: 'def' does not name a type
    1 | def gcm(a,b):
      | ^~~
Language: C++

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

int main(){
  ll n,k;cin >> n >> k;
  ll a,b,MAX;
  if(n==1){
    cin >> a;
    if(k==tmp){cout << "POSSIBLE" << endl;return 0;}
    else {cout << "IMPOSSIBLE" << endl;return 0;}
  }
  cin >> b;
  ll GCD = gcd(a,b);
  MAX = max(a,b);
  for(ll i=0; i<n-2; i++){
    cin >> a;
    MAX = max(a,MAX);
    GCD = gcd(GCD,a);
  }
  if(k<=MAX&&k%GCD==0){cout << "POSSIBLE" << endl;}
  else{cout << "IMPOSSIBLE" << endl;}
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   10 |     if(k==tmp){cout << "POSSIBLE" << endl;return 0;}
      |           ^~~
      |           tm
Language: C++

#include <bits/stdc++.h>
using namespace std;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(vec) vec.begin(),vec.end()
typedef long long ll;
const int MAX=2e7;
const ll MOD=1e9+7;
const int INF=1<<30;

ll gcd(ll a,ll b){
  if(a%b==0)
    return b;
  return gcd(b,a%b);
}

int main(){
  int N,K;
  cin >> N >> K;
  vector<int> A(N);
  rep(i,N){
    cin >> A[i];
  }
  int maxA=0;
  int GCD=A[0];
  rep(i,N){
    if(A[i]>maxA) maxA=A[i];
    GCD=gcd(GCD,A[i]);
  }
  if(maxA=>K&&(maxA-K)%GCD==0) cout << "POSSIBLE" << endl;
  else cout << "IMPOSSIBLE" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:11: error: expected primary-expression before '>' token
   31 |   if(maxA=>K&&(maxA-K)%GCD==0) cout << "POSSIBLE" << endl;
      |           ^
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int K = sc.nextInt();
    int[] A = new int[N];
    for (int i = 0; i < N; i++) {
      A[i] = sc.nextInt();
    }
    
    Arrays.sort(A);

    if (K > A[N-1]) {
      System.out.println("IMPOSSIBLE");
      return;
    }
    if (N == 1) {
      System.out.println(A[0] == K ? "POSSIBLE" : "IMPOSSIBLE");
      return;
    }
    int gcd = calcGcd(A[1], A[0]);
    boolean ans = false;
    for (int i = 0; i < N; i++) {
      if (A[i]%gcd != 0 || A[i] == K) {
        ans = true;
        break;
      }
    }
    System.out.println(ans ? "POSSIBLE" : "IMPOSSIBLE");
  }
  
  private static int calcGcd(int a, int b) {
    if (b == 0) return a;
    return gcd(b, a%b);
  }
}

Compiler output:
Main.java:36: error: cannot find symbol
    return gcd(b, a%b);
           ^
  symbol:   method gcd(int,int)
  location: class Main
1 error
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 K = sc.nextInt();
    int[] A = new int[N];
    for (int i = 0; i < N; i++) {
      A[i] = sc.nextInt();
    }
    
    Arrays.sort(A);

    if (K > A[N-1]) {
      System.out.println("IMPOSSIBLE");
      return;
    }
    if (N == 1) {
      System.out.println(A[0] == K ? "POSSIBLE" ? "IMPOSSIBLE");
      return;
    }
    int gcd = calcGcd(A[1], A[0]);
    boolean ans = false;
    for (int i = 0; i < N; i++) {
      if (A[i]%gcd != 0 || A[i] == K) {
        ans = true;
        break;
      }
    }
    System.out.println(ans ? "POSSIBLE" : "IMPOSSIBLE");
  }
  
  private static int calcGcd(int a, int b) {
    if (b == 0) return a;
    return gcd(b, a%b);
  }
}

Compiler output:
Main.java:20: error: : expected
      System.out.println(A[0] == K ? "POSSIBLE" ? "IMPOSSIBLE");
                                                              ^
1 error
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 K = sc.nextInt();
    int[] A = new int[N];
    for (int i = 0; i < N; i++) {
      A[i] = sc.nextInt();
    }
    
    Arrays.sort(A);
    
    boolean ans = false;
    int d = A[0];
    for (int i = 0; i < N; i++) {
      if (A[i] != d*(i+1 || A[i] == K)) {
        ans = true;
        break;
      }
    }
    System.out.println(ans ? "POSSIBLE" : "IMPOSSIBLE");
  }
}

Compiler output:
Main.java:18: error: bad operand types for binary operator '||'
      if (A[i] != d*(i+1 || A[i] == K)) {
                         ^
  first type:  int
  second type: boolean
1 error
Language: C

#include<stdio.h>
long GCDisGOD(long a,long b){
  long p = a;
  long q = b;
  long c=0;
  long hoge = 0;
  long i = 0;
  for(i=0;i<10;i++){
    c = p%q;
    if(c == 0){
      return q;
    }else{
      hoge = p;
      p = q;
      q = c;
    }
    //printf("%d %d %d#",p,q,c);
  }
}
    
int main(){
  int n = 0;
  int k = 0;
  int i = 0;
  long a[100000] = {};
  int success = -1;
  long gcd = 0;
  long max = 0;
  scanf("%ld %ld",&n,&k);
  for(i=0;i<n;i++){
    scanf("%ld",&a[i]);
  }
    gcd = a[0];
    for(i=1;i<n;i++){
        gcd = GCDisGOD(gcd,a[i]);
        if(a[i] > max){
          max = a[i];
        }
      }
    }
  if(a[0] == k){
    success = 1;
  }
    //printf("%ld#",gcd);
    if((k % gcd == 0  && max < k)){
      success = 1;
    }else{
      success = 0;
    }
  
  if(success){
    printf("POSSIBLE");
  }else{
    printf("IMPOSSIBLE");
  }
  
      
  return 0;
}
         
  

Compiler output:
main.c:41:3: error: expected identifier or '(' before 'if'
   41 |   if(a[0] == k){
      |   ^~
main.c:45:5: error: expected identifier or '(' before 'if'
   45 |     if((k % gcd == 0  && max < k)){
      |     ^~
main.c:47:6: error: expected identifier or '(' before 'else'
   47 |     }else{
      |      ^~~~
main.c:51:3: error: expected identifier or '(' before 'if'
   51 |   if(success){
      |   ^~
main.c:53:4: error: expected identifier or '(' before 'else'
   53 |   }else{
      |    ^~~~
main.c:58:3: error: expected identifier or '(' before 'return'
   58 |   return 0;
      |   ^~~~~~
main.c:59:1: error: expected identifier or '(' before '}' token
   59 | }
      | ^
Language: C

#include<stdio.h>
int GCDisGOD(int a,int b){
  int p = a;
  int q = b;
  int c=0;
  int hoge = 0;
  int i = 0;
  for(i=0;i<20;i++){
    c = p%q;
    if(c == 0){
      return q;
    }else{
      hoge = p;
      p = q;
      q = c;
    }
    //printf("%d %d %d#",p,q,c);
  }
}
    
int main(){
  int n = 0;
  int k = 0;
  int i = 0;
  int a[100000] = {};
  int success = -1;
  int gcd = 0;
  int max = 0;
  scanf("%d %d",&n,&k);
  for(i=0;i<k;i++){
    scanf("%d",&a[i]);
  }
    gcd = a[0];
    for(i=1;i<n;i++){
      if(a[i] == k){
        success = 1;
        break;
      }else{
        gcd = GCDisGOD(gcd,a[i]);
        if(a[i] > max){
          max = a[i];
        }
    }
    printf("%d#",gcd);
    if((k % gcd == 0 || success = 1)&&success != 0&&max < k){
      success = 1;
    }else{
      success = 0;
    }
  
  if(success){
    printf("POSSIBLE");
  }else{
    printf("IMPOSSIBLE");
  }
  
      
  return 0;
}
         
  

Compiler output:
main.c: In function 'main':
main.c:45:33: error: lvalue required as left operand of assignment
   45 |     if((k % gcd == 0 || success = 1)&&success != 0&&max < k){
      |                                 ^
main.c:59:1: error: expected declaration or statement at end of input
   59 | }
      | ^
Language: C++

#include <bits/stdc++.h>
#include <cstdlib>  // abs() for integer 邨ｶ蟇ｾ蛟､豎ゅａ繧・▽
#include <cmath>    // abs() for float, and fabs()
#include <algorithm>
#include <vector>
#include <string>
#define rep(i,n) for(int i = 0; i < (n);i++)
#define SORT(a) sort((a).begin(),(a).end())
#define REV(a) reverse((a).begin(),(a).end())
using namespace std;
#define INF 2000000000
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;
typedef long long ll;
 
 
int main(){
int n,k ;
   	cin >>n>> k ;//k is target
	vector<ll> A(n);
	int judge =0;
	rep(i,n){
	   	cin>>A[i];
		if(A[i]==k) judge = 1;
	}
	SORT(A);
	int coutn = 0;
	if(judge != 1){
		for(int i = n-1 ; i > 0; i--){
			count ++;
			if(count>3)break;
			for(int j = 0 ; j < i ; j++){
				ll a = A[i]%A[j];
				if(a!=0&&k/a == 0){
					judge = 1;
					break;
				}
				else if(a == 1){
					judge = 1;
					break;
				}
			}
		}
	}
	if(judge) cout<<"POSSIBLE"<<endl;
	else cout<<"IMPOSSIBLE"<<endl;	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:31: error: no post-increment operator for type
   31 |                         count ++;
      |                               ^~
a.cc:32:33: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator>'
   32 |                         if(count>3)break;
      |                            ~~~~~^~
Language: C++

#include <bits/stdc++.h>
#include <cstdlib>  // abs() for integer 邨ｶ蟇ｾ蛟､豎ゅａ繧・▽
#include <cmath>    // abs() for float, and fabs()
#include <algorithm>
#include <vector>
#include <string>
#define rep(i,n) for(int i = 0; i < (n);i++)
#define SORT(a) sort((a).begin(),(a).end())
#define REV(a) reverse((a).begin(),(a).end())
using namespace std;
#define INF 2000000000
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;

int main(){
int n,k ;
   	cin >>n>> k ;//k is target
	vector<ll> A(n);
	int judge =0;
	rep(i,n){
	   	cin>>A[i];
		if(A[i]==k) judge = 1;
	}
	SORT(A);
	int coutn = 0;
	if(judge != 1){
		for(int i = n-1 ; i > 0; i--){
			count ++;
			if(count>3)break;
			for(int j = 0 ; j < i ; j++){
				ll a = A[i]%A[j];
				if(a!=0&&k/a == 0){
					judge = 1;
					break;
				}
				else if(a == 1){
					judge = 1;
					break;
				}
			}
		}
	}
	if(judge) cout<<"POSSIBLE"<<endl;
	else cout<<"IMPOSSIBLE"<<endl;	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:16: error: 'll' was not declared in this scope
   19 |         vector<ll> A(n);
      |                ^~
a.cc:19:18: error: template argument 1 is invalid
   19 |         vector<ll> A(n);
      |                  ^
a.cc:19:18: error: template argument 2 is invalid
a.cc:22:23: error: invalid types 'int[int]' for array subscript
   22 |                 cin>>A[i];
      |                       ^
a.cc:23:21: error: invalid types 'int[int]' for array subscript
   23 |                 if(A[i]==k) judge = 1;
      |                     ^
a.cc:8:26: error: request for member 'begin' in 'A', which is of non-class type 'int'
    8 | #define SORT(a) sort((a).begin(),(a).end())
      |                          ^~~~~
a.cc:25:9: note: in expansion of macro 'SORT'
   25 |         SORT(A);
      |         ^~~~
a.cc:8:38: error: request for member 'end' in 'A', which is of non-class type 'int'
    8 | #define SORT(a) sort((a).begin(),(a).end())
      |                                      ^~~
a.cc:25:9: note: in expansion of macro 'SORT'
   25 |         SORT(A);
      |         ^~~~
a.cc:29:31: error: no post-increment operator for type
   29 |                         count ++;
      |                               ^~
a.cc:30:33: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator>'
   30 |                         if(count>3)break;
      |                            ~~~~~^~
a.cc:32:35: error: expected ';' before 'a'
   32 |                                 ll a = A[i]%A[j];
      |                                   ^~
      |                                   ;
a.cc:33:36: error: 'a' was not declared in this scope
   33 |                                 if(a!=0&&k/a == 0){
      |                                    ^
Language: C++

if(judge != 1){
		for(int j = 0 ; j < n-1 ; j++){
			ll a = A[n-1]%A[j];
			if(a!=0&&k/a == 0){
				judge = 1;
				break;
			}
			else if(a == 1){
				judge = 1;
				break;
			}
		}
	}

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'if'
    1 | if(judge != 1){
      | ^~
Language: C++

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


int main(){
  int n,k;
  cin >>n>>k;
  priority_queue<int> b;
  rep(i,n){
  	int a;
    cin >>a;
    b.push(a);
  }
  if(b.top()=k) {
  printf("POSSIBLE");
  return 0;
  }
  if(b.top()<k) {
  printf("IMPOSSIBLE");
  return 0;
  }

  

}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:13: error: assignment of read-only location 'b.std::priority_queue<int>::top()'
   18 |   if(b.top()=k) {
      |      ~~~~~~~^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, j, n) for (ll i = j; i < n; i++)
#define all(x) (x).begin(),(x).end()
#define INF (1000000000)
#define MOD (1000000007)
#define MAX (100000)
#define pii pair<int, int>

/////////////////////////////////////////////////////////

class XY{
public:
  ll x, y;
  XY() {x = y = 0;}
  XY(ll u, ll v) {x = u; y = v;}
};

template<typename T1, typename T2>
void chmin(T1 &a, T2 b) {if(a > b) a = b;}
template<typename T1, typename T2>
void chmax(T1 &a, T2 b) {if(a < b) a = b;}

template<typename T1, typename T2>
ll mypow(T1 a, T2 n){
  if(n == 0) return 1;
  if(n == 1) return a;
  if(n % 2) return a * mypow(a, n - 1);
  ll tmp = mypow(a, n / 2);
  return tmp * tmp;
}

template<typename T>
int BS(vector<T> V, int left, int right, T key){
  int mid = (left + right) / 2;
  if(V[mid] <= key) left = mid;
  else right = mid;
  if(right - mid == 1) return left;
  else return BS(V, left, right, key);
}

ll comb(ll n, ll r){
	ll res = 1;
  rep(i, 0, r){
    res *= n - i;
    res /= i + 1;
  }
  return res;
}

template<typename T>
T euclid(T a, T b){
  if(b == 0) return a;
  else return euclid(b, a % b);
}

/////////////////////////////////////////////////////////

void Main() {
  int N, K; cin >> N, K;
  vector<int> A(N);
  int ma = 0; mi = INF;
  rep(i, 0, N){
    cin >> A[i];
    chmax(ma, A[i]);
    chmin(mi, A[i]);
  }
  int GCM = A[0];
  rep(i, 1, N) GCM = euclid(GCM, A[i]);
  string res;
  if(K % GCM == 0 && ma - mi >= K) res = "POSSIBLE";
  else res = "IMPOSSIBLE";
  cout << res << endl;
}

/////////////////////////////////////////////////////////

int main(){
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  cout << std::fixed << std::setprecision(15);

  Main();
}


Compiler output:
a.cc: In function 'void Main()':
a.cc:63:15: error: 'mi' was not declared in this scope; did you mean 'ma'?
   63 |   int ma = 0; mi = INF;
      |               ^~
      |               ma
Language: C++

// luogu-judger-enable-o2
#include<bits/stdc++.h>
using namespace std;
int n,k,e,u,w;
int main(){
    cin>>n>>k>>e;
    w=e;
    for(int i=2;i<=n;i++){
        cin>>u;
        e=__gcd(e,u);      
        w=max(u,w);
    }
    if(k%a==0&&k<=w){
        cout<<"POSSIBLE"<<endl;
    }
    else{
        cout<<"IMPOSSIBLE"<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: 'a' was not declared in this scope
   13 |     if(k%a==0&&k<=w){
      |          ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,k,a,ak,h;
    cin>>n>>k>>a;
    h=a;
    for(int i=2;i<=n;i++)
    {
        cin>>ak;
        a=__gcd(a,ak);      
        h=max(ak,h);
    }
    if(k%a==0&&k<=h)    
    {
        cout<<"POSSIBLE"<<endl;
    }
    else
    {
        cout<<"IMPOSSIBLE"<<endl;
    }

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

#include <iostream>
using namespace std;

long long gcd(long long a, long long b){
    if (b == 0) return a;
    return gcd(b, a % b);
}

int main(){
    int N, K;
    long long p, n, M;
    bool b = false;
    cin >> N >> K;

    cin >> p;
    M = p;
    for (int i = 1; i < N; ++i){
        cin >> n;
        p = gcd(p, n);
        M = max(M, n);
        if (n == K) b = ture;
    }

    cout << ( b||(K % p == 0 && K <= M) ? "POSSIBLE" : "IMPOSSIBLE") << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:25: error: 'ture' was not declared in this scope
   21 |         if (n == K) b = ture;
      |                         ^~~~
Language: C++

    /*
    Life Before Death, Strength Before Weakness, Journey Before Destination
    ------------------------------------------------------------------------
    You don't become great by trying to be great.
    You become great by wanting to do something,
    and then doing it so hard that you become great in the process.
    */
 
    //#pragma comment(linker, ack:200000000")
    #pragma GCC optimize ("Ofast")
    #pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
    #include <bits/stdc++.h>
    using namespace std;
    
    #define TRACE
    
    #ifdef TRACE
    #define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
    template <typename Arg1>
    void __f(const char* name, Arg1&& arg1){
      cerr << name << " : " << arg1 << std::endl;
    }
    template <typename Arg1, typename... Args>
    void __f(const char* names, Arg1&& arg1, Args&&... args){
      const char* comma = strchr(names + 1, ',');cerr.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
    }
    #else
    #define trace(...)
    #endif
    
    #define rep(i, n)    for(ll i = 0; i < (n); ++i)
    #define repA(i, a, n)  for(ll i = a; i <= (n); ++i)
    #define repD(i, a, n)  for(ll i = a; i >= (n); --i)
    #define trav(a, x) for(auto& a : x)
    #define all(x) x.begin(), x.end()
    #define sz(x) (int)(x).size()
    #define fill(a)  memset(a, 0, sizeof (a))
    #define fst first
    #define snd second
    //#define mp make_pair
    #define pb push_back
    #define PI           3.141592653589793238462643383279502884197169399  /* pi */
    #define te  ll ti;   cin >> ti;  while(ti--) solve();  
    typedef long double ld;
    typedef long long ll;
    typedef pair<ll, ll> pii;
    typedef vector<ll> vi;
    const int maxN = 200100;

    void solve(){
        ll n, k, g = 0;
        cin >> n >> k;
        rep(i, n) cin >> a[i], g = __gcd(g, a[i]);
        ll m = *max_element(a, a+n);
        if(k > m) {
            cout << "IMPOSSIBLE" << endl;
            return;
        }
        cout << (k%m ? "IMPOSSIBLE" : "POSSIBLE") << endl;
    }
 
    int main() {
      cin.sync_with_stdio(0); cin.tie(0);
      cin.exceptions(cin.failbit);
     /*
      #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
      #endif
     */
      //te
      solve();
      return 0;
    } 

Compiler output:
a.cc: In function 'void solve()':
a.cc:53:26: error: 'a' was not declared in this scope
   53 |         rep(i, n) cin >> a[i], g = __gcd(g, a[i]);
      |                          ^
a.cc:54:29: error: 'a' was not declared in this scope
   54 |         ll m = *max_element(a, a+n);
      |                             ^
Language: C++

#include <cmath>
#include <cstdio>

using namespace std;

int n,k,a,ak,h,i;

int max(int a,int b)
{return(a>b?a:b);}

int main()
{
    scanf("%d %d %d",&n,&k,&a);
    h=a;
    for(i=2;i<=n;++i)
    {
        scanf("%d",&ak);
        a=__gcd(a,ak);
        h=max(ak,h);
    }
    if(k%a==0&&k<=h)printf("POSSIBLE\n");
    else printf("IMPOSSIBLE\n");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:11: error: '__gcd' was not declared in this scope
   18 |         a=__gcd(a,ak);
      |           ^~~~~
Language: Java

import java.util.*;

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

        long n = sc.nextLong();
        long k = sc.nextLong();
        List<Long> a = new ArrayList<>();

        for (int i = 0; i < n; i++){
            a.add(sc.nextLong());
            if(a.get(i)==k){
                System.out.println("POSSIBLE");
                Sytem.exit(0);
            }
        }

        int i = 0;
        int j = 0;
        long diff = 0;
        while(i < a.size()){
            while(j<a.size()){
                diff = Math.abs(a.get(i)-a.get(j));
                if((diff)==k){
                    System.out.println("POSSIBLE");
                    System.exit(0);
                }
                if(!a.contains(diff)){
                    a.add(diff);
                }
                j++;
            }
            j = 1;
            i++;
        }
        System.out.println("IMPOSSIBLE");
    }
}

Compiler output:
Main.java:15: error: cannot find symbol
                Sytem.exit(0);
                ^
  symbol:   variable Sytem
  location: class Main
1 error
Language: Java

import java.util.*;

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

        long n = sc.nextLong();
        long k = sc.nextLong();
        List<Long> a = new ArrayList<>();

        for (int i = 0; i < n; i++){
            a.add(sc.nextLong());
        }

        int j = 0;
        long diff = 0;
        while(i < a.size()){
            j = i+1;
            while(j<a.size()){
                diff = Math.abs(a.get(i)-a.get(j));
                if((diff)==k){
                    System.out.println("POSSIBLE");
                    System.exit(0);
                }
                if(!a.contains(diff)){
                    a.add(diff);
                }
                j++;
            }
        }
        System.out.println("IMPOSSIBLE");
    }
}

Compiler output:
Main.java:17: error: cannot find symbol
        while(i < a.size()){
              ^
  symbol:   variable i
  location: class Main
Main.java:18: error: cannot find symbol
            j = i+1;
                ^
  symbol:   variable i
  location: class Main
Main.java:20: error: cannot find symbol
                diff = Math.abs(a.get(i)-a.get(j));
                                      ^
  symbol:   variable i
  location: class Main
3 errors
Language: Java

import java.util.*;

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

        long n = sc.nextLong();
        long k = sc.nextLong();
        long[] a = new long[n];

        for (int i = 0; i < n; i++){
            a[i] = sc.nextLong();
        }

        int j = 0;

        for(int i = 0; i<n; i++){
            j = i+1;
            while(j<n){
                if(Math.abs(a[i]-a[j])==k){
                    System.out.println("POSSIBLE");
                    System.exit(0);
                }
                j++;
            }
        }
        System.out.println("IMPOSSIBLE");
    }
}

Compiler output:
Main.java:9: error: incompatible types: possible lossy conversion from long to int
        long[] a = new long[n];
                            ^
1 error
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <math.h>
using namespace std;
typedef long long int ll;

long long GCD(long long a, long long b) { return b ? GCD(b, a%b) : a; }

int main(){
	int n,k; cin >> n >> k;
	vector<int> a(n);
	int M=0;
	for(int i=0;i<n;i++){
		cin >> a[i];
		M=max(a[i],M);
	}
	int m=a[0];
	for(int i=1;i<n;i++){
		m=GCD(m,a[i]);
	}
	if(int i=M;i>=0;i-=m){
		if(i==k){
			cout << "POSSIBLE" << endl;
			return 0;
		}
	}
	cout << "IMPOSSIBLE" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:24: error: expected ')' before ';' token
   22 |         if(int i=M;i>=0;i-=m){
      |           ~            ^
      |                        )
a.cc:22:25: error: 'i' was not declared in this scope
   22 |         if(int i=M;i>=0;i-=m){
      |                         ^
Language: C++

#include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <cmath>
#include <vector>
#define rep(i, n) for(int i = 0; i < n; i++)
using namespace std;
typedef long long ll;

int gcd(int x, int y) {
    if(y == 0) {
        return x;
    }

    return gcd(y, x%y);
}

int gcd(int n, int a[]) {
    int a[n];
    int x = a[0];

    for(int i = 1; i < n; i++) {
        x = gcd(x, a[i]);
    }

    return x;
}

int main() {
    int n, k;
    int a[n];
    rep(i, n) {
        cin >> a[i]; 
    }
    sort(a, a+n);

    if(a[n-1] < k) {
        cout << "IMPOSSIBLE" << endl;
        return 0;
    }
    else {
        int g = gcd(n, a);
        if(k%g == 0) {
            cout << "POSSIBLE" << endl;
            return 0;
        }
        else {
            cout << "IMPOSSIBLE" << endl;
            return 0;
        }
    }
}

Compiler output:
a.cc: In function 'int gcd(int, int*)':
a.cc:20:9: error: declaration of 'int a [n]' shadows a parameter
   20 |     int a[n];
      |         ^
a.cc:19:20: note: 'int* a' previously declared here
   19 | int gcd(int n, int a[]) {
      |                ~~~~^~~
Language: C++

#include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <cmath>
#include <vector>
#define rep(i, n) for(int i = 0; i < n; i++)
using namespace std;
typedef long long ll;

int gcd(int x, int y) {
    if(y == 0) {
        return x;
    }

    return gcd(y, x%y);
}

int gcd(int n, int a[n]) {
    int x = a[0];

    for(int i = 1; i < n; i++) {
        x = gcd(x, a[i]);
    }

    return x;
}

int main() {
    int n, k;
    int a[n];
    rep(i, n) {
        cin >> a[i]; 
    }
    sort(a, a+n);

    if(a[n-1] < k) {
        cout << "IMPOSSIBLE" << endl;
        return 0;
    }
    else {
        int g = gcd(n, a);
        if(k%g == 0) {
            cout << "POSSIBLE" << endl;
            return 0;
        }
        else {
            cout << "IMPOSSIBLE" << endl;
            return 0;
        }
    }
}

Compiler output:
a.cc:19:23: error: use of parameter outside function body before ']' token
   19 | int gcd(int n, int a[n]) {
      |                       ^
a.cc: In function 'int gcd(...)':
a.cc:20:13: error: 'a' was not declared in this scope
   20 |     int x = a[0];
      |             ^
a.cc:22:24: error: 'n' was not declared in this scope
   22 |     for(int i = 1; i < n; i++) {
      |                        ^
Language: C++

#include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <cmath>
#include <vector>
#define rep(i, n) for(int i = 0; i < n; i++)
using namespace std;
typedef long long ll;

int gcd(int x, int y) {
    if(y == 0) {
        return x;
    }

    return gcd(y, x%y);
}

int gcd(int a[]) {
    int x = a[0];

    for(int i = 1; i < a.size(); i++) {
        x = gcd(x, a[i]);
    }

    return x;
}

int main() {
    int n, k;
    int a[n];
    rep(i, n) {
        cin >> a[i]; 
    }
    sort(a, a+n);

    if(a[n-1] < k) {
        cout << "IMPOSSIBLE" << endl;
        return 0;
    }
    else {
        int g = gcd(a);
        if(k%g == 0) {
            cout << "POSSIBLE" << endl;
            return 0;
        }
        else {
            cout << "IMPOSSIBLE" << endl;
            return 0;
        }
    }
}

Compiler output:
a.cc: In function 'int gcd(int*)':
a.cc:22:26: error: request for member 'size' in 'a', which is of non-class type 'int*'
   22 |     for(int i = 1; i < a.size(); i++) {
      |                          ^~~~
Language: C++

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

unsigned euclidean_gcd(unsigned a, unsigned b) {
  if(a < b) return euclidean_gcd(b, a);
  unsigned r;
  while ((r=a%b)) {
    a = b;
    b = r;
  }
  return b;
}

int main() {
  int N,K;
  cin >> N >> K;
  int a[N];
  cin >> a[0];
  int ma;
  ma=0;
  for(int i=1;i<N;i++){
    cin >> a[i];
    a[i]=euclidean_gcd(a[i-1],a[i]);
    if(a[i]>ma)ma=a[i];
  }
  if((K%a[N-1]==0 && ma>=K) cout << "POSSIBLE";
  else cout << "IMPOSSIBLE";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:28: error: expected ';' before 'cout'
   26 |   if((K%a[N-1]==0 && ma>=K) cout << "POSSIBLE";
      |                            ^~~~~
      |                            ;
a.cc:27:3: error: expected primary-expression before 'else'
   27 |   else cout << "IMPOSSIBLE";
      |   ^~~~
a.cc:26:48: error: expected ')' before 'else'
   26 |   if((K%a[N-1]==0 && ma>=K) cout << "POSSIBLE";
      |     ~                                          ^
      |                                                )
   27 |   else cout << "IMPOSSIBLE";
      |   ~~~~
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(ll i = 0; i < (ll)n; i++)
#define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF 1000000000000000
using namespace std;
typedef long long ll;
typedef double db;
typedef string str;
typedef pair<ll, ll> p;
constexpr int MOD = 1000000007;
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;
}

void print(const std::vector<int> &v) {
    std::for_each(v.begin(), v.end(), [](int x) { std::cout << x << " "; });
    std::cout << std::endl;
}
long long gcd(long long a, long long b) {
    if(a < b) {
        swap(b, a);
    }
    if(b == 0) {
        return a;
    }
    if(a == 0) {
        return b;
    }
    a = a % b;
    return gcd(b, a);
}
int main() {
    long long N, K;
    cin >> N >> K;
    vector<long long> A(N);
    REP(i, N) { cin >> A[i]; }
    long long gc = gcd(A[0], A[1]);
    REP(i, N) { gc = gcd(gc, A[i]); }
    // KがAiの最大値以下でありかつgcdで割り切れるか
    long long m = max_element(begin(A), end(A)); // c++11
    if(K <= m and K % gc == 0) {
        cout << "POSSIBLE" << endl;
    } else {
        cout << "IMPOSSIBLE" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:52:30: error: cannot convert '__gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >' to 'long long int' in initialization
   52 |     long long m = max_element(begin(A), end(A)); // c++11
      |                   ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
      |                              |
      |                              __gnu_cxx::__normal_iterator<long long int*, std::vector<long long int> >
Language: C++

// author: Saman Mahdanian
#include<bits/stdc++.h>

const int N = 1e5 + 10;
using namespace std;

struct person {
	int a, b, c;
	void read() {
		cin >> a >> b >> c;
	}
};

long long n, X, Y, Z, a[N], b[N], c[N], lsum[3], rsum[3];
set <pair <long long, int> > leftHand[3], rightHand[3];
person p[N];

int main() {
	cin >> X >> Y >> Z;
	n = X + Y + Z;
	for (int i = 0; i < n; i++) 
		p[i].read();

	sort (p, p + n, [] (person i, person j) {
		return i.b - i.c > j.b - j.c;
	});
	for (int i = 0; i < n; i++)
		a[i] = p[i].a, b[i] = p[i].b, c[i] = p[i].c;

	long long curVal = 0;

	for (int i = 0; i < Y; i++) {
		leftHand[0].insert({b[i] - a[i], i});
		curVal += b[i];
	}

	for (int i = Y; i < n; i++) {
		rightHand[0].insert({c[i] - a[i], i});
		curVal += c[i];
	}
	for (int i = 0; i < X; i++) {
		auto h = *rightHand[0].begin();
		rightHand[0].erase(h);
		rightHand[1].insert(h);
		curVal += a[h.second] - c[h.second];
	}

	long long ans = curVal;

	for (int e = Y; e < Y + X; e++) {
		bool flag = false;
		for (auto i: {0, 1})
			if (rightHand[i].find({c[e] - a[e], e}) != rightHand[i].end()) {
				rightHand[i].erase({c[e] - a[e], e});
				curVal -= (i == 0)? c[e] : a[e];
				flag = true;
			}
		assert(flag);

		leftHand[1].insert({b[e] - a[e], e});
		curVal += a[e];

		if (*leftHand[1].rbegin() > *leftHand[0].begin()) {
			auto v = *leftHand[1].rbegin();
			auto u = *leftHand[0].begin();
			lsum[1] += a[u.second] - a[v.second];
			lsum[0] += b[v.second] - b[u.second];
			leftHand[1].insert(u);
			leftHand[0].insert(v);
		}

		ans = max(ans, curVal());
	}
	cout << ans << endl;
}

// SamMHD :: May24-2019 :: Another Soale Jazzzzab...

Compiler output:
a.cc: In function 'int main()':
a.cc:72:38: error: 'curVal' cannot be used as a function
   72 |                 ans = max(ans, curVal());
      |                                ~~~~~~^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ALL(V) (V).begin(), (V).end()
#define ALLR(V) (V).rbegin(), (V).rend()
#define DEBUGGING

template <typename T> using V = vector<T>;
template <typename T> using VV = V<V<T>>;
template <typename T, typename U> using P = pair<T, U>;
using ll = int64_t;
using PLL = P<ll, ll>;

template <typename T> const T& var_min(const T &t) { return t; }
template <typename T> const T& var_max(const T &t) { return t; }
template <typename Head, typename... Tail> const Head& var_min(const Head &head, const Tail&... tail) { return min(head, var_min(tail...)); }
template <typename Head, typename... Tail> const Head& var_max(const Head &head, const Tail&... tail) { return max(head, var_max(tail...)); }
template <typename T, typename... Tail> void chmin(T &t, const Tail&... tail) { t = var_min(t, tail...); }
template <typename T, typename... Tail> void chmax(T &t, const Tail&... tail) { t = var_max(t, tail...); }

namespace __init {

struct InitIO {
    InitIO() {
        cin.tie(0);
        ios_base::sync_with_stdio(false);
        cout << fixed << setprecision(30);
    }
} init_io;

}

#ifdef DEBUGGING
#include "../debug.cpp"
#else
#define DEBUG(...) 0
#endif

template <typename T>
T make_v(T init) { return init; }

template <typename T, typename... Tail>
auto make_v(T init, size_t s, Tail... tail) {
#define rec make_v(init, tail...)
    return V<decltype(rec)>(s, rec);
#undef rec
}

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

bool solve() {
    ll N, K;
    cin >> N >> K;
    V<ll> A(N);
    for(ll &e : A) cin >> e;
    sort(ALL(A));
    auto ite = unique(ALL(A));
    A.erase(ite, A.end());
    if(A.size() == 1) return A[0] == K;
    ll G = A[0];
    for(ll e : A) G = gcd(G, e);
    return *max_element(ALL(A)) >= K && K % G == 0;
}

int main() {
    cout << (solve() ? "POSSIBLE" : "IMPOSSIBLE") << endl;
    return 0;
}


Compiler output:
a.cc:34:10: fatal error: ../debug.cpp: No such file or directory
   34 | #include "../debug.cpp"
      |          ^~~~~~~~~~~~~~
compilation terminated.
Language: C++

def gcd(a, b):
    if b == 0: return a
    return gcd(b, a % b)


N, K = map(int, input().split())
a = list(map(int, input().split()))

g = a[0]
for aa in a:
    g = gcd(g, aa)

d = (max(a) - K)
if d >= 0:
    if d % g == 0:
        print('POSSIBLE')
    else:
        print('IMPOSSIBLE')
else:
    print('IMPOSSIBLE')


Compiler output:
a.cc:16:15: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   16 |         print('POSSIBLE')
      |               ^~~~~~~~~~
a.cc:18:15: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
   18 |         print('IMPOSSIBLE')
      |               ^~~~~~~~~~~~
a.cc:20:11: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
   20 |     print('IMPOSSIBLE')
      |           ^~~~~~~~~~~~
a.cc:1:1: error: 'def' does not name a type
    1 | def gcd(a, b):
      | ^~~
Language: C++

#include<bits/stdc++.h>

using namespace std;
typedef long long ll;
int N;
int main(){
  ll k;
  cin >> N >> k;
  vector<ll> a(N);
  ll max=0;
  ll min=1000000000;
  for(int i=0;i!=N;i++){
    cin >> a[i];
    if(max<a[i]){
      max=a[i];
    }
    if(min>a[i]){
      min=a[i];
    }
  }
  if(a[i]<k){
    cout << "IMPOSSIBLE" << endl;
    return 0;
  }
  sort(a.first(),a.end());
  ll tmp=1000000000;
  for(int i=0;i!=N-1;i++){
    int tmp2=a[i+1]-a[i];
    if(tmp2<tmp){
      tmp=tmp2;
    }
  }
  if((max-min-k)<tmp){
    cout << "IMPOSSIBLE" << endl;
  }
  else{
    cout << "POSSIBLE" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:8: error: 'i' was not declared in this scope
   21 |   if(a[i]<k){
      |        ^
a.cc:25:10: error: 'class std::vector<long long int>' has no member named 'first'
   25 |   sort(a.first(),a.end());
      |          ^~~~~
Language: C++

int gcd(int a, int b){
    if(!b) return a;
    return gcd(b, a%b);
}
int main (){
    int N, K; cin >> N >> K;
    vector<int> world(N);
    int mx = 0;
    for(int &a:world){
        cin >> a;
        mx = max(mx, a);
    }
    if(mx < K){
        cout << "IMPOSSIBLE" << endl;
        return 0;
    }
    int hello = world[0];
    for(int i=1; i<N; i++){
        hello = gcd(hello, world[i]);
    }
    for(int i=0; i<N; i++){
        if(abs(world[i]-K)%hello==0){
            cout << "POSSIBLE" << endl;
            return 0;
        }
    }
    cout << "IMPOSSIBLE" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: 'cin' was not declared in this scope
    6 |     int N, K; cin >> N >> K;
      |               ^~~
a.cc:7:5: error: 'vector' was not declared in this scope
    7 |     vector<int> world(N);
      |     ^~~~~~
a.cc:7:12: error: expected primary-expression before 'int'
    7 |     vector<int> world(N);
      |            ^~~
a.cc:9:16: error: 'world' was not declared in this scope
    9 |     for(int &a:world){
      |                ^~~~~
a.cc:11:14: error: 'max' was not declared in this scope; did you mean 'mx'?
   11 |         mx = max(mx, a);
      |              ^~~
      |              mx
a.cc:14:9: error: 'cout' was not declared in this scope
   14 |         cout << "IMPOSSIBLE" << endl;
      |         ^~~~
a.cc:14:33: error: 'endl' was not declared in this scope
   14 |         cout << "IMPOSSIBLE" << endl;
      |                                 ^~~~
a.cc:17:17: error: 'world' was not declared in this scope
   17 |     int hello = world[0];
      |                 ^~~~~
a.cc:22:12: error: 'abs' was not declared in this scope
   22 |         if(abs(world[i]-K)%hello==0){
      |            ^~~
a.cc:23:13: 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:27:5: error: 'cout' was not declared in this scope
   27 |     cout << "IMPOSSIBLE" << endl;
      |     ^~~~
a.cc:27:29: error: 'endl' was not declared in this scope
   27 |     cout << "IMPOSSIBLE" << endl;
      |                             ^~~~