Language: C++

#define all(x) x.begin(),x.end()               
#define INF INT_MAX / 3                        
using namespace std;                           
                                               
set<int> A;                                    
                                               
void hoge(set<int>::iterator i){               
  if(i == A.end()) return;                     
                                               
  for(auto x : A)                              
    A.insert(max(*i,x) - min(*i,x));           
                                               
  i++;                                         
  hoge(i);                                     
}                                              
                                               
int main(){                                    
 int N,K;                                      
 scanf("%d%d",&N,&K);                          
 getchar();                                    
                                               
 string s,tmp;                                 
 getline(cin,s);                               
 istringstream ss(s);                          
 while(getline(ss,tmp,' ')){                   
   int tmp2 = atoi(tmp.c_str());               
   A.insert(tmp2);                             
   if(tmp2 == K){                              
     printf("POSSIBLE\n");                     
     return 0;                                 
   }                                           
 }                                             
 int size = A.size();                          
 int pointer = 0;                              
                                               
 hoge(A.begin());                              
                                               
 bool found = false;                           
                                               
 if(A.find(K) != A.end()) printf("POSSIBLE\n");
 else printf("IMPOSSIBLE\n");                  
                                               
 return 0;                                     
}                                              

Compiler output:
a.cc:5:1: error: 'set' does not name a type
    5 | set<int> A;
      | ^~~
a.cc:7:6: error: variable or field 'hoge' declared void
    7 | void hoge(set<int>::iterator i){
      |      ^~~~
a.cc:7:11: error: 'set' was not declared in this scope
    7 | void hoge(set<int>::iterator i){
      |           ^~~
a.cc:1:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>'
  +++ |+#include <set>
    1 | #define all(x) x.begin(),x.end()
a.cc:7:15: error: expected primary-expression before 'int'
    7 | void hoge(set<int>::iterator i){
      |               ^~~
a.cc: In function 'int main()':
a.cc:19:2: error: 'scanf' was not declared in this scope
   19 |  scanf("%d%d",&N,&K);
      |  ^~~~~
a.cc:20:2: error: 'getchar' was not declared in this scope
   20 |  getchar();
      |  ^~~~~~~
a.cc:1:1: note: 'getchar' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | #define all(x) x.begin(),x.end()
a.cc:22:2: error: 'string' was not declared in this scope
   22 |  string s,tmp;
      |  ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | #define all(x) x.begin(),x.end()
a.cc:23:10: error: 'cin' was not declared in this scope
   23 |  getline(cin,s);
      |          ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #define all(x) x.begin(),x.end()
a.cc:23:14: error: 's' was not declared in this scope
   23 |  getline(cin,s);
      |              ^
a.cc:23:2: error: 'getline' was not declared in this scope
   23 |  getline(cin,s);
      |  ^~~~~~~
a.cc:24:2: error: 'istringstream' was not declared in this scope
   24 |  istringstream ss(s);
      |  ^~~~~~~~~~~~~
a.cc:1:1: note: 'std::istringstream' is defined in header '<sstream>'; this is probably fixable by adding '#include <sstream>'
  +++ |+#include <sstream>
    1 | #define all(x) x.begin(),x.end()
a.cc:25:16: error: 'ss' was not declared in this scope
   25 |  while(getline(ss,tmp,' ')){
      |                ^~
a.cc:25:19: error: 'tmp' was not declared in this scope
   25 |  while(getline(ss,tmp,' ')){
      |                   ^~~
a.cc:26:15: error: 'atoi' was not declared in this scope
   26 |    int tmp2 = atoi(tmp.c_str());
      |               ^~~~
a.cc:27:4: error: 'A' was not declared in this scope
   27 |    A.insert(tmp2);
      |    ^
a.cc:29:6: error: 'printf' was not declared in this scope
   29 |      printf("POSSIBLE\n");
      |      ^~~~~~
a.cc:29:6: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:33:13: error: 'A' was not declared in this scope
   33 |  int size = A.size();
      |             ^
a.cc:36:2: error: 'hoge' was not declared in this scope
   36 |  hoge(A.begin());
      |  ^~~~
a.cc:40:27: error: 'printf' was not declared in this scope
   40 |  if(A.find(K) != A.end()) printf("POSSIBLE\n");
      |                           ^~~~~~
a.cc:40:27: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:41:7: error: 'printf' was not declared in this scope
   41 |  else printf("IMPOSSIBLE\n");
      |       ^~~~~~
a.cc:41:7: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'