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

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

int main(){
  int n;
  scanf("%d", &n);
  int arr[n+1];
  for(int i = 0; i < n; i++){
    scanf("%d", &arr[i]);
  }
  sort(arr, arr+n);
  arr[n] = 0;
  int top = arr[0] * 2;
  if(arr[1] == arr[0]) --top;
  if(arr[2] == arr[0]){
    printf("Impossible");
    return 0;
  }
  bool noo = false;
  int prev = arr[0];
  for(int i = 1; i < n; i++){
    if(arr[i] != prev){
      if(noo){
        printf("Impossible");
        return 0;
      }else{
        noo = true;
        prev = arr[i];
      }
    }else{
      noo = false;
    }
  }
  printf("Possible");
}

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

#include<bits/stdc++.h>
using namespace std;
const int N=105;
int n,a[N],vi[N];
int main(){
	scanf("%d",&n);
	for(int i=1;i<=n;i++){
		scanf("%d",&a[i]);
		++vi[a[i]];
	}
	sort(a+1,a+n+1);

	int k=a[n],res=INT_MAX;
	for(int i=0;i<=k;i++){
		int d=max(k-i,i);
		res=min(res,d);
		if(!vi[d]){
			puts("Impossible");
			return 0;
		}
		else	--vi[d];
	}
	if(k&1)	--res;
	for(int i=1;i<=res;i++)
		if(vi[i]){
			puts("Impossible");
			return 0;
		}
	puts("Possible");
	return 0;
}
#include<bits/stdc++.h>
using namespace std;
const int N=105;
int n,a[N],vi[N];
int main(){
	scanf("%d",&n);
	for(int i=1;i<=n;i++){
		scanf("%d",&a[i]);
		++vi[a[i]];
	}
	sort(a+1,a+n+1);

	int k=a[n],res=INT_MAX;
	for(int i=0;i<=k;i++){
		int d=max(k-i,i);
		res=min(res,d);
		if(!vi[d]){
			puts("Impossible");
			return 0;
		}
		else	--vi[d];
	}
	if(k&1)	--res;
	for(int i=1;i<=res;i++)
		if(vi[i]){
			puts("Impossible");
			return 0;
		}
	puts("Possible");
	return 0;
}


Compiler output:
a.cc:34:11: error: redefinition of 'const int N'
   34 | const int N=105;
      |           ^
a.cc:3:11: note: 'const int N' previously defined here
    3 | const int N=105;
      |           ^
a.cc:35:5: error: redefinition of 'int n'
   35 | int n,a[N],vi[N];
      |     ^
a.cc:4:5: note: 'int n' previously declared here
    4 | int n,a[N],vi[N];
      |     ^
a.cc:35:7: error: redefinition of 'int a [105]'
   35 | int n,a[N],vi[N];
      |       ^
a.cc:4:7: note: 'int a [105]' previously declared here
    4 | int n,a[N],vi[N];
      |       ^
a.cc:35:12: error: redefinition of 'int vi [105]'
   35 | int n,a[N],vi[N];
      |            ^~
a.cc:4:12: note: 'int vi [105]' previously declared here
    4 | int n,a[N],vi[N];
      |            ^~
a.cc:36:5: error: redefinition of 'int main()'
   36 | int main(){
      |     ^~~~
a.cc:5:5: note: 'int main()' previously defined here
    5 | int main(){
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
#include <boost/range/algorithm.hpp>
#include <boost/range/numeric.hpp>
#include <boost/range/irange.hpp>
#include <boost/range/adaptor/indexed.hpp>

using namespace std;
using namespace boost::adaptors;
using namespace std::string_literals;
using ll = int64_t;
using vecint = vector<int>;
using vecll = vector<ll>;
using boost::irange;

int main()
{
  int n;
  cin>>n;
  vecint cnt(n, 0);
  int mn = n;
  int mx = 0;
  for(int i:irange(0,n)) {
    int a;
    cin>>a;
    ++cnt[a];
    mn = min(mn, a);
    mx = max(mx, a);
  }
  bool ok = true;
  if (mn < mx / 2) {
    ok = false;
  }
  if (cnt[mx/2] > 1) {
    ok = false;
  }
  if ((mx%2) == 1 && cnt[mx/2+1] != 2) {
    ok = false;
  }
  for(int i:irange(min(mx+1,mx/2+2), mx+1)) {
    if (cnt[i] < 2) {
      ok = false;
    }
  }
  if (!ok!) {
    cout<<"Impossible"<<endl;
  } else {
    cout<<"Possible"<<endl;
  }
  return 0;
}


Compiler output:
a.cc:2:10: fatal error: boost/range/algorithm.hpp: No such file or directory
    2 | #include <boost/range/algorithm.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <vector>
#include <string>
#include <queue>
#include <deque>
#include <list>
#include <set>
#include <map>
#include <bitset>

using namespace std;

int main() {
	int N; cin >> N;
	vector<int> v;
	for (int i = 0; i < N; i++) {
		int a; cin >> a; v.push_back(a);
	}
	sort(v.begin(), v.end(), greater<int>());

	int length = v[0];

	int* count = new int[length + 1];
	for (int i = 0; i <= length; i++) {
		count[i] = 0;
	}
	for (auto itr = v.begin(); itr != v.end(); itr++) {
		count[*itr]++;
	}

	if (length % 2 == 0) {
		for (int i = length; i > length / 2; i--) {
			if (count[i] < 2) { cout << "Impossible" << endl; return 0; }
		}
		if (count[length / 2] != 1) { cout << "Impossible" << endl; return 0; }
	}
	else {
		for (int i = length; i * 2 > length + 2; i--) {
			if (count[i] < 2) { cout << "Impossible" << endl; return 0; }
		}
		if (count[(length + 1) / 2] != 2) { cout << "Impossible" << endl; return 0; }
	}

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

Compiler output:
a.cc: In function 'int main()':
a.cc:23:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   23 |         sort(v.begin(), v.end(), greater<int>());
      |         ^~~~
      |         sqrt
Language: C++

#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <vector>
#include <string>
#include <queue>
#include <deque>
#include <list>
#include <set>
#include <map>
#include <bitset>

using namespace std;

int main(){
  int N; cin >> N;
  vector<int> v;
  for(int i=0;i<N;i++){
    int a; cin >> a; v.push_back(a);
  }
  sort(v.begin(), v.end(), std::greater<int>() );
  
  int length = v[0];
  
  int *count = new int[length+1];
  for(int i=0;i<=length;i++){
    count[i] = 0;
  }
  for(auto itr = v.begin(); itr != v.end(); itr++){
    count[*itr]++;
  }
  
  if(length %2 == 0){
    for(int i=length;i > length/2;i--){
      if(count[i] < 2){ cout << "Impossible" << endl; return 0; }
    }
    if(count[length/2] != 1){ cout << "Impossible" << endl; return 0; }
  }
  else{
    for(int i=length;i*2 > length + 2;i--){
      if(count[i] < 2){ cout << "Impossible" << endl; return 0; }
    }
    if(count[(length+1)/2] != 2){ cout << "Impossible" << endl; return 0; }
  }
  
  cout << "Possible" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:3: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   23 |   sort(v.begin(), v.end(), std::greater<int>() );
      |   ^~~~
      |   sqrt
Language: C++

#include "bits/stdc++.h"
using namespace std;
using ll     = long long;
using pii    = pair<int, int>;
using pll    = pair<ll, ll>;
using vi     = vector<int>;
using vl     = vector<ll>;
using vvi    = vector<vi>;
using vvl    = vector<vl>;
const ll INF = 1LL << 60;
const ll MOD = 1000000007;
template <class T>
bool chmax(T &a, const T &b) {
    return (a < b) ? (a = b, 1) : 0;
}
template <class T>
bool chmin(T &a, const T &b) {
    return (b < a) ? (a = b, 1) : 0;
}
template <class C>
void print(const C &c, std::ostream &os = std::cout) {
    std::copy(std::begin(c), std::end(c), std::ostream_iterator<typename C::value_type>(os, " "));
    os << std::endl;
}

int main() {
    int n;
    cin >> n;
    vi a(n);
    map<int, int> cnt;
    int maxi = 0;
    for (int i = 0; i < n; ++i) {
        cin >> a[i];
        chmax(maxi, a[i]);
        cnt[a[i]]++;
    }
    int nmin = (maxi % 2 == 0 ? maxi / 2 : maxi / 2 + 1);
    for (int i = maxi; i >= nmin; --i) {
        if (i == nmin && maxi % 2 == 0) {
            if (cnt[i] < 1) {
                cout << "Impossible"
                     << "\n";
                return 0;
            } else {
                cnt[i] -= 1;
            }
        } else {
            if (cnt[i] < 2) {
                cout << "Impossible"
                     << "\n";
                return 0;
            } else {
                cnt[i] -= 2;
            }
        }
    }
    while (true) {
        int cmax = -1;
        for (auto it = cnt.rbegin(); it != cnt.rend(); it = next(it)) {
            if (it->second != 0) {
                cmax = it->first;
                break;
            }
        }
        if (cmax == -1)
            break;
        if (cmax <= nmin || cmax > maxi) {
            cout << "Impossible"
                 << "\n";
            return 0;
        }
        for (int i = cmax; i > nmin; --i) {
            if (cnt[i] < 1) {
                continue
            } else {
                cnt[i]--;
            }
        }
    }
    cout << "Possible"
         << "\n";
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:74:25: error: expected ';' before '}' token
   74 |                 continue
      |                         ^
      |                         ;
   75 |             } else {
      |             ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
const int MOD=1e9+7;
//const int MOD=998244353;
const int INF=1e9;
const long long LINF=1e18;
#define int long long
//template
template <typename T>
void fin(T a){
  cout<<a<<endl;
  exit(0);
}
//main
signed main(){
  int N;cin>>N;
  std::vector<int> v(N);
  for(int i=0;i<N;i++)cin>>v[i];
  sort(v.begin(),v.end());
  map<int,int> m;
  for(int i=0;i<N;i++)m[v[i]]++;
  5 4 3 3 4 5
  if(v[N-1]&1){
    for(int i=v[N-1];i>v[N-1]/2;i--)if(m[i]<2)fin("Impossible");
    if(m[v[N-1]/2+1]>2)fin("Impossible");
    for(int i=v[N-1]/2;i>=0;i--)if(m[i])fin("Impossible");
    fin("Possible");
  }
  for(int i=v[N-1];i>v[N-1]/2;i--)if(m[i]<2)fin("Impossible");
  if(m[v[N-1]/2]!=1)fin("Impossible");
  for(int i=m[v[N-1]/2-1];i>=0;i--)if(m[i])fin("Impossible");
  fin("Possible");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:4: error: expected ';' before numeric constant
   22 |   5 4 3 3 4 5
      |    ^~
      |    ;
Language: C++

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

#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

#define start_routine() int begtime = clock();
#define end_routine() int endtime = clock(); cerr << endl << "Time elapsed: " << (endtime - begtime)*1000/CLOCKS_PER_SEC << " ms"; return 0
#define speed() cin.tie(0), cout.tie(0), ios_base::sync_with_stdio(false)
// #define exit(a, b) return cout << a, b;

#define PB push_back
#define MP make_pair

#define sd(n) scanf("%lld", &n)
#define pdn(n) printf("%lld\n", n);
#define pds(n) printf("%lld ", n);
#define endl '\n'

#define forn(a, b, i) for (int i = a; i < b; i += 1)
#define all(v) v.begin(), v.end() 

#define print(stuff) cout << stuff << endl
#define len(stuff) (int) stuff.size()

#define int long long
// #define float long double 
#define ll long long
#define ld long double

typedef long long LL;

using vi = vector<int>;
using vb = vector<bool>;
using pii = pair<int, int>;
using mii = map<int, int>;

const int inf = (int) 1e16;
const int upper = (int) 3e5 + 50;
// const int M = (ll) 1e9 + 7;
const int mod = (ll) 998244353;
const int M = mod;

const double eps =  1e-8;
	
int n, k;

int modexp (int a, int b) {
	if (b == 0) return 1;
	int ans = modexp(a, b/2);
	ans = (ans * ans) % mod;
	if (b & 1) ans = (ans * a) % mod;
	return ans;
}

int inv (int a) {
	return modexp(a, mod - 2);
}

int fac[2000005], invfac[2000005];
void compute() {
	fac[0] = 1;
	for (int i = 1; i <= 2000000; i += 1) {
		fac[i] = (fac[i - 1] * i) % mod;
	}
	invfac[2000000] = inv(fac[2000000]);
	for (int i = 2000000 - 1; i >= 0; i--) {
		invfac[i] = (invfac[i + 1] * (i + 1)) % mod;
	}
}

inline int c (int a, int b) {
	if (b > a) return 0;
	int ans = fac[a];
	ans *= invfac[a - b], ans %= mod;
	ans *= invfac[b], ans %= mod;
	return ans;
}

int n;
signed main () {
	start_routine();
	speed();
	#ifndef ONLINE_JUDGE
	// freopen("input.txt", "r", stdin);	 
	// freopen("output.txt", "w", stdout);
	// freopen("errlog.txt", "w", stderr);
	#endif		

	cin >> n;
	int cnt[n + 1] = {0};
	int mx = -1;
	for (int i = 1; i <= n; i += 1) {
		int lol; cin >> lol;
		cnt[lol]++;
		mx = max(mx, lol);
	}
	if (cnt[mx] < 2) {
		cout << "Impossible";
		return 0;
	}
	cout << "Possible";
 	end_routine();		
}


Compiler output:
a.cc:81:5: error: redefinition of 'long long int n'
   81 | int n;
      |     ^
a.cc:47:5: note: 'long long int n' previously declared here
   47 | int n, k;
      |     ^
Language: C++

#include "bits/stdc++.h"
#include <MT.h>
typedef long long ll;
#define int ll
#define fi first
#define se second
#define SORT(a) sort(a.begin(),a.end())
#define rep(i,n) for(int i = 0;i < (n) ; i++) 
#define REP(i,n) for(int i = 0;i < (n) ; i++) 
#define MP(a,b) make_pair(a,b)
#define pb(a) push_back(a)
#define INF LLONG_MAX/2
#define all(x) (x).begin(),(x).end()
#define debug(x) cerr<<#x<<": "<<x<<endl
#define debug_vec(v) cerr<<#v<<":";rep(i,v.size())cerr<<" "<<v[i];cerr<<endl
using namespace std;
int MOD = 1000000007;
int n;
int a[101];

signed main(){
    cin >> n;
    int mini = 110;
    int maxi = -1;
    rep(i,n){
        int val;
        cin >> val;
        a[val]++;
        mini = min(mini,val);
        maxi = max(maxi,val);
    }

    if(a[mini] == 1){
        if(maxi != mini*2){
            cout << "Impossible" << endl;
            return 0;
        }
        if(a[mini+1] == 1){
            cout << "Impossible" << endl;
            return 0;
        }
        for(int i = mini+1;i <= maxi;i++){
            if(a[i] < a[i-1]){
                cout << "Impossible" << endl;
                return 0;
            }
        }
        cout << "Possible" << endl;
    }else if(a[mini] == 2){
        if(maxi != mini*2-1){
            cout << "Impossible" << endl;
            return 0;
        }
        for(int i = mini+1;i <= maxi;i++){
            if(a[i] < a[i-1]){
                cout << "Impossible" << endl;
                return 0;
            }
        }
        cout << "Possible" << endl;
    }else{
        cout << "Impossible" << endl;
    }



    

    return 0; 
}

// g++ -std=c++14 code1.cpp
// rm -r -f test;oj dl https://yahoo-procon2019-qual.contest.atcoder.jp/tasks/yahoo_procon2019_qual_d
// rm -r -f test;oj dl http://agc005.contest.atcoder.jp/tasks/agc005_c

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

///*BY ME*///
#include <bits/stdc++.h>
using namespace std;
#define y1 sijf
#define RampageRead ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);mt19937 rng(std::chrono::system_clock::now().time_since_epoch().count())
#define all(v) (v).begin(),(v).end()
#define pb push_back
#define F first
#define S second
#define endl '\n'
#define flsh cout<<flush
typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;
typedef double dd;
const ll MOD=1e9+7;
set<int>ans;
int n,a[101],sum,mn,mx,minn=1000000,maxx;
int main()
{
    RampageRead;
    cin>>n;
    if(n>2) mn=1+(n-1)*2;
    else mn=2;
    for(int i=n-1;i>=n/2;i--) mx+=i*2;
    if(n&1) mx-=(n/2);
    //cout<<mn<<" "<<mx<<endl;
    for(int i=0;i<n;i++)5
    {
        cin>>a[i];
        sum+=a[i];
        ans.insert(a[i]);
        minn=min(minn,a[i]);
        maxx=max(maxx,a[i]);
    }
    sort(a,a+n);
    for(int i=2;i<n;i++)
    if(a[i-1]+1<a[i] or mx<sum or mn>sum or ans.size()>n/2+1 or (a[0]==1 and ans.size()>2))
        {
            cout<<"Impossible";
            return 0;
        }
    cout<<"Possible";
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:26: error: expected ';' before '{' token
   28 |     for(int i=0;i<n;i++)5
      |                          ^
      |                          ;
   29 |     {
      |     ~
Language: C++

///*BY ME*///
#include <bits/stdc++.h>

#define y1 sijf
//#define RampageRead ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);mt19937 rng(std::chrono::system_clock::now().time_since_epoch().count())
#define all(v) (v).begin(),(v).end()
#define pb push_back
#define F first
#define S second
#define endl '\n'
#define flsh cout<<flush
typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;
typedef double dd;
const ll MOD=1e9+7;

int n,a[101],sum,mn,mx;
int main()
{
    //RampageRead;
    cin>>n;
    if(n>2) mn=1+(n-1)*2;
    else mn=2;
    for(int i=n-1;i>=n/2;i--) mx+=i*2;
    if(n&1) mx-=(n/2);
    //cout<<mn<<" "<<mx<<endl;
    for(int i=0;i<n;i++)
    {
        cin>>a[i];
        sum+=a[i];
    }
    sort(a,a+n);
    for(int i=2;i<n;i++)
    if(a[i-1]+1<a[i] or mx<sum or mn>sum)
        {
            cout<<"Impossible";
            return 0;
        }
    cout<<"Possible";
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   22 |     cin>>n;
      |     ^~~
      |     std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:2:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:33:5: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
   33 |     sort(a,a+n);
      |     ^~~~
      |     std::sort
In file included from /usr/include/c++/14/algorithm:86,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
a.cc:37:13: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   37 |             cout<<"Impossible";
      |             ^~~~
      |             std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:40:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   40 |     cout<<"Possible";
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

var
	n,mi,ma,i,a:Longint;
	cnt:array[1..99]of Longint;
	f:Boolean;
begin
	read(n);
	mi:=n;
	for i:=1 to n do begin
		read(a);
		if mi>a then mi:=a;
		if ma<a then ma:=a;
		inc(cnt[a]);
	end;
	f:=true;
	if cnt[mi]-ma mod 2<>1 then f:=false;
	for i:=mi+1 to ma do begin
		if cnt[i]<2 then f:=false;
	end;
	if f and(mi*2>=ma)then writeln('Possible')else writeln('Impossible');
end.

Compiler output:
a.cc:3:19: error: too many decimal points in number
    3 |         cnt:array[1..99]of Longint;
      |                   ^~~~~
a.cc:19:40: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   19 |         if f and(mi*2>=ma)then writeln('Possible')else writeln('Impossible');
      |                                        ^~~~~~~~~~
a.cc:19:64: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
   19 |         if f and(mi*2>=ma)then writeln('Possible')else writeln('Impossible');
      |                                                                ^~~~~~~~~~~~
a.cc:1:1: error: 'var' does not name a type
    1 | var
      | ^~~
a.cc:3:12: error: found ':' in nested-name-specifier, expected '::'
    3 |         cnt:array[1..99]of Longint;
      |            ^
      |            ::
a.cc:3:9: error: 'cnt' does not name a type; did you mean 'int'?
    3 |         cnt:array[1..99]of Longint;
      |         ^~~
      |         int
a.cc:4:10: error: found ':' in nested-name-specifier, expected '::'
    4 |         f:Boolean;
      |          ^
      |          ::
a.cc:4:9: error: 'f' does not name a type
    4 |         f:Boolean;
      |         ^
a.cc:5:1: error: 'begin' does not name a type
    5 | begin
      | ^~~~~
a.cc:7:9: error: 'mi' does not name a type
    7 |         mi:=n;
      |         ^~
a.cc:8:9: error: expected unqualified-id before 'for'
    8 |         for i:=1 to n do begin
      |         ^~~
a.cc:10:17: error: expected unqualified-id before 'if'
   10 |                 if mi>a then mi:=a;
      |                 ^~
a.cc:11:17: error: expected unqualified-id before 'if'
   11 |                 if ma<a then ma:=a;
      |                 ^~
a.cc:12:20: error: expected constructor, destructor, or type conversion before '(' token
   12 |                 inc(cnt[a]);
      |                    ^
a.cc:13:9: error: 'end' does not name a type
   13 |         end;
      |         ^~~
a.cc:14:9: error: 'f' does not name a type
   14 |         f:=true;
      |         ^
a.cc:15:9: error: expected unqualified-id before 'if'
   15 |         if cnt[mi]-ma mod 2<>1 then f:=false;
      |         ^~
a.cc:16:9: error: expected unqualified-id before 'for'
   16 |         for i:=mi+1 to ma do begin
      |         ^~~
a.cc:18:9: error: 'end' does not name a type
   18 |         end;
      |         ^~~
a.cc:19:9: error: expected unqualified-id before 'if'
   19 |         if f and(mi*2>=ma)then writeln('Possible')else writeln('Impossible');
      |         ^~
a.cc:20:1: error: 'end' does not name a type
   20 | end.
      | ^~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

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

int main(void){
    int N; cin >> N;
    int a[N+10];
    rep(i,N)cin >> a[i];
    sort(a,a + N);
    int separate = (N - 1) - a[N - 1];
    int depth = N - separate;
    map<int,int> mp;
    rep(i,N)mp[a[i]]++;
    if(depth % 2 == 1){
        if(mp[depth / 2] != 1){
            cout << "Impossible" << "\n";
            return 0;
        }
        mp[depth / 2] = 0;
    }
    int cou = 0;
    rep(i,N){
        if(mp[a[i]] == 1){
            cout << "Impossible" << "\n";
            return 0;
        }
        cou += max(mp[a[i]] - 2, 0);
        mp[a[i]] = 0;
    }
    for(i,N - 1){
        if(abs(a[i] - a[i + 1]) > 1){
            cout << "Impossible" << "\n";
            return 0;
        }
    }
    if(cou == separate)cout << "Possible" << "\n";
    else cout << "Impossible" << "\n";
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:9: error: 'i' was not declared in this scope
   32 |     for(i,N - 1){
      |         ^
a.cc:38:5: error: expected primary-expression before 'if'
   38 |     if(cou == separate)cout << "Possible" << "\n";
      |     ^~
a.cc:37:6: error: expected ';' before 'if'
   37 |     }
      |      ^
      |      ;
   38 |     if(cou == separate)cout << "Possible" << "\n";
      |     ~~
a.cc:38:5: error: expected primary-expression before 'if'
   38 |     if(cou == separate)cout << "Possible" << "\n";
      |     ^~
a.cc:37:6: error: expected ')' before 'if'
   37 |     }
      |      ^
      |      )
   38 |     if(cou == separate)cout << "Possible" << "\n";
      |     ~~
a.cc:32:8: note: to match this '('
   32 |     for(i,N - 1){
      |        ^
Language: C++

#include <iostream>
#include <vector>

using namespace std;

typedef long long int ll;

#define all(x) x.begin(),x.end()

int main()
{
	int n;
	cin >> n;
	vector<int> a(n);
	for(int i = 0; i < n; i++){
		cin >> a[i];
	}
	int k = *max_element(all(a));
	vector<int> cnt(k+1);
	for(int i = 0; i < n; i++){
		cnt[a[i]]++;
	}

	bool flag = true;
	if(k%2==0){
		for(int i = 1; i <= k; i++){
			if(i<k/2 && cnt[i]>0) flag = false;
			if(i>k/2 && cnt[i]<2) flag = false;
			if(i==k/2 && cnt[i]!=1) flag = false;
		}
	}else{
		k++;
		for(int i = 1; i <k; i++){
			if(i<k/2 && cnt[i]>0) flag = false;
			if(i>k/2 && cnt[i]<2) flag = false;
			if(i==k/2 && cnt[i]!=2) flag = false;
		}
	}
	
	cout << (flag?"Possible":"Impossible") << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:18: error: 'max_element' was not declared in this scope
   18 |         int k = *max_element(all(a));
      |                  ^~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#define bp __builtin_popcountll
#define pb push_back
#define in(s) freopen(s, "r", stdin);
#define inout(s, end1, end2) freopen((string(s) + "." + end1).c_str(), "r", stdin),\
		freopen((string(s) + "." + end2).c_str(), "w", stdout);
#define fi first
#define se second
#define bw(i, r, l) for (int i = r - 1; i >= l; i--)
#define fw(i, l, r) for (int i = l; i < r; i++)
#define fa(i, x) for (auto i: x)
using namespace std;
const int mod = 1e9 + 7, inf = 1061109567;
const long long infll = 4557430888798830399;
const int N = 105;
int n, mn = inf, a[N], cnt[N], mx = -inf;
void bad() {
	cout << "Impossible";
	exit(0);
}
void good() {
	cout << "Possible";
	exit(0);
}
signed main() {
	#ifdef BLU
	in("blu.inp");
	#endif
	ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
	cin >> n;
	fw (i, 0, n) cin >> a[i], mn = min(mn, a[i]), mx = max(mx, a[i]), cnt[a[i]]++;
	fw (i, 0, n) if (a[i] > 2 * mn) bad();
	bool startbad = 0;
	if (n == 2 && cnt[1] == 2) good();
	if (cnt[1] > 1) bad();
	fw (i, mn, 2 * mn + 1) {
		if (cnt[i] == 0) startbad = 1;
		if (startbad && cnt[i] > 0) bad();
	}
	//Missing case: cnt[1 -> (mx + 1) / 2] > 2.
	if (k & 1) fw (i, mn, (mx + 1) / 2 + 1) if (cnt[i] > 2) bad();
	else fw (i, mn, (mx + 1) / 2 + 1) if (cnt[i] > 1) bad();
	good();
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:13: error: 'k' was not declared in this scope
   41 |         if (k & 1) fw (i, mn, (mx + 1) / 2 + 1) if (cnt[i] > 2) bad();
      |             ^
Language: C++

/*input
4
3 3 3 2
*/
#include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<double,double> pdd;
#define IOS ios_base::sync_with_stdio(0); cin.tie(0)
#define ALL(a) a.begin(),a.end()
#define SZ(a) ((int)a.size())
#define F first
#define S second
#define REP(i,n) for(int i=0;i<((int)n);i++)
#define pb push_back
#define MP(a,b) make_pair(a,b)
#define SORT_UNIQUE(c) (sort(c.begin(),c.end()), c.resize(distance(c.begin(),unique(c.begin(),c.end()))))
#define GET_POS(c,x) (lower_bound(c.begin(),c.end(),x)-c.begin())
#define YY cout<<"YES\n"
#define NN cout<<"NO\n"
#define yy cout<<"Yes\n"
#define nn cout<<"No\n"
#ifdef leowang
#define debug(...) do{\
	fprintf(stderr,"%s - %d : (%s) = ",__PRETTY_FUNCTION__,__LINE__,#__VA_ARGS__);\
	_DO(__VA_ARGS__);\
}while(0)
template<typename I> void _DO(I&&x){cerr<<x<<endl;}
template<typename I,typename...T> void _DO(I&&x,T&&...tail){cerr<<x<<", ";_DO(tail...);}
#else
#define debug(...)
#endif
template<typename T1,typename T2>
ostream& operator<<(ostream& out,pair<T1,T2> P){
	out<<'('<<P.F<<','<<P.S<<')';
	return out;
}

//}}}
const ll maxn=300005;
const ll maxlg=__lg(maxn)+2;
const ll INF64=8000000000000000000LL;
const int INF=0x3f3f3f3f;
const ll MOD=ll(1e9+7);
const double PI=acos(-1);
//const ll p=880301;
//const ll P=31;

ll mypow(ll a,ll b){
	ll res=1LL;
	while(b){
		if(b&1) res=res*a%MOD;
		a=a*a%MOD;
		
		b>>=1;
	}
	return res;
}
int a[maxn];
multiset<int> st;
int main()
{
	IOS;
	int n;
	cin>>n;
	REP(i,n) cin>>a[i];
	int mx=*max_element(a,a+n);
	REP(i,n) st.insert(a[i]);
	REP(i,mx+1){
		int cur=max(i,mx-i);
		if(!st.count(cur)){
			cout<<"Impossible\n";
			return 0;
		}
		st.erase(st.lower_bound(cur));
	}
	for(int i:st){
		if(i<(k+1)/2+1){
			cout<<"Impossible\n";
			return 0;
		}
	}
	cout<<"Possible\n";
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:82:23: error: 'k' was not declared in this scope
   82 |                 if(i<(k+1)/2+1){
      |                       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
const int MAXn = 100 + 10;
int n, ar[MAXn], max1 = 0 , min1 = MAXn, cnt, cnt2;
int main() {
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> ar[i];
		min1 = min(min1 , ar[i]);
		if (ar[i] == min1)
			cnt2++;
		else if (ar[i] < max1)
			cnt2 = 0;
		if (ar[i] == max1)
			cnt++;
		else if (ar[i] > max1)
			cnt = 0;
		max1 = max(max1 , ar[i]);
	}
	if (min1 < max1 / 2 + (max1 % 2) || cnt < 2 || (cnt2 > 1 && min1 == max1 / 2)
		return cout << "Impossible",0;
	cout << "Possible";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:86: error: expected ';' before 'return'
   20 |         if (min1 < max1 / 2 + (max1 % 2) || cnt < 2 || (cnt2 > 1 && min1 == max1 / 2)
      |                                                                                      ^
      |                                                                                      ;
   21 |                 return cout << "Impossible",0;
      |                 ~~~~~~                                                                
a.cc:22:27: error: expected ')' before ';' token
   22 |         cout << "Possible";
      |                           ^
      |                           )
a.cc:20:12: note: to match this '('
   20 |         if (min1 < max1 / 2 + (max1 % 2) || cnt < 2 || (cnt2 > 1 && min1 == max1 / 2)
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
struct P
{
    //string r;
    int x,y,z;

    bool operator<(const P &a)const{
       // if(y!=a.y)
       // return y>a.y;
       return x<a.x;
//        return z>a.z;
    }
};

vector<int> v[155];
//bitset<4001000> b;
int a,c,i,b,k,d,n,m,e;//dy[15]={0,1,0,-1,-1,1,-1,1},dx[15]={1,0,-1,0,1,1,-1,-1};//
int l[201010];
int o[200150];
int dx[10]={0,1,0,-1},dy[10]={1,0,-1,0},dz[10]={0,0,0,0,1,-1};

long long x[200100],y,z[200100],mod=1000000007;
P u[11];
int j[200011];

stack<int> s;
queue<P> q;

//'1'==49;
//'A'==65;
//'a'==97;
//unordered_
//map<int,int > p;
//list<int> l;
//string r[111],r2;
char r[510][555];


bool as(P a,P b)
{
   // if(a.x!=b.x)
        return a.x<b.x;
    //return a.y>b.y;
}


int main()
{
    scanf("%d",&a);
    for(int t=1;t<=a;l[o[t]]++,t++)
        scanf("%d",&o[t]);
    sort(o+1,o+a+1);
    if(o[a]!=o[a-1])
    {
        puts("Impossible");
        return 0;
    }
    j[a]=1;
    for(int t=a-1;t>0;t--)
    if(o[t]<o[a]/2+o[a]%2)
    {
        puts("Impossible");
        return 0;
    }
    else if(j[o[t]])
    {
        j[o[a]-o[t]]++;
    }
    else j[o[t]]++;
    if(o[a]%2)
    {
        if(max(j[o[a]/2],j[o[a]/2+o[a]%2)>1)
        {
            puts("Impossible");
            return 0;
        }
    }
    else
    {
        if(j[o[a]/2]>1)
        {
            puts("Impossible");
            return 0;
        }
    }
    for(int t=1;t<=o[a];t++)
        if(j[t]==0)
    {
        puts("Impossible");
        return 0;
    }
    puts("Possible");
}


Compiler output:
a.cc: In function 'int main()':
a.cc:73:41: error: expected ']' before ')' token
   73 |         if(max(j[o[a]/2],j[o[a]/2+o[a]%2)>1)
      |                                         ^
      |                                         ]
Language: C++

def check(a):
    a = sorted(a)
    d = {}
    for x in a:
        if x not in d.keys():
            d[x] = 1
        else:
            d[x] += 1
    if (a[-1]+1)>>1 != a[0]:
        return False
    if (a[-1]&1) != 1 and d[a[0]]!=1:
        return False
    if (a[-1]&1) == 1 and d[a[0]]!=2:
        return False
    for i in xrange(a[-1], a[0], -1):
        if i not in d.keys() or d[i]<2:
            return False
    return True

def main():
    n = int(raw_input().strip())
    a = [int(x) for x in raw_input().strip().split()]
    if check(a):
        print 'Possible'
    else:
        print 'Impossible'

if __name__ == '__main__':
    main()

Compiler output:
a.cc:24:15: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   24 |         print 'Possible'
      |               ^~~~~~~~~~
a.cc:26:15: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
   26 |         print 'Impossible'
      |               ^~~~~~~~~~~~
a.cc:28:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   28 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:1:1: error: 'def' does not name a type
    1 | def check(a):
      | ^~~
a.cc:4:5: error: expected unqualified-id before 'for'
    4 |     for x in a:
      |     ^~~
Language: C++

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>
typedef long long ll ;
#define rep(i, a, b) for (int i = a; i <= b; ++ i) 
const int N = 500 ;
using namespace std ;

int n, a[N] ;

int main() {
	scanf("%d", &n) ;
	int x ;
	rep(i, 1, n) scanf("%d", &x), ++ a[x] ;
	int x = 1 ;
	for ( ; !a[x] ; ++ x) ;
	if (a[x] == 1) {
		rep(i, x + 1, 2 * x) if (a[i] < 2) {
			puts("Impossible") ;
			return 0 ; 
		}
		rep(i, 2 * x + 1, n - 1) if (a[i]) {
			puts("Impossible") ;
			return 0 ;
		}
		puts("Possible") ;
	} else if (a[x] == 2) {
		rep(i, x + 1, 2 * x - 1) if (a[i] < 2) {
			puts("Impossible") ;
			return 0 ;
		}
		rep(i, 2 * x, n - 1) if (a[i]) {
			puts("Impossible") ;
			return 0 ;
		}
		puts("Possible") ;
	} else puts("Impossible") ;
	return 0 ; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:13: error: redeclaration of 'int x'
   17 |         int x = 1 ;
      |             ^
a.cc:15:13: note: 'int x' previously declared here
   15 |         int x ;
      |             ^
Language: C++

#include <iostream>
#include <vector>
using namespace std;
typedef long long lli;
lli n;
vector<lli> a;
int pos(){
    cout << "Possible" << endl;
    return 0;
}
int imp(){
    cout << "Impossible" << endl;
    return 0;
}
int main(){
    cin >> n;
    a = vector<lli> (n);
    for(lli i = 0;i < n;i++) cin >> a[i];
    sort(a.begin(),a.end());
    if(a.back()%2){
        for(lli i = a.back();i >= (a.back()+1)/2+1;i--){
            if(upper_bound(a.begin(),a.end(),i) - lower_bound(a.begin(),a.end(),i) < 2) return imp();
        }
        if(upper_bound(a.begin(),a.end(),(a.back()+1)/2) - lower_bound(a.begin(),a.end(),(a.back()+1)/2) != 2) return imp();
        if(a.front() < (a.back()+1)/2) return imp();
        else return pos();
    }else{
        for(lli i = a.back();i >= a.back()/2 + 1;i--){
            if(upper_bound(a.begin(),a.end(),i) - lower_bound(a.begin(),a.end(),i) < 2) return imp();            
        }
        if(upper_bound(a.begin(),a.end(),a.back()/2) - lower_bound(a.begin(),a.end(),a.back()/2) != 1) return imp();
        if(a.back() < (a.back()/2)) return imp();
        else return pos();
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   19 |     sort(a.begin(),a.end());
      |     ^~~~
      |     short
a.cc:22:16: error: 'upper_bound' was not declared in this scope
   22 |             if(upper_bound(a.begin(),a.end(),i) - lower_bound(a.begin(),a.end(),i) < 2) return imp();
      |                ^~~~~~~~~~~
a.cc:24:12: error: 'upper_bound' was not declared in this scope
   24 |         if(upper_bound(a.begin(),a.end(),(a.back()+1)/2) - lower_bound(a.begin(),a.end(),(a.back()+1)/2) != 2) return imp();
      |            ^~~~~~~~~~~
a.cc:29:16: error: 'upper_bound' was not declared in this scope
   29 |             if(upper_bound(a.begin(),a.end(),i) - lower_bound(a.begin(),a.end(),i) < 2) return imp();
      |                ^~~~~~~~~~~
a.cc:31:12: error: 'upper_bound' was not declared in this scope
   31 |         if(upper_bound(a.begin(),a.end(),a.back()/2) - lower_bound(a.begin(),a.end(),a.back()/2) != 1) return imp();
      |            ^~~~~~~~~~~
Language: C++

#include <cstdio>
#include <vector>
#include <algorithm>
#include <map>

using namespace std;

int main() {
    size_t N;
    scanf("%zu", &N);

    vector<int> a(N);
    map<int, int> m;
    int max_a=0;
    for (size_t i=0; i<N; ++i) {
        scanf("%d", &a[i]);
        ++m[a[i]];
        if (max_a < a[i])
            max_a = a[i];
    }

    if (N == 2)
        return !printf("%sossible\n", m[1]==2? "P":"Imp");

    for (int i=max_a; i>max_a/2; --i) {
        if (m[i] < 2)
            return !printf("Impossible\n");
    }

    if (m[max_a/2] < 1-(max_a%2))
        return !printf("Impossible\n");

    for (i=max_a/2; --i;)
        if (m[i])
            return !printf("Impossible\n");

    if (m[1] > 1)
        return !printf("Impossible\n");

    printf("Possible\n");
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:10: error: 'i' was not declared in this scope
   33 |     for (i=max_a/2; --i;)
      |          ^
Language: C++

use std::cmp;

fn main(){
    let mut sc = Scanner::new();
    while let Ok(n) = sc.wrapped() {
        let mut a = vec![0i32; n];
        for e in a.iter_mut() {
            *e = sc.next();
        }

        let solve = || {
            let mut cnt = vec![0; n+1];
            let mut max = 0;
            for i in 0..n {
                cnt[a[i] as usize] += 1;
                max = cmp::max(max, a[i]);
            }
            let mut k = max;
            while k >= (max + 1) / 2 {
                let c = cnt[k as usize];
                if max%2 == 0 {
                    if k == (max + 1) / 2 {
                        if c != 1 { return false; }
                    } else {
                        if c < 2 { return false; }
                    }
                } else {
                    if c < 2 { return false; }
                }
                k -= 1;
            }
            while k >= 0 {
                if cnt[k as usize] > 0 {
                    return false;
                }
                k -= 1;
            }
            true
        };
        println!("{}", if solve() { "Possible" } else { "Impossible" })
    }
}

#[allow(dead_code)]
struct Scanner {
    token_buffer : Vec<String>,
    index : usize,
}

#[allow(dead_code)]
impl Scanner {
    fn new() -> Scanner{
        Scanner { token_buffer: vec![], index: 0 }
    }

    fn wrapped<T>(& mut self) -> Result<T,&str> where T: std::str::FromStr {
        let s = try!(self.fetch_token());
        let t = try!(s.parse::<T>().map_err(|_| "Parse error"));
        Ok(t)
    }
    fn next<T>(& mut self) -> T where T: std::str::FromStr {
        self.wrapped::<T>().unwrap()
    }

    fn fetch_token(&mut self) -> Result<&String,&str> {
        while self.index >= self.token_buffer.len() {
            let mut st = String::new();
            while st.trim() == "" {
                match std::io::stdin().read_line(&mut st) {
                    Ok(l) if l > 0 => continue,
                    Ok(_)  => return Err("End of file"),
                    Err(_) => return Err("Failed to read line"),
                }
            }
            self.token_buffer = st.split_whitespace()
                .map(|x| x.to_string())
                .collect();
            self.index = 0;
        }

        self.index += 1;
        Ok(&self.token_buffer[self.index - 1])
    }
}


Compiler output:
a.cc:14:22: error: too many decimal points in number
   14 |             for i in 0..n {
      |                      ^~~~
a.cc:44:2: error: invalid preprocessing directive #[
   44 | #[allow(dead_code)]
      |  ^
a.cc:50:2: error: invalid preprocessing directive #[
   50 | #[allow(dead_code)]
      |  ^
a.cc:1:1: error: 'use' does not name a type
    1 | use std::cmp;
      | ^~~
a.cc:3:1: error: 'fn' does not name a type
    3 | fn main(){
      | ^~
a.cc:46:5: error: 'token_buffer' does not name a type
   46 |     token_buffer : Vec<String>,
      |     ^~~~~~~~~~~~
a.cc:51:6: error: expected initializer before 'Scanner'
   51 | impl Scanner {
      |      ^~~~~~~
Language: C++

#include <bits/stdc++.h>
#define SZ(X) ((int)(X).size())
#define ALL(X) (X).begin(), (X).end()
#define REP(I, N) for (int I = 0; I < (N); ++I)
#define REPP(I, A, B) for (int I = (A); I < (B); ++I)
#define RI(X) scanf("%d", &(X))
#define RII(X, Y) scanf("%d%d", &(X), &(Y))
#define RIII(X, Y, Z) scanf("%d%d%d", &(X), &(Y), &(Z))
#define DRI(X) int (X); scanf("%d", &X)
#define DRII(X, Y) int X, Y; scanf("%d%d", &X, &Y)
#define DRIII(X, Y, Z) int X, Y, Z; scanf("%d%d%d", &X, &Y, &Z)
#define RS(X) scanf("%s", (X))
#define CASET int ___T, case_n = 1; scanf("%d ", &___T); while (___T-- > 0)
#define MP make_pair
#define PB push_back
#define MS0(X) memset((X), 0, sizeof((X)))
#define MS1(X) memset((X), -1, sizeof((X)))
#define LEN(X) strlen(X)
#define F first
#define S second
#define RF(x) freopen(x,"r",stdin)
#define WF(x) freopen(x,"w",stdout)
typedef long long LL;
using namespace std;
typedef pair<LL,LL> PLL;
typedef pair<int,int> PII;
const LL MOD = 1e9+7;
const int SIZE = 1e6+5;
const LL INF = 1LL<<60;
const double eps = 1e-4;
const double PI=3.1415926535897932;

int f[109],x[109];

int main(){
	DRI(n);
	REP(i,n){
		RI(x[i]);
		f[x[i]]++;
	}
	sort(x,x+n);
	if(f[0]>=2){
		printf("Impossible");return 0;
	}
	int h=x[n-1]/2;
	if(x[n-1]%2){
		REPP(i,h+1,x[n-1]+1){
			if(f[i]<2){
				printf("Impossible");return 0;
			}
		}
		REPP(i,h+1){
			if(f[i]){
				printf("Impossible");return 0;
			}
		}
	}
	else{
		REPP(i,h+1,x[n-1]+1){
			if(f[i]<2){
				printf("Impossible");return 0;
			}
		}
		if(f[h]<1){
			printf("Impossible");return 0;
		}
		REPP(i,h){
			if(f[i]){
				printf("Impossible");return 0;
			}
		}
	}
	printf("Possible");
}


Compiler output:
a.cc:52:27: error: macro "REPP" requires 3 arguments, but only 2 given
   52 |                 REPP(i,h+1){
      |                           ^
a.cc:5:9: note: macro "REPP" defined here
    5 | #define REPP(I, A, B) for (int I = (A); I < (B); ++I)
      |         ^~~~
a.cc:67:25: error: macro "REPP" requires 3 arguments, but only 2 given
   67 |                 REPP(i,h){
      |                         ^
a.cc:5:9: note: macro "REPP" defined here
    5 | #define REPP(I, A, B) for (int I = (A); I < (B); ++I)
      |         ^~~~
a.cc: In function 'int main()':
a.cc:52:17: error: 'REPP' was not declared in this scope
   52 |                 REPP(i,h+1){
      |                 ^~~~
a.cc:67:17: error: 'REPP' was not declared in this scope
   67 |                 REPP(i,h){
      |                 ^~~~
Language: C++

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

void solve();
int main(int argc, char *argv[]) {
    if (argc == 2) {
        freopen(argv[1], "r", stdin);
    } else if (argc == 3) {
        freopen(argv[1], "r", stdin);
        freopen(argv[2], "w", stdout);
    }
    solve();
    return 0;
}

const int N=100+10;
int n,a[N],cnt[N];
bool check(int x, int y){
    for(int i=x;i<=y;i++) if(cnt[i]>=2) return true;
    return false;
}
void solve() {
    while(cin>>n) {
        memset(cnt,0,sizeof(cnt));
        for(int i=0;i<n;i++) {
            cin>>a[i];
            cnt[a[i]]++;
        }

        sort(a,a+n);
        int minD=a[0], maxD=a[n-1];
        bool flag=false;
        if(maxD==2*minD-1) {
            if(check(minD,maxD)) flag=true;
        }
        if(maxD==2*minD) {
            if(cnt[minD]==1&&check(minD+1,maxD)) flag=true;
        }
        if(flag) puts("Possible");
        else puts("Impossible");

    }
}

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

#include <iostream>
#include <cstdio>
#include <vector>
#include <string>
#include <set>
#include <algorithm>

using namespace std;

#define mP make_pair
#define pB push_back
#define X first
#define Y second

int Abs(int x){
	if(x < 0) return -x;
	else return x;
}

int main(){
	int n;
	cin >> n;
	
	vector<int> v;
	for(int i = 0 ; i < n ; ++i){
		int x;
		cin >> x;
		v.pB(x);
	}

	sort(v.begin() , v.end());

	int cnt = 0;

	int tt = v[n - 1];
	for(int i = n - 1 ; i >= 1 ; --i){
		int ttt = 0;
		while(v[i] == tt) {
			--i;
			++ttt;
		}
		if((i >= 0) && || Abs(v[i] - tt) > 1){
			cout << "Impossible" << endl;
			return 0;
		}
		tt = v[i];
		++i;
		++cnt;
	}

	//cout << cnt << endl;

	if(v[0] == cnt){
		cout << "Possible" << endl;
	}
	else cout << "Impossible" << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:32: error: expected primary-expression before '||' token
   42 |                 if((i >= 0) && || Abs(v[i] - tt) > 1){
      |                                ^~
Language: C++

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#include <cstring>
#include <queue>
#include <stack>
#include <math.h>
#include <iterator>
#include <vector>
#include <string>
#include <set>
#include <math.h>
#include <iostream> 
#include<map>
#include <iomanip>
#include <stdlib.h>
#include <list>
#include <typeinfo>
#include <list>
#include <set>
using namespace std;
#define MAX_MOD 1000000007
#define REP(i,n) for(int i = 0;i < n;++i)
#define LONGINF 1000000000000000000
int main() {
	int n;
	cin >> n;
	vector<int> a;
	REP(i, n) {
		int tmp;
		cin >> tmp;
		a.push_back(tmp);
	}
	sort(a.begin(), a.end());
	if (a[0] != (a[n - 1] + 1) / 2) goto impossible;
	if ((a[0]-1) * 2 + 1 > a[n - 1]) goto impossible;
	int cnt = 1;
	int hoge = a[1];
	for (int i = 2;i < n;++i) {
		if (a[i] != hoge) {
			if (cnt == 1) goto impossible;
			cnt = 1;
			hoge = a[i];
		}else{
			cnt++;
		}
	}
	cout << "Possible" << endl;
	return 0;
impossible:;
	cout << "Impossible" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:52:1: error: jump to label 'impossible'
   52 | impossible:;
      | ^~~~~~~~~~
a.cc:38:47: note:   from here
   38 |         if ((a[0]-1) * 2 + 1 > a[n - 1]) goto impossible;
      |                                               ^~~~~~~~~~
a.cc:40:13: note:   crosses initialization of 'int hoge'
   40 |         int hoge = a[1];
      |             ^~~~
a.cc:39:13: note:   crosses initialization of 'int cnt'
   39 |         int cnt = 1;
      |             ^~~
a.cc:52:1: error: jump to label 'impossible'
   52 | impossible:;
      | ^~~~~~~~~~
a.cc:37:46: note:   from here
   37 |         if (a[0] != (a[n - 1] + 1) / 2) goto impossible;
      |                                              ^~~~~~~~~~
a.cc:40:13: note:   crosses initialization of 'int hoge'
   40 |         int hoge = a[1];
      |             ^~~~
a.cc:39:13: note:   crosses initialization of 'int cnt'
   39 |         int cnt = 1;
      |             ^~~
Language: C++

#include<iostream>
#include<algorithm>
#include<climits>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<ctime>
#include<string>
#include<cstring>
#include<vector>
#include<stack>
#include<queue>
#include<set>
#include<bitset>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> i_i;

#define PI 3.141592653589793238462643383279
#define mod 1000000007LL
#define rep(i, n) for(i = 0;i < n;++i)
#define rep1(i, n) for(i = 1;i < n;++i)
#define per(i, n) for(i = n - 1;i > -1;--i)
#define int(x) int x; scanf("%d",&x)
#define int2(x, y) int x, y; scanf("%d%d",&x, &y)
#define int3(x, y, z) int x, y, z; scanf("%d%d%d",&x, &y, &z)
#define int4(v, x, y, z) int v, x, y, z; scanf("%d%d%d%d", &v, &x, &y, &z)
#define int5(v, w, x, y, z) int v, w, x, y, z; scanf("%d%d%d%d%d", &v, &w, &x, &y, &z)
#define ll2(x, y) ll x, y; cin >> x >> y;
#define scn(n, a) rep(i, n)cin >> a[i]
#define sc2n(n, a, b) rep(i, n)cin >> a[i] >> b[i]
#define pri(x) cout << (x) << "\n"
#define pri2(x, y) cout << (x) << " " << (y) << "\n"
#define pri3(x, y, z) cout << (x) << " " << (y) << " " << (z) << "\n"
#define pb push_back
#define mp make_pair
#define all(a) (a).begin(),(a).end()
#define endl "\n"
#define kabe puts("---------------------------")
#define kara puts("")
#define debug(x) cout << " --- " << (x) << "\n"
#define debug2(x, y) cout << " --- " << (x) << " " << (y) << "\n"
#define debug3(x, y, z) cout << " --- " << (x) << " " << (y) << " " << (z) << "\n"
#define X first
#define Y second
#define eps 0.0001
#define prid(x) printf("%.15lf\n", x)

int a[100];
bool solve(void){
  if(n == 2 && a[1] == 1)return true;
  if(a[1] == 1)return false;
  if(a[0] == 1){
    int i;
    rep1(i, n)if(a[i] != 2)return false;
    return true;
  }
  return true;
}
signed main(void){
  int i, j;
  for(int testcase = 0;testcase >= 0;testcase++){
    int(n);
    scn(n, a);
    sort(a, a + n);
    puts(solve() ? "Possible" : "Impossible");


/*/

//*/ break;
  }
  return 0;
}


Compiler output:
a.cc: In function 'bool solve()':
a.cc:54:6: error: 'n' was not declared in this scope; did you mean 'yn'?
   54 |   if(n == 2 && a[1] == 1)return true;
      |      ^
      |      yn
a.cc:58:13: error: 'n' was not declared in this scope
   58 |     rep1(i, n)if(a[i] != 2)return false;
      |             ^
a.cc:25:34: note: in definition of macro 'rep1'
   25 | #define rep1(i, n) for(i = 1;i < n;++i)
      |                                  ^